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

ActiveDirectoryMailAddressResolverImpl does not return email address

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have noticed that when using DevelopersRecipientProvider in the declarative pipeline, the information returned is the userid and not the valid email address.  I get the error:
       
      Error sending to the following INVALID addresses: abc543@company.com
      abc543 is the user that committed a change. The real email address is jim.smith@company.com. abc543@company.com does not work. 
      I turned on a log appender and this is the information I get

      Resolving e-mail address for "Smith, Jim" ID=abc543
      Jun 04, 2020 1:36:42 PM FINE hudson.plugins.active_directory.ActiveDirectoryAuthenticationProvider
      Login successful: abc543 dn=CN=abc456,OU=Users,OU=EXT44,OU=IN33,OU=HQ,OU=COMPANY,DC=COM
      Jun 04, 2020 1:36:42 PM FINE hudson.plugins.active_directory.ActiveDirectoryMailAddressResolverImpl
      Email address = 'null'
      

      I called code similar to ActiveDirectoryAuthenticationProvider and noticed that IADsUser.emailAddress() returns the valid email address so it would appear that the problem is in ActiveDirectoryUserDetail.updteUserInfo(). I say that because later the ActiveDirectoryMailAddressResolverImpl returns a null email address and I presume this is the case because it was not save correctly in ActiveDirectoryUserDetail.updteUserInfo().

        Attachments

          Activity

          Hide
          marioja Mario Jauvin added a comment -

          I am trying to debug the active directory plugin version 2.16 but when I start jenkins (with all my plugins copied from the test server where it fails into the eclipse work/plugins folder, I get no error indication.  However, when I navigate to the global security active directory does not appear in the security realms selections.  The manage plugins configuration page show the plugin installed and enabled (checkbox checked).  I even tried to debug the ActiveDirectorySecurityRealm constructor at line 260 but the breakpoint never gets hit.  How can I get the active directory plugin to initialize correctly inside my eclipse workspace?  I am using a hpi:run debug configuration to start it.

          Show
          marioja Mario Jauvin added a comment - I am trying to debug the active directory plugin version 2.16 but when I start jenkins (with all my plugins copied from the test server where it fails into the eclipse work/plugins folder, I get no error indication.  However, when I navigate to the global security active directory does not appear in the security realms selections.  The manage plugins configuration page show the plugin installed and enabled (checkbox checked).  I even tried to debug the ActiveDirectorySecurityRealm constructor at line 260 but the breakpoint never gets hit.  How can I get the active directory plugin to initialize correctly inside my eclipse workspace?  I am using a hpi:run debug configuration to start it.
          Hide
          marioja Mario Jauvin added a comment -

          It turns out that the issue was that the server was running in a different active directory domain where the email address is not defined.

          Show
          marioja Mario Jauvin added a comment - It turns out that the issue was that the server was running in a different active directory domain where the email address is not defined.

            People

            Assignee:
            fbelzunc Félix Belzunce Arcos
            Reporter:
            marioja Mario Jauvin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: