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

I cannot select a global credential as build parameter if I don't have the "Configure JOB" permission

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I created a JOB with a SSH credentials parameter.
      I also created global SSH permissions.
      I created a second user and gave him the permission to view credentials.

      When this user tries to trigger the jenkins job, he is requested for the SSH credentials but he cannot see the global credentials I created.

      When I give this user the permission to configure the jobs, it's OK, he can browse the global credentials.

        Attachments

          Activity

          Hide
          stephenconnolly Stephen Connolly added a comment -

          Enable the Credentials/UseItem permission https://github.com/jenkinsci/credentials-plugin/blob/master/src/main/java/com/cloudbees/plugins/credentials/CredentialsProvider.java#L107 by setting the system property com.cloudbees.plugins.credentials.UseItemPermission

          Show
          stephenconnolly Stephen Connolly added a comment - Enable the Credentials/UseItem permission https://github.com/jenkinsci/credentials-plugin/blob/master/src/main/java/com/cloudbees/plugins/credentials/CredentialsProvider.java#L107 by setting the system property com.cloudbees.plugins.credentials.UseItemPermission
          Hide
          stephenconnolly Stephen Connolly added a comment -

          The permission is defined in the code since ages, you just need to enable it as configurable

          Show
          stephenconnolly Stephen Connolly added a comment - The permission is defined in the code since ages, you just need to enable it as configurable
          Hide
          mig82 Miguelángel Fernández added a comment -

          Hi Stephen Connolly, is there a way to make this permission come up in the permissions matrix provided by the Role-based Authorization Strategy?

          If not, then can it be set from the console? or what's the easiest way to set this? I read that doing this from the Script Console should do the trick, but it didn't work for me:

          System.setProperty("com.cloudbees.plugins.credentials.UseItemPermission", "true")

          Show
          mig82 Miguelángel Fernández added a comment - Hi Stephen Connolly , is there a way to make this permission come up in the permissions matrix provided by the Role-based Authorization Strategy ? If not, then can it be set from the console? or what's the easiest way to set this? I read that doing this from the Script Console should do the trick, but it didn't work for me: System.setProperty("com.cloudbees.plugins.credentials.UseItemPermission", "true")

            People

            • Assignee:
              stephenconnolly Stephen Connolly
              Reporter:
              benjamin_cs Benjamin COHEN SOLAL
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: