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

Test Active Directory connection button reports success if the search operation doesn't have any result

    XMLWordPrintable

Details

    Description

      When testing the AD connection details you need to actually do a search to make sure the credential is valid.

      https://github.com/jenkinsci/active-directory-plugin/blob/master/src/main/java/hudson/plugins/active_directory/ActiveDirectorySecurityRealm.java#L392

      If in this search there are not elements, we are returning null.

      https://github.com/jenkinsci/active-directory-plugin/blob/master/src/main/java/hudson/plugins/active_directory/LDAPSearchBuilder.java#L98

      And in this case we are saying that everything is success.

      https://github.com/jenkinsci/active-directory-plugin/blob/master/src/main/java/hudson/plugins/active_directory/ActiveDirectorySecurityRealm.java#L425

      it might happen that under AD replication farm one of the AD instances is broken not returning any user in the search. In this case, we should expose the issue on the GUI.

      Attachments

        Activity

          Code changed in jenkins
          User: Felix Belzunce Arcos
          Path:
          src/main/java/hudson/plugins/active_directory/ActiveDirectorySecurityRealm.java
          src/main/resources/hudson/plugins/active_directory/Messages.properties
          http://jenkins-ci.org/commit/active-directory-plugin/8a86022e18cb81dd4bc0e7ae9afd5a8cf048d894
          Log:
          Merge pull request #29 from fbelzunc/JENKINS-34143

          [FIXED JENKINS-34143] Test Active Directory connection button reports success if the search operation doesn't have any result

          Compare: https://github.com/jenkinsci/active-directory-plugin/compare/313942cef58e...8a86022e18cb

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Felix Belzunce Arcos Path: src/main/java/hudson/plugins/active_directory/ActiveDirectorySecurityRealm.java src/main/resources/hudson/plugins/active_directory/Messages.properties http://jenkins-ci.org/commit/active-directory-plugin/8a86022e18cb81dd4bc0e7ae9afd5a8cf048d894 Log: Merge pull request #29 from fbelzunc/ JENKINS-34143 [FIXED JENKINS-34143] Test Active Directory connection button reports success if the search operation doesn't have any result Compare: https://github.com/jenkinsci/active-directory-plugin/compare/313942cef58e...8a86022e18cb

          People

            fbelzunc Félix Belzunce Arcos
            fbelzunc Félix Belzunce Arcos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: