Skip to content

Option to prevent LDAP sign in

James Edwards-Jones requested to merge jej/prevent-ldap-sign-in into master

What

Adds prevent_ldap_sign_in setting to prevent using LDAP for sign in.

Continuation of gitlab-foss!31316 (closed) with tests added

Why

When using another system such as SAML for authentication it can be desirable to disable LDAP for authentication. In particular LDAP can be a useful technology for synchronizing group membership, while being a security risk for sign in due to the way passwords are handled. Additionally it can allow users to bypass 2FA policies.

Closes #15626 (closed)

Screenshots

With LDAP sign in allowed
With LDAP sign in prevented
screenshot_2019-10-28-23_12_00 screenshot_2019-10-29-00_23_00

Does this MR meet the acceptance criteria?

Todo / follow up

Risks and testing

If we get the default value for prevent_ldap_sign_in wrong this could lead to users being unable to sign in to their instance.

Future changes that break this or allow it to be bypassed would be considered security flaws. I've included tests at multiple levels including controller, routing, and config to help mitigate this risk.

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by James Edwards-Jones

Merge request reports

Loading