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

API tokens and Job/Read permission issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • role-strategy-plugin

      When using the Role Strategy plugin, a non-admin user (having only Overall/read permission) can't use his API Token to interact with the Jenkins instance. However, using the user's LDAP password works and if the user is given the Global Job/Read permission, it also works.

      Detail:

       I manage a lot of different projects in a multi-tenant Jenkins instance, using the RBAS plugin, by defining project roles for each Folder I create.

      We received a request to download Maven artifacts via curl/wget from a certain project Folder.

      All users of the Jenkins instance have the Overall/Read permission, as can be seen in Selection_477.jpg.

      The users who have access to that folder DO have the Job/Read permission, as part of the Project Role, as can be seen in Selection_478.jpg .

      However, when a person from that project tries to access the REST API with his token, he receives the following error:

       

      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <title>Error 404 Not Found</title>
      </head>
      <body><h2>HTTP ERROR 404</h2>
      <p>Problem accessing /jenkins/job/DFP/job/DataFab/job/build/job/core/lastSuccessfulBuild/api/json/. Reason:
      <pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

      </body>
      </html>

      And if he tries the same with his LDAP password, the call succeeds.

      When I added the Job/Read permission as a Global permission, it also succeeded.

      Any ideas?

       

            oleg_nenashev Oleg Nenashev
            bienstock Gad Maor
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: