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

          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: