Skip to content

Authenticate with login and password generic implementation.

What does this MR do?

This MR is implementing the authentication with login and password in a more generic way with delegation of the specific implementation to the corresponding provider login implementation.

The provider name to be used for the login call is retrieved from the list of known identities of the User the tries to authenticate. The provider name is matching the configured name for each provider (i.e. ldapmain, ldapsecondary) and the login factory method is checking if the this provider name starts with the name of the provider implementation for the match. This approach provides the login implementation, support for multiple configured providers of the same type like oauth2internal and oauth2external that make use of the same omniauth-oauth2 implementation (same approach has to be applied also to the omniauth-callbacks-controllerto have a complete support).

Are there points in the code the reviewer needs to double check?

Check if approach matches the Gitlab software architecture.

Why was this MR needed?

Allow to implement a login specific to the provider that can support different mechanism for password checks like DB stored password or external password check (i.e. LDAP bind).

What are the relevant issue numbers?

This is the first MR for #20820 (moved) that introduce the generic implementation for the login part.

Test added in MR !5809 (closed)

Does this MR meet the acceptance criteria?

Merge request reports