You need to give a release bot a token to call the Jenkins API. How?
BeginnerScenarioCredentials & security
Answer
Situation read → Machine identity with minimal permissions.
What I'd do →
- Create a service account user in the IdP or a local Jenkins user
svc-release-bot. - Grant only the permissions it needs on specific folders (
Job/Build,Job/Read). - Generate a named API token, store it in the bot's secret store, rotate periodically.
- Monitor token last-use and revoke unused ones.
Why → Separate identity makes audit clear and limits damage if leaked.
Interview tip → Mention that API tokens do not need CSRF crumbs.
More on Credentials & security
What credential types does Jenkins support out of the box?BeginnerWhat is the difference between Global and System credential scope?IntermediateHow do folder-scoped credentials help multi-team controllers?IntermediateHow does Jenkins mask secrets in logs and what are its limits?AdvancedWhat authorization strategies are available?IntermediateWhat are the key permissions to understand in matrix auth?Intermediate