How to disable access to certain credentials in Jenkins pipeline
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.