Credentials in Jenkins were rotated, but pipelines still use the old value. What went wrong?
BeginnerScenarioJenkins Shared Libraries, Credentials and Security
Answer
Situation read → Credential referenced in multiple places or copied.
What I'd do →
- Look up all usages with the Credentials Binding usage or search
credentialsIdacross repos. - Update the credential in place, keeping the same ID, so pipelines pick up the new value.
- Check agents or jobs that cached it in env vars, files or Docker config (
~/.docker/config.json).
Why → Using one ID per secret decouples rotation from pipeline edits.
Interview tip → Rotation should be automated and tested, not a heroic event.
More on Jenkins Shared Libraries, Credentials and Security
Ten teams copy the same 80-line "build and push image" stage. What do you do?BeginnerA shared library change broke 50 pipelines at once. How do you prevent a repeat?AdvancedA pipeline needs an AWS secret key and a DB password. How do you provide them without exposing them in logs?BeginnerCredentials are stored in Jenkins; the security team wants no long-lived cloud keys at all.AdvancedA developer asks for admin access to Jenkins to "fix their job". How do you handle it?BeginnerA pipeline from a fork PR should not be able to read production credentials.Intermediate