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

bindName and bindPassword not being displayed when created via Groovy

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • JENKINS 2.46.3
      Active Directory Plug-in 2.4

      when using the below code to set the Active Directory properties, the BindDN and BindPassword are not being stored

      import jenkins.model.*
          import hudson.model.*
          import hudson.security.*
          import hudson.plugins.*
          import hudson.plugins.active_directory.*
          import hudson.*
          import jenkins.*
      
      def instance = Jenkins.getInstance()
      
      println "--> configure LDAP"
      String domain = "server.domain.com"
      String site = "site"
      String server = "server:3268"
      String bindName = "username"
      String bindPassword = 'password'
      
      adrealm = new ActiveDirectorySecurityRealm(domain, site, bindName, bindPassword, server)
      instance.setSecurityRealm(adrealm)
      
      println "--> configure LDAP... done"
       

      However the log in does appear to work - its just the credential screen that does not display correctly

          [JENKINS-44822] bindName and bindPassword not being displayed when created via Groovy

          Shaun Adams created issue -
          Shaun Adams made changes -
          Description Original: when using the below code to set the Active Directory properties, the BindDN and BindPassword are not being stored

          {code:java}
          import jenkins.model.*
              import hudson.model.*
              import hudson.security.*
              import hudson.plugins.*
              import hudson.plugins.active_directory.*
              import hudson.*
              import jenkins.*

          def instance = Jenkins.getInstance()

          println "--> configure LDAP"
          String domain = "server.domain.com"
          String site = "site"
          String server = "server:3268"
          String bindName = "username"
          String bindPassword = 'password'

          adrealm = new ActiveDirectorySecurityRealm(domain, site, bindName, bindPassword, server)
          instance.setSecurityRealm(adrealm)

          println "--> configure LDAP... done"
           {code}
          New: when using the below code to set the Active Directory properties, the BindDN and BindPassword are not being stored

          {code:java}
          import jenkins.model.*
              import hudson.model.*
              import hudson.security.*
              import hudson.plugins.*
              import hudson.plugins.active_directory.*
              import hudson.*
              import jenkins.*

          def instance = Jenkins.getInstance()

          println "--> configure LDAP"
          String domain = "server.domain.com"
          String site = "site"
          String server = "server:3268"
          String bindName = "username"
          String bindPassword = 'password'

          adrealm = new ActiveDirectorySecurityRealm(domain, site, bindName, bindPassword, server)
          instance.setSecurityRealm(adrealm)

          println "--> configure LDAP... done"
           {code}

          However the log in does appear to work - its just the credential screen that does not display correctly
          Summary Original: bindName and bindPassword not being saved when created via Groovy New: bindName and bindPassword not being displayed when created via Groovy
          marc young made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          marc young made changes -
          Link New: This issue is related to JENKINS-48513 [ JENKINS-48513 ]
          Konstantinos Psimoulis made changes -
          Link New: This issue is related to JENKINS-32710 [ JENKINS-32710 ]

            fbelzunc FĂ©lix Belzunce Arcos
            shaunadams Shaun Adams
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: