Interview › Security & DevSecOps
What is OIDC-based authentication from CI to a cloud provider, and why is it safer than keys? [Intermediate]
Answer
OIDC-based authentication from CI to a cloud provider lets a CI job exchange a short-lived identity token for temporary cloud credentials. It is safer than static keys because there is no long-lived secret stored in the CI platform, and the cloud role can validate repository, branch, workflow, and environment claims.
Technical explanation
The cloud provider trusts the CI OIDC issuer and maps token claims to an IAM role or workload identity.
Credentials are issued just-in-time and expire automatically.
Policy conditions can restrict which repos, branches, tags, or environments can assume production roles.
Hands-on example
AWS example: create an IAM OIDC provider for token.actions.githubusercontent.com, create a role with sts:AssumeRoleWithWebIdentity, restrict sub to repo:org/app:ref:refs/heads/main, then use aws-actions/configure-aws-credentials in the deploy workflow.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Security & DevSecOps interview questions
- What is workload identity, and how does it remove static credentials? [Intermediate]
- What is OPA, and what is the Rego language used for? [Intermediate]
- How do you apply least privilege to service-to-service communication (e.g., with Istio mTLS)? [Intermediate]
- What is secrets management, and how does HashiCorp Vault work at a high level? [Intermediate]
- What is encryption at rest versus in transit, and how do you ensure both? [Advanced]
- What is vulnerability management as a lifecycle (discover, prioritise, remediate, verify)? [Intermediate]
- What is the difference between symmetric and asymmetric encryption? [Advanced]
- How do you reduce the noise of thousands of vulnerability findings? [Intermediate]