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

jenkins cli auth doesn't work any longer if AD authentication is activate

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • Jenkins 2.249.1 (on Windows)
      active-directory 2.17

      > still collection information <

      as long as I use "Security Realm" -> "Jenkins own user database CLI works fine:

      java -jar jenkins-cli.jar -s http://xxx:8081/ -auth user:pass who-am-i
      Authenticated as: user
      Authorities:
        authenticated
      

      ... but if I change to AD

      ... it has worked fine with jenkins version: 2.235.3

      java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass who-am-i
      Authenticated as: aduser@domain
      Authorities:
      ...
      
      java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass version
      2.235.3
      

          [JENKINS-63752] jenkins cli auth doesn't work any longer if AD authentication is activate

          Thomas Patzig created issue -
          Thomas Patzig made changes -
          Attachment New: screenshot-1.png [ 52644 ]
          Thomas Patzig made changes -
          Description Original: as long as I use "Security Realm" -> "Jenkins own user database CLI works fine:

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth user:pass who-am-i
          Authenticated as: user
          Authorities:
            authenticated
          {code}
          New: as long as I use "Security Realm" -> "Jenkins own user database CLI works fine:

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth user:pass who-am-i
          Authenticated as: user
          Authorities:
            authenticated
          {code}

           !screenshot-1.png|thumbnail!
          Thomas Patzig made changes -
          Description Original: as long as I use "Security Realm" -> "Jenkins own user database CLI works fine:

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth user:pass who-am-i
          Authenticated as: user
          Authorities:
            authenticated
          {code}

           !screenshot-1.png|thumbnail!
          New: as long as I use "Security Realm" -> "Jenkins own user database CLI works fine:

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth user:pass who-am-i
          Authenticated as: user
          Authorities:
            authenticated
          {code}

           !screenshot-1.png|thumbnail!

          ... but if I change to AD

          ... it has worked fine with jenkins version: 2.235.3
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass version
          2.235.3
          Thomas Patzig made changes -
          Description Original: as long as I use "Security Realm" -> "Jenkins own user database CLI works fine:

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth user:pass who-am-i
          Authenticated as: user
          Authorities:
            authenticated
          {code}

           !screenshot-1.png|thumbnail!

          ... but if I change to AD

          ... it has worked fine with jenkins version: 2.235.3
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass version
          2.235.3
          New: as long as I use "Security Realm" -> "Jenkins own user database CLI works fine:

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth user:pass who-am-i
          Authenticated as: user
          Authorities:
            authenticated
          {code}

           !screenshot-1.png|thumbnail!

          ... but if I change to AD

          ... it has worked fine with jenkins version: 2.235.3

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass who-am-i
          Authenticated as: aduser@domain
          Authorities:
          ...

          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass version
          2.235.3
          {code}

          Thomas Patzig made changes -
          Description Original: as long as I use "Security Realm" -> "Jenkins own user database CLI works fine:

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth user:pass who-am-i
          Authenticated as: user
          Authorities:
            authenticated
          {code}

           !screenshot-1.png|thumbnail!

          ... but if I change to AD

          ... it has worked fine with jenkins version: 2.235.3

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass who-am-i
          Authenticated as: aduser@domain
          Authorities:
          ...

          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass version
          2.235.3
          {code}

          New: ---> still collection information <---

          as long as I use "Security Realm" -> "Jenkins own user database CLI works fine:

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth user:pass who-am-i
          Authenticated as: user
          Authorities:
            authenticated
          {code}

           !screenshot-1.png|thumbnail!

          ... but if I change to AD

          ... it has worked fine with jenkins version: 2.235.3

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass who-am-i
          Authenticated as: aduser@domain
          Authorities:
          ...

          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass version
          2.235.3
          {code}

          Thomas Patzig made changes -
          Description Original: ---> still collection information <---

          as long as I use "Security Realm" -> "Jenkins own user database CLI works fine:

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth user:pass who-am-i
          Authenticated as: user
          Authorities:
            authenticated
          {code}

           !screenshot-1.png|thumbnail!

          ... but if I change to AD

          ... it has worked fine with jenkins version: 2.235.3

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass who-am-i
          Authenticated as: aduser@domain
          Authorities:
          ...

          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass version
          2.235.3
          {code}

          New: > still collection information <

          as long as I use "Security Realm" -> "Jenkins own user database CLI works fine:

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth user:pass who-am-i
          Authenticated as: user
          Authorities:
            authenticated
          {code}

           !screenshot-1.png|thumbnail!

          ... but if I change to AD

          ... it has worked fine with jenkins version: 2.235.3

          {code:java}
          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass who-am-i
          Authenticated as: aduser@domain
          Authorities:
          ...

          java -jar jenkins-cli.jar -s http://xxx:8081/ -auth aduser@domain:pass version
          2.235.3
          {code}

          Thomas Patzig made changes -
          Attachment New: screenshot-2.png [ 52645 ]

          Thomas Patzig added a comment -

          found my own mistake and solution

          configuration for AD was not completed:
          need cache, recursive group queries and remove irrelevant groups

          Thomas Patzig added a comment - found my own mistake and solution configuration for AD was not completed: need cache, recursive group queries and remove irrelevant groups
          Thomas Patzig made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            thomaspatzig Thomas Patzig
            thomaspatzig Thomas Patzig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: