Join our Newsletter — 33% off our NHI Course
Authentication, Authorisation & Trust

OIDC Publish Flow

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

A release pattern where a CI job exchanges a workload or identity token for a short-lived publishing credential. It reduces static secret storage, but it still depends on the integrity of the workflow that requests the exchange and the permissions attached to that automation.

What the OIDC Publish Flow Actually Does

The OIDC publish flow is a release pattern for automation that needs to publish artifacts, packages, or content without storing a long-lived secret. A CI job presents an identity token, the platform validates it, and the job receives a short-lived credential scoped to the publish action.

What makes this pattern useful is that it shifts the trust decision to a fresh runtime exchange instead of a static publishing credential. That reduces secret sprawl, but it does not remove the need to trust the workflow identity, its triggering conditions, and the permissions granted to the automation.

At a protocol level, the flow usually sits on top of OAuth 2.0 and OpenID Connect conventions for asserting identity, exchanging trust, and issuing time-bound credentials. OpenID Connect Core 1.0 is the clearest reference point for the identity side of that exchange.

Why Teams Use It for Publishing

The main reason to use an OIDC publish flow is to avoid embedding static publishing secrets in build systems. Instead of keeping a package token, API key, or similar credential in a repository or CI variable, the pipeline proves its current identity and receives a short-lived token only when it needs to publish.

This changes the operational posture in two ways. First, compromise of a stored secret becomes less likely because there is no durable secret to steal. Second, the publishing authority becomes more tightly bound to the workflow execution itself, which helps separate normal build activity from privileged release activity.

The model is especially common in modern release pipelines, federated CI setups, and secretless publishing designs. OAuth 2.0 and OpenID Connect Guide for Identity Teams provides the broader protocol context, while NHI Authentication Guide shows how workload authentication and token exchange patterns are used in practice.

Where the Trust Boundary Really Sits

The important security boundary is not the token exchange itself, it is the workflow that requests it. If an attacker can alter the job definition, hijack the runner, tamper with the triggering event, or broaden the claims that qualify for issuance, the publish flow can be abused exactly where it was meant to be safest.

That is why OIDC publish flows depend on careful control of issuer trust, audience matching, claim conditions, branch or environment restrictions, and least-privilege publishing scopes. The short-lived credential is only as trustworthy as the automation identity and policy that produced it.

For a deeper look at the release-side attack surface, Identity Provider and SSO Security Guide is useful for understanding token trust, federation abuse, and forged-assertion risks, while OneLogin API flaw (CVE-2025-59363) shows how OIDC-related secrets can still be exposed when surrounding systems are weak.

Common Failure Modes and Release Implications

OIDC publish flows fail when teams treat them as “secretless” and therefore inherently safe. In reality, the risk often moves from static secret theft to workflow compromise, overly broad trust rules, or accidental reuse of the same federation pattern across multiple publishing targets.

Another common issue is scope creep. A job that only needs permission to publish one package may end up with broader artifact or registry access than necessary, which raises the blast radius if the workflow or runner is abused. Release patterns also become fragile when token lifetimes, identity claims, or environment protections are not aligned with the actual deployment process.

That is why the pattern should be read as a controlled exchange design, not a blanket replacement for all release credentials. IAM and IGA Basics helps frame the least-privilege and governance implications, and Ultimate Guide to NHIs — Standards places the pattern in the broader workload and identity control landscape.

Risk and Threat Considerations

OIDC publish flows reduce static secret exposure, but they concentrate trust in the CI workflow, the oidc trust policy, and the identity assertions used to mint the publishing credential. If any of those are abused, an attacker can obtain the same short-lived release authority that the legitimate pipeline would receive.

Failure mechanism: The attacker compromises the workflow, manipulates the triggering context, or exploits weak token validation so the exchange issues a valid publish credential to an unauthorized build.

Impact: Unauthorized artifact publication, package tampering, supply-chain compromise, and persistence through trusted release channels can follow, especially when the publish credential is accepted by downstream registries or deployment systems.

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, CIS Controls v8 and OWASP ASVS set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementOIDC publish flows depend on short-lived credential issuance and lifecycle control.
IA-9 — Service Identification and AuthenticationThe flow authenticates CI workloads or services to obtain scoped publish access.
AC-6 — Least PrivilegePublishing tokens should carry only the minimum rights needed for release.
Recommendation — Limit token lifetime and rotate or revoke publishing credentials promptly. Authenticate the workflow workload with service-oriented controls before granting publish access. Restrict publish scopes to the minimum privileges required for the release job.
OWASP Non-Human Identity Top 10NHI-04 — Insecure AuthenticationThe publish flow relies on trustworthy workload authentication and token exchange.
NHI-05 — Overprivileged NHICI workloads acting as publishing identities can be over-scoped if release permissions are too broad.
NHI-07 — Long-Lived SecretsThe pattern exists to replace durable release secrets with short-lived credentials.
Recommendation — Harden the token exchange so only approved workflows can mint publishing credentials. Constrain publishing identities to narrowly scoped, job-specific permissions. Replace stored publish secrets with short-lived federated credentials wherever possible.
OWASP API Security Top 10API2 — Broken AuthenticationThe trust exchange between workflow and token issuer is an authentication boundary.
Recommendation — Validate issuer, audience, and claim conditions before accepting a publish token.
CIS Controls v8CIS-5 — Account ManagementPublishing automation needs controlled creation, scope, and removal of release identities.
Recommendation — Inventory and tightly govern automation accounts used for publishing.
OWASP ASVSV10 — OAuth and OIDCOIDC publish flows are built on OAuth 2.0 and OpenID Connect token exchange patterns.
Recommendation — Apply OIDC validation rules consistently across all release workflows.

Practitioner Guidance

Why practitioners should care: Treat the OIDC publish flow as a privileged access path, not just a convenience feature. The strongest control point is the set of conditions that decide whether a workflow may exchange its identity for release authority.

What to watch for: Review the workflow trigger, issuer, audience, branch, environment, and permission scope together. If any one of those is too broad, the short-lived token can still become a high-value publishing credential.

Practitioner takeaway: The safest OIDC publish design is the one that makes successful publication possible only from the exact workflow state you intended, and nowhere else.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

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