Join our Newsletter — 33% off our NHI Course
Home› Glossary› Authentication, Authorisation & Trust› Oidc token in CI/CD
Authentication, Authorisation & Trust

Oidc token in CI/CD

← Back to Glossary
By NHI Mgmt Group Updated September 24, 2026 Domain: Authentication, Authorisation & Trust

An OIDC token in CI/CD is a short-lived identity token used by build and deployment pipelines to prove who they are. Technically, it is an OpenID Connect-issued JWT that a pipeline exchanges for access to cloud, code, or deployment resources without storing long-lived secrets, reducing credential exposure in automation.

What an OIDC token does in CI/CD

In CI/CD, an OIDC token is the pipeline’s short-lived proof of identity. Rather than storing a static cloud key or deployment secret, the build system presents a signed OpenID Connect assertion to obtain scoped, time-bound access for a specific job or workflow run. That shifts trust from reusable secrets to verifiable runtime identity.

This matters because the token is not a general login credential. It is usually tied to the pipeline context, such as repository, branch, environment, runner, or workflow claims, so the access decision can be much narrower than a long-lived token stored in variables or files. Done well, it supports secretless automation and reduces the blast radius of stolen pipeline credentials.

How it fits modern delivery and cloud trust

OIDC in CI/CD is part of a larger move toward workload identity and federated access. The pipeline authenticates to a cloud provider, registry, or deployment target using a token exchange flow instead of embedding credentials in the pipeline definition. That makes the trust relationship explicit: the identity provider issues the token, the target service validates claims, and the access policy decides whether the run is allowed to act.

This pattern is common in GitHub Actions, GitLab CI, and other delivery systems because it reduces secret sprawl and makes credential rotation less painful. It is also more auditable than copying a token into a shared secret store, because the token is short-lived and the exchange can be constrained by issuer, audience, subject, and environment conditions.

For practitioners, the key point is that the token only helps if the trust mapping is tight. A well-designed OIDC setup binds the pipeline identity to a narrowly defined role or workload permission, rather than giving any successfully authenticated run broad cloud access.

Why the token format and claims matter

An OIDC token in CI/CD is usually a JWT, but the JWT format alone is not the security value. The meaningful part is the set of claims that let the relying party verify who issued the token, what workflow or job produced it, and what it is intended to access. Those claims are what make the token suitable for ephemeral, context-aware authorization.

If the audience is too broad, the token can be replayed against unintended services. If the issuer is not tightly pinned, trust can drift to an unexpected identity provider. If the subject or environment claims are too loose, a token minted for one pipeline path may be reused in another. In other words, the security of the pattern depends on claim validation, not just on using OIDC as a label.

The same idea is what makes this pattern attractive for eliminating long-lived secrets in automation. A short-lived federated token is harder to steal and reuse than a static credential, but it still becomes sensitive once issued. Treat it as identity-bearing material that can still be abused if logging, forwarding, or token scope is weak.

Where OIDC tokens become risky

The main risks come from trust mistakes, token leakage, and overbroad authorization. If a pipeline can mint a valid token from a compromised runner, an attacker may be able to exchange it for cloud access, deployment privileges, or repository actions before the token expires. Misconfigured audience checks, weak subject conditions, or permissive role bindings can turn a short-lived token into a high-value pivot point.

That exposure is real in modern delivery systems because CI/CD workflows often have access to production-adjacent resources, signing tools, package registries, and cloud infrastructure. When the token is used to replace secrets, the attack surface shifts from secret storage to runtime trust, token issuance, and authorization logic.

Failure mechanism: A compromised workflow, runner, or supply-chain dependency mints or intercepts a valid OIDC token, then exchanges it for access that is broader than the original job should have received.

Impact: Attackers can move from pipeline compromise to cloud abuse, deployment tampering, artifact theft, or lateral access to connected systems before the short-lived token expires.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and OWASP API Security Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageCI/CD OIDC replaces stored secrets and reduces token exposure
NHI-04 — Insecure AuthenticationOIDC pipeline authentication depends on strict issuer, audience, and claim validation
NHI-05 — Overprivileged NHIPipeline tokens should be scoped to minimal deployment or cloud permissions
Recommendation — Prefer short-lived federated tokens over stored pipeline secrets. Validate token claims and bind trust to the correct issuer and audience. Constrain each pipeline token to the least privilege needed for the job.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementOIDC tokens are authenticators whose lifetime, issuance, and protection must be managed
IA-9 — Service Identification and AuthenticationCI/CD pipelines and cloud services authenticate as non-human actors through federated tokens
AC-6 — Least PrivilegeThe token exchange should grant only the minimum cloud or deployment rights needed
Recommendation — Set short token lifetimes and protect token issuance and handling paths. Use federated service authentication for pipelines instead of shared static credentials. Map each pipeline identity to the smallest set of permissions required.
OWASP API Security Top 10API2 — Broken AuthenticationToken-based CI/CD access fails when assertions, audiences, or trust checks are weak
API5 — Broken Function Level AuthorizationA valid token can still be over-privileged if deployment or cloud permissions are too broad
Recommendation — Harden authentication checks before accepting pipeline-issued tokens. Separate token validity from authorization and enforce narrow function-level permissions.
NIST Zero Trust (SP 800-207)Zero Trust ArchitectureOIDC CI/CD embodies verify-explicitly, least-privilege access for non-human workloads
Recommendation — Treat each pipeline run as a distinct, continuously verified identity request.

Practitioner Guidance

Why practitioners should care: OIDC is only safer than static secrets when the trust boundary is precise. The practical decision is not whether to use OIDC, but whether each workflow is mapped to the smallest feasible audience, issuer, subject, and permission set.

Common misunderstanding: Teams often assume “secretless” means “risk-free.” In reality, OIDC removes stored credentials from the pipeline, but it increases the importance of claim validation, role scoping, and runner trust.

Practitioner takeaway: Design CI/CD OIDC as a narrowly delegated identity channel, not as a generic token dispenser, and keep its authorization policy as small and explicit as the job itself.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Reviewed and updated by the NHIMG editorial team on September 24, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org