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

SAML Auth Provider doesn't allow api tokens to authenticate

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • saml-plugin

      Using an API token configured for a user doesn't allow access to the api e.g. accessing https://user:apitoken@jenkins/crumbIssuer/api/json causes a redirect to the saml auth provider instead of authenticating with the users apitoken.

          [JENKINS-52701] SAML Auth Provider doesn't allow api tokens to authenticate

          Ivan Fernandez Calvo added a comment - - edited

          Which version of core and SAML plugin are you using? it should work on version upper than 0.14

          Ivan Fernandez Calvo added a comment - - edited Which version of core and SAML plugin are you using? it should work on version upper than 0.14

          James Sharpe added a comment -

          1.0.7

          James Sharpe added a comment - 1.0.7

          and Jenkins core?

          Ivan Fernandez Calvo added a comment - and Jenkins core?

          James Sharpe added a comment -

          2.133 for Jenkins Core

          James Sharpe added a comment - 2.133 for Jenkins Core

          James Sharpe added a comment -

          I've just regenerated the tokens under a user that authenticates with saml and it works now. The user for which it was failing was a user that wouldn't be authenticated via saml and was probably using a legacy api token.

          James Sharpe added a comment - I've just regenerated the tokens under a user that authenticates with saml and it works now. The user for which it was failing was a user that wouldn't be authenticated via saml and was probably using a legacy api token.

          so it is resolved, right?

          Ivan Fernandez Calvo added a comment - so it is resolved, right?

          James Sharpe added a comment -

          Yes, sorry for the noise

          James Sharpe added a comment - Yes, sorry for the noise

          Vinay B added a comment -

          I'm facing the same issue. Its redirecting to the SAML Auth Provider instead of authenticating with the username and api token. Am on 2.179

          Vinay B added a comment - I'm facing the same issue. Its redirecting to the SAML Auth Provider instead of authenticating with the username and api token. Am on 2.179

          bvinayprasad see the James comments, the user has to login at least once to grab the groups and create the user, also it should be a SAML real user.

          Ivan Fernandez Calvo added a comment - bvinayprasad see the James comments, the user has to login at least once to grab the groups and create the user, also it should be a SAML real user.

            ifernandezcalvo Ivan Fernandez Calvo
            jsharpe James Sharpe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: