How to setup multiple way of authentication in Jenkins such as LDAP and Jenkins User database? How to setup multiple way of authentication in Jenkins such as LDAP and Jenkins User database? jenkins jenkins

How to setup multiple way of authentication in Jenkins such as LDAP and Jenkins User database?


This is not possible as described. The feature request is JENKINS-15063.

However, it is possible to approximate in a few ways (though the Jenkins user database still won't be usable).

  • For multiple LDAP realms you can set up a single proxy server that combines the forests.
  • Using PAM you can define multiple authentication sources and fallbacks in e.g. /etc/pam.d/jenkins


Yes that's possible and requires 2 steps:

  1. Add a user
    Navigate to Jenkins -> Manage Jenkins -> Configure Global Security.
    Under Authorization you need to configure who can do what. You can add LDAP groups and/or users and fine tune what they are allowed to do.
    If you enabled Matrix-based or Project/Matrix-based authorization then you have a field to add new users/groups. You can add users that are known to LDAP or not known.
  2. Add Credentials
    If you added a user that is not known to LDAP you need to create the credentials in Jenkins (i.e. password).
    Navigate to Jenkins -> Credentials -> System -> Global Credentials -> Add Credentials
    Then add username and password.