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

后端 未结 2 403
醉话见心
醉话见心 2021-01-12 20:14

Actually the authentication into our Jenkins is done through LDAP.

Some people in my team are not member of the LDAP.

Is there a way to use both LDAP and Jen

相关标签:
2条回答
  • 2021-01-12 20:23

    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
    0 讨论(0)
  • 2021-01-12 20:46

    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.
    0 讨论(0)
提交回复
热议问题