Skip to content

Commit 63883fe

Browse files
authored
Update content/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-docker.md
1 parent a140ec4 commit 63883fe

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

  • content/actions/how-tos/secure-your-work/security-harden-deployments

‎content/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-docker.md‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -84,33 +84,6 @@ jobs:
8484
* The `docker/login-action` handles the OIDC token exchange and Docker login in a single step when `DOCKERHUB_OIDC_CONNECTIONID` is set and `password` is omitted.
8585
* The `username` field should be your Docker organization name.
8686

87-
### Using the token as an output
88-
89-
If your workflow needs the Docker access token as a separate output (for example, for API calls or custom authentication flows), use [`docker/oidc-action`](https://github.com/docker/oidc-action) to perform the token exchange explicitly:
90-
91-
```yaml
92-
{% data reusables.actions.actions-not-certified-by-github-comment %}
93-
permissions:
94-
id-token: write
95-
contents: read
96-
97-
jobs:
98-
build:
99-
runs-on: ubuntu-latest
100-
steps:
101-
- name: Get Docker OIDC token
102-
id: docker-oidc
103-
uses: docker/oidc-action@3f002d200df5620744c973221788e401898c6f86 # v1
104-
with:
105-
connection_id: YOUR-CONNECTION-ID
106-
107-
- name: Sign in to Docker Hub
108-
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
109-
with:
110-
username: YOUR-DOCKER-ORG
111-
password: {% raw %}${{ steps.docker-oidc.outputs.token }}{% endraw %}
112-
```
113-
11487
### Subject claim matching
11588

11689
Docker evaluates the `sub` claim from the {% data variables.product.prodname_dotcom %} OIDC token against the rulesets you configured. The default subject claim format is:

0 commit comments

Comments
 (0)