You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Use Liquid variables instead of hardcoded product names
- Add third-party actions disclaimer reusable to workflow example
- Use action-checkout reusable for actions/checkout
- Add note about immutable subject claim format (post July 15 2026)
- Remove duplicate external links per style guide
- Pin version comments to major version only (v1, v4, v6)
Copy file name to clipboardExpand all lines: content/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-docker.md
+9-14Lines changed: 9 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ For more information, see [OIDC connections](https://docs.docker.com/enterprise/
30
30
31
31
* You must have a Docker Business or Docker Team subscription.
32
32
* You must be an organization owner or editor in your Docker organization.
33
-
* You should plan which repositories, branches, and workflows need access to Docker Hub, and configure rulesets accordingly. For more information, see [Rulesets and subject claims](https://docs.docker.com/enterprise/security/oidc-connections/rulesets-claims/) in the Docker documentation.
33
+
* You should plan which repositories, branches, and workflows need access to Docker Hub, and configure rulesets accordingly.
34
34
35
35
## Adding the identity provider to Docker Hub
36
36
@@ -39,7 +39,7 @@ To use OIDC with Docker, establish a trust relationship between {% data variable
39
39
1. Sign in to [Docker Home](https://app.docker.com/) and navigate to your organization.
40
40
1. Go to **Identity & auth** > **OIDC connections**.
41
41
1. Select **Create OIDC connection**.
42
-
1. Configure at least one ruleset to define which GitHub repositories, branches, or workflows can authenticate. Each ruleset specifies:
42
+
1. Configure at least one ruleset to define which {% data variables.product.prodname_dotcom %} repositories, branches, or workflows can authenticate. Each ruleset specifies:
43
43
***Rules**: Conditions matched against OIDC token claims (repository, branch, workflow path). Wildcard patterns like `repo:my-org/*` are supported.
44
44
***Resources**: Docker Hub repositories or Docker Build Cloud projects the workflow can access.
45
45
***Scopes**: Permission levels (`read`, `write`).
@@ -52,12 +52,7 @@ Once you have created an OIDC connection in Docker Hub, update your workflow to
52
52
The following example uses the placeholder `YOUR_CONNECTION_ID` for the connection ID you copied from Docker Hub, and `YOUR_DOCKER_ORG` for your Docker organization name.
53
53
54
54
```yaml
55
-
name: Build and push with OIDC
56
-
57
-
on:
58
-
push:
59
-
branches: [main]
60
-
55
+
{% data reusables.actions.actions-not-certified-by-github-comment %}
61
56
permissions:
62
57
id-token: write
63
58
contents: read
@@ -67,16 +62,16 @@ jobs:
67
62
runs-on: ubuntu-latest
68
63
steps:
69
64
- name: Check out repository
70
-
uses: actions/checkout@v4
65
+
uses: {% data reusables.actions.action-checkout %}
password: {% raw %}${{ steps.docker-oidc.outputs.token }}{% endraw %}
@@ -102,6 +97,9 @@ Docker evaluates the `sub` claim from the {% data variables.product.prodname_dot
102
97
repo:<owner>/<repo>:ref:refs/heads/<branch>
103
98
```
104
99
100
+
> [!NOTE]
101
+
> Repositories created or renamed after July 15, 2026 use immutable owner and repository identifiers in the subject claim, for example: `repo:octocat@123456/my-repo@456789:ref:refs/heads/main`. For more information, see [AUTOTITLE](/actions/concepts/security/openid-connect).
102
+
105
103
Different workflow triggers produce different subject claims. For example:
106
104
107
105
| Trigger | Subject claim format |
@@ -117,7 +115,4 @@ For more information, see [Rulesets and subject claims](https://docs.docker.com/
117
115
118
116
## Further reading
119
117
120
-
* [OIDC connections overview](https://docs.docker.com/enterprise/security/oidc-connections/) in the Docker documentation
121
-
* [Create and manage OIDC connections](https://docs.docker.com/enterprise/security/oidc-connections/create-manage/) in the Docker documentation
122
-
* [Rulesets and subject claims](https://docs.docker.com/enterprise/security/oidc-connections/rulesets-claims/) in the Docker documentation
0 commit comments