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

Wrong building of principalname and sAMAccountName

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • OpenIndiana hipster

      The attributes UPN and sAMAccountName are independent.
      UPN=a@b.c.d and sAMAccountName=e are valid values for an user object in AD.
      The method getPrincipalName is wrong when the user used the sAMAccountName in the login form and sAMAccountName is unequal from the first token before the @ in the UPN.
      And this is the case if you follow the recommendations from Microsoft.

      See here https://msdn.microsoft.com/en-us/library/ms680857(v=vs.85).aspx

      This is just true for a special case and will fail in all other cases_
      String samAccountName = userPrincipalName.substring(0, userPrincipalName.indexOf('@'));

       

       

       

            fbelzunc Félix Belzunce Arcos
            grueni Andreas Grüninger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: