<- all articles

Docker OIDC Integration for GitHub Actions

Docker introduces OIDC for GitHub Actions, enhancing security by eliminating long-lived secrets.

Abstract technical illustration for Docker OIDC Integration for GitHub Actions
Generated supporting illustration · @cf/black-forest-labs/flux-1-schnell

What Changed Operationally

Docker has introduced OpenID Connect (OIDC) support for GitHub Actions, fundamentally altering how container build workflows authenticate with the Docker registry. This change shifts the security model away from static credentials toward dynamic, time-bound assertions. Organizations utilizing Docker Team, Docker Business, Docker Hardened Images (DHI), or the Docker Sponsored Open Source Program (DSOS) can now configure connections that allow workflows to request access without ever storing a Personal Access Token (PAT) or Open Authentication Token (OAT). The operational impact is immediate: developers no longer need to manage the lifecycle of long-lived secrets. Instead, the authentication process relies on a short-lived Docker access token that expires within minutes and cannot be reused. This eliminates the risk associated with credential leakage, as there are no stored secrets, API keys, or access tokens persisting in workflow files or version control history.

The mechanism relies on a strict authorization model governed by rulesets. When a workflow triggers, it presents an OIDC token to Docker, which verifies the token's origin against the configured rulesets. These rulesets act as a gatekeeper, defining exactly which repositories, branches, and workflows are permitted to pull images. This granular control ensures that even if a token were to be intercepted, its validity is limited to the specific context defined in the ruleset. The system supports up to five rulesets per connection, allowing for complex permission structures without increasing the attack surface. It is important to note that this feature specifically targets the authentication step. The downstream processes—image building, pushing, and registry interactions—remain unchanged. Existing PATs and OATs continue to function, and local development environments or non-GitHub CI systems are not affected by this update.

Architecture and Token Lifecycle

The architecture of this integration separates the identity verification from the credential issuance. The entire exchange occurs without any stored secrets, relying instead on the cryptographic verification of the OIDC token provided by GitHub. The process begins when a GitHub Action requests a token from Docker. Docker validates the request against the rulesets, ensuring the workflow is authorized to perform the action. Upon successful validation, Docker issues a short-lived access token. This token is ephemeral; it expires in minutes and cannot be reused, rendering any potential compromise ineffective. This design aligns with the principle of least privilege, granting access only for the duration of the specific workflow run.

How The Capability Fits Together

A critical distinction regarding this architecture is what it does not cover. OIDC connections replace only the authentication step; they do not alter how images are built, tagged, or pushed. The underlying image registry and build workflows function exactly as they did previously. Furthermore, the feature is specific to GitHub Actions. Local development and non-GitHub CI environments continue to rely on PATs and OATs. This targeted approach allows organizations to adopt the security benefits of OIDC for their primary CI/CD pipeline without requiring a complete overhaul of their existing tooling or development practices. The transition is designed to be seamless, with existing PATs and OATs maintaining functionality during the migration period.

Implementation and Configuration Requirements

Implementing this feature requires specific organizational subscriptions and a configuration step within the Docker Admin Console. The feature is not available to all Docker organizations; it is restricted to those with Docker Team, Docker Business, Docker Hardened Images (DHI) subscriptions, or those enrolled in the Docker Sponsored Open Source Program (DSOS). Once an eligible organization creates a connection in Docker Home, they must define rulesets to control access. These rulesets determine the scope of the connection, specifying which repositories and branches are allowed to authenticate. It is worth noting that GitHub repositories created after July 15, 2026, use immutable identifiers for default subject claims, which must be accounted for in the configuration.

The operational workflow for developers involves updating their GitHub Actions workflow YAML files to utilize the new OIDC connection. This update replaces the manual authentication step with a programmatic request for a token. After verifying that the workflows successfully authenticate using the new method, administrators can remove stored PATs and OATs from their repositories. This cleanup is the final step in securing the infrastructure. The migration path is straightforward: create the connection, update the workflows, verify success, and remove the old credentials. By following this path, organizations can secure their container registries without disrupting the continuous integration and delivery processes.

Operational Impact

Prerequisites and Access Constraints

Implementing OpenID Connect (OIDC) for GitHub Actions within the Docker ecosystem requires specific organizational subscriptions and administrative configuration. The feature is not universally available to all Docker users; it is restricted to organizations holding Docker Team, Docker Business, or Docker Hardened Images (DHI) subscriptions. Additionally, organizations enrolled in the Docker Sponsored Open Source Program (DSOS) are eligible to utilize this authentication method. This tiered access model ensures that the infrastructure required to manage short-lived tokens and secure workflows is available to enterprise and high-security use cases.

Administrators must first establish a connection within the Docker Admin Console before workflows can utilize OIDC. This process involves generating a configuration that links the GitHub Actions runner to the Docker Hub registry. Once the connection is created, the system allows for the creation of up to five rulesets per connection. These rulesets are critical for defining the scope of access, specifying which repositories, branches, and workflows are permitted to authenticate and pull resources. Without properly configuring these rulesets, the authentication exchange will fail, regardless of whether the correct tokens are presented.

Rollout And Governance Decisions

Migration Strategy and Governance

The migration from stored Personal Access Tokens (PATs) or OAuth Tokens (OATs) to OIDC represents a shift in how authentication is managed, but it does not require a complete overhaul of existing build pipelines. The authentication step is the only component replaced by the new mechanism; downstream processes, including image building, registry interactions, and deployment workflows, remain entirely unchanged. This separation allows teams to adopt OIDC incrementally without disrupting the operational logic of their CI/CD pipelines. However, administrators must ensure that the OIDC configuration is strictly enforced to prevent unauthorized access.

A realistic evaluation of the rollout should prioritize the removal of stored credentials while maintaining build integrity. The recommended approach involves a phased migration where new workflows are configured to use OIDC, while existing workflows continue to function with legacy PATs and OATs. This dual-state approach mitigates risk during the transition period. Once the new workflows are verified and running successfully, administrators can proceed to remove the stored secrets. It is important to note that OIDC connections are specifically recommended for GitHub Actions, while local development and non-GitHub CI environments will continue to rely on traditional PATs and OATs.

Governance of the OIDC connection requires ongoing monitoring of the rulesets to ensure they align with current repository structures. As repositories are created or modified, administrators must update the rulesets to reflect the new access requirements. Furthermore, the system utilizes short-lived tokens that expire in minutes, rendering them useless if intercepted. This design inherently reduces the attack surface compared to long-lived secrets. By adhering to the recommended migration path—creating the connection, updating workflows, verifying success, and finally decommissioning stored credentials—organizations can achieve a secure and compliant authentication environment.

Failure Modes And Limits

Operational Limitations and Scope

The implementation of OpenID Connect (OIDC) for GitHub Actions within Docker represents a significant security upgrade, yet it is not a universal solution for all authentication scenarios. The feature is currently restricted to organizations holding specific Docker subscriptions, including Docker Team, Docker Business, or Docker Hardened Images (DHI), as well as those enrolled in the Docker Sponsored Open Source Program (DSOS). Organizations that do not fall into these categories will not have access to the OIDC connection feature. Furthermore, the scope of the feature is limited strictly to GitHub Actions workflows. Local development environments and Continuous Integration pipelines driven by other providers must continue to rely on standard Personal Access Tokens (PATs) or OAuth Tokens (OATs). Consequently, a hybrid authentication strategy is required for organizations that utilize multiple CI/CD environments, as the OIDC connection does not replace the authentication mechanism for non-GitHub sources.

Security And Privacy Considerations

Another limitation lies in the granularity of access control provided through rulesets. While the system allows for the creation of up to five rulesets per connection, administrators must carefully map these rules to specific repositories, branches, and workflows. Misconfiguration of these rulesets can inadvertently block valid authentication attempts or, conversely, grant excessive permissions if a rule is too broad. Additionally, the feature is designed to replace only the authentication step of the workflow. All downstream processes, such as image building, pushing, and registry interactions, remain unchanged. This means that while the entry point to the Docker ecosystem is secured with short-lived credentials, the internal handling of the container images and registry operations relies on the existing infrastructure and configurations.

Verification and Pre-Production Checklist

Open Questions

Before deploying this authentication method to a production environment, a rigorous verification process is essential to ensure compatibility and security.

  • Subscription Verification: Confirm that your organization’s Docker subscription tier qualifies for OIDC support (Team, Business, DHI, or DSOS). Verify that the Docker Admin Console reflects the availability of the new connection settings.
  • Ruleset Configuration: Define and test rulesets in the Docker Admin Console to ensure they correctly allow access for the specific repositories and branches targeted by your workflows. Validate that the ruleset syntax aligns with the expected workflow paths.
  • Workflow Migration: Update your GitHub Actions workflow YAML files to utilize the new OIDC authentication method. Ensure that the id-token: write permission is explicitly included in the workflow job definition to allow the OIDC exchange to proceed.
  • Token Validation: Test the authentication flow in a non-production branch to confirm that the short-lived Docker access tokens are being generated and accepted correctly by the registry.
  • Legacy Credential Removal: Once OIDC is verified to be functioning, remove any stored Personal Access Tokens (PATs) or OAuth Tokens (OATs) from the repository secrets or CI environment variables to eliminate the risk of credential leakage.

Environment Checklist

Verification Statement

This article provides a detailed technical description of the Docker OIDC integration for GitHub Actions based on the supplied documentation. It has not been lab-tested or verified in a live environment. Readers must perform their own due diligence and testing before applying these configurations to production workflows.

Verification Before Production Use

This article was not lab-tested. Verify the current vendor documentation, licensing and rollout conditions, and the behavior in a non-production environment before relying on it operationally.

// source record

Sources

  1. https://www.docker.com/blog/docker-oidc-connections-for-github-actions-available-for-docker-orgs/ www.docker.com · checked 02 Aug 2026
  2. https://github.blog/engineering/architecture-optimization/dont-stop-early-case-folding-source-code-at-memory-speed/ github.blog · checked 02 Aug 2026
  3. https://github.blog/changelog/2026-07-31-gemini-2-5-pro-and-gemini-3-flash-deprecated github.blog · checked 02 Aug 2026