Skip to end of metadata
Go to start of metadata

There are two types of custom authentication modules, which can be provided by plugins: credentials authentication modules and HTTP authentication modules. The first ones are used to check the credentials user typed in login form on the login page. The second ones are used to authenticate a user by HTTP request without showing login page at all.

Credentials Authentication Module

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

To make the authentication module active its type name can then be used during Configuring Authentication Settings.

For example:

CustomLoginModule.java

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

CustomLoginModuleDescriptor.java

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

Now you should be able to change authentication scheme to your authentication module.

HTTP Authentication Module

To provide your own HTTP authentication module you should provide a class which must implement the interface jetbrains.buildServer.controllers.interceptors.auth.HttpAuthenticationScheme and register it in the jetbrains.buildServer.serverSide.auth.LoginConfiguration.

To make the authentication module active its type name can then be used during Configuring Authentication Settings.

For example:

CustomHttpAuthenticationScheme.java

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

Now you should be able to change authentication scheme to your authentication module.

  • No labels

1 Comment

  1. An example plugin related to HTTP authentication.