Interview Prep/Jenkins/Credentials & security

Pipelines need database passwords at deploy time from AWS Secrets Manager. Compare two ways to integrate.

AdvancedScenarioCredentials & security
Answer

Situation read → Credentials provider vs runtime fetch.

What I'd do →

  1. Credentials provider plugin: secrets tagged in Secrets Manager appear as Jenkins credentials; pipelines use withCredentials normally; Jenkins needs IAM read on those secrets.
  2. Runtime fetch: the deploy pod uses IRSA and runs aws secretsmanager get-secret-value; Jenkins never sees the secret store.
  3. Even better, let the application read secrets at runtime (External Secrets Operator), so the pipeline never handles them.

Why → Each step away from Jenkins reduces how many places hold the secret.

Interview tip → Mention least privilege on the IAM policy per environment.

All Jenkins questions Roadmap: Jenkins

More on Credentials & security