Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55657

How to Configure Two LDAP Servers for authorisation with Groovy

    Details

    • Similar Issues:

      Description

      HI, 

      I am able to set/configure a single LDAP server on jenkins using following groovy script:

      Note: Got sample from https://issues.jenkins-ci.org/browse/JENKINS-29733
      import jenkins.model.*import hudson.security.*import org.jenkinsci.plugins.*String server = 'ldap://1.2.3.4'String rootDN = 'dc=foo,dc=com'String userSearchBase = 'cn=users,cn=accounts'String userSearch = ''String groupSearchBase = ''String managerDN = 'uid=serviceaccount,cn=users,cn=accounts,dc=foo,dc=com'String managerPassword = 'password'boolean inhibitInferRootDN = false SecurityRealm ldap_realm = new LDAPSecurityRealm(server, rootDN, userSearchBase, userSearch, groupSearchBase, managerDN, managerPassword, inhibitInferRootDN)
      Jenkins.instance.setSecurityRealm(ldap_realm)
      Jenkins.instance.save()

      this sample is working fine , now i need to add/configure two LDAP servers on jenkins.

      Anybody can give me sample script to achieve that...?

      Thanks,
      Rajendra

       

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              rajendra_penumalli rajendra penumalli
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: