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

      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.

          [JENKINS-34088] I cannot select a global credential as build parameter if I don't have the "Configure JOB" permission

          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

          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

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

          Stephen Connolly added a comment - The permission is defined in the code since ages, you just need to enable it as configurable

          Hi stephenconnolly, 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")

          Miguelángel Fernández added a comment - Hi stephenconnolly , 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")

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

              Created:
              Updated:
              Resolved: