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

OpenID Plugin redirects REST API requests also

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • openid-plugin
    • None
    • Windows. Java 1.7. SSL-only.

      As far as I can tell, the OpenID plugin prevents use of the REST API, even for its most obvious use to trigger build. A GET of a URL:

      https://username:apikey@jenkinshostname.domain.com/job/JobName/config.xml

      gets redirected for OpenID auth, which a REST API consumer, having provided an API key, does not expect to have to deal with.

      Is this broken? Workaround? Fix?

          [JENKINS-20248] OpenID Plugin redirects REST API requests also

          kylecordes created issue -

          I'm also having the same issue.

          I've tried

          curl -uUSER:TOKEN https://hostname/jenkins/view/Active/api/json?token=TOKEN
          

          but it returns a 403 with a redirect to /jenkins/securityRealm/commenceLogin.

          Andrew Matheny added a comment - I'm also having the same issue. I've tried curl -uUSER:TOKEN https: //hostname/jenkins/view/Active/api/json?token=TOKEN but it returns a 403 with a redirect to /jenkins/securityRealm/commenceLogin.

          Yar n added a comment -

          so old bug and no activity? (((( sucks(((

          Yar n added a comment - so old bug and no activity? (((( sucks(((

          MattRussellUK added a comment -

          I had this issue, hope this might help someone else: in my case, it was the reverse-proxy stripping out the auth header before reaching Jenkins (we had "RequestHeader unset Authorization" in our Apache config for some reason). It works fine now.

          MattRussellUK added a comment - I had this issue, hope this might help someone else: in my case, it was the reverse-proxy stripping out the auth header before reaching Jenkins (we had "RequestHeader unset Authorization" in our Apache config for some reason). It works fine now.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 151772 ] New: JNJira + In-Review [ 178059 ]

            kohsuke Kohsuke Kawaguchi
            kylecordes kylecordes
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: