bruecktech
bruecktech

Reputation: 81

How to disable access to certain credentials in Jenkins pipeline

I have configured a Github API token in Jenkins to be used in jobs to checkout the repos. I also have the credentials binding plugin installed to inject other types of credentials into a pipeline using the withCredentials command. But now each pipeline can read the GitHub API token using withCredentials. How can i restrict access to certain global credentials for all jobs?

Upvotes: 3

Views: 1173

Answers (1)

Ramakrishna Yelduti
Ramakrishna Yelduti

Reputation: 447

We can create Credential object at folder level instead of Global. So that only the jobs which are in that folder can assess those credential objects. The jobs out of that folder can't access those credentials objects. This may help you to resolve the issue.

Upvotes: 1

Related Questions