TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

Custom Authentication Module

Last modified: 20 April 2023

Custom authentication API is based on Sun JAAS API. To provide your own authentication scheme, you should provide a login module class which must implement interface javax.security.auth.spi.LoginModule and register it in the jetbrains.buildServer.serverSide.auth.LoginConfiguration.

For example:

Now we should register this module in the server. To do so, we create a login module descriptor:

Finally we should create build-server-plugin-ourUserAuth.xml and zip archive with plugin classes as it is described Plugins Packaging and write there CustomLoginModuleDescriptor bean:

Now you should be able to change authentication scheme by specifying name of your class in the main-config.xml file, Authentication Settings.