Skip to content

Commit 2e3c8fe

Browse files
authored
Revert "Document immutable GitHub Actions OIDC sub claims for dotcom repositories" (#60941)
1 parent 925f769 commit 2e3c8fe

4 files changed

Lines changed: 1 addition & 42 deletions

File tree

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,6 @@ Edit the trust policy, adding the `sub` field to the validation conditions. For
7070
}
7171
```
7272

73-
For repositories created after June 18, 2026, or that have opted in to immutable subject claims, the `sub` claim includes immutable owner and repository IDs (not available on {% data variables.product.prodname_ghe_server %}). Make sure your trust policy matches the format your repository uses. For more information, see [AUTOTITLE](/actions/reference/openid-connect-reference#immutable-subject-claims).
74-
75-
```json copy
76-
"Condition": {
77-
"StringEquals": {
78-
"token.actions.githubusercontent.com:aud": "sts.amazonaws.com",
79-
"token.actions.githubusercontent.com:sub": "repo:octo-org-123456/octo-repo-456789:ref:refs/heads/octo-branch"
80-
}
81-
}
82-
```
83-
8473
If you use a workflow with an environment, the `sub` field must reference the environment name: `repo:ORG-NAME/REPO-NAME:environment:ENVIRONMENT-NAME`. For more information, see [AUTOTITLE](/actions/reference/openid-connect-reference#filtering-for-a-specific-environment).
8574

8675
{% data reusables.actions.oidc-deployment-protection-rules %}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ This guide gives an overview of how to configure Azure to trust {% data variable
3232

3333
{% data reusables.actions.oidc-on-ghecom %}
3434

35-
For repositories created after June 18, 2026, and repository renames or transfers after that date, use an immutable default OIDC `sub` claim that includes owner and repository IDs (not available on {% data variables.product.prodname_ghe_server %}). Existing repositories keep the previous format unless they opt in. For more information, see [AUTOTITLE](/actions/reference/openid-connect-reference#immutable-subject-claims).
36-
3735
{% ifversion ghes %}
3836
{% data reusables.actions.oidc-endpoints %}
3937
<!-- This note is indented to align with the above reusable. -->

content/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-google-cloud-platform.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ This guide gives an overview of how to configure GCP to trust {% data variables.
3131

3232
{% data reusables.actions.oidc-on-ghecom %}
3333

34-
For repositories created after June 18, 2026, and repository renames or transfers after that date, use an immutable default OIDC `sub` claim that includes owner and repository IDs (not available on {% data variables.product.prodname_ghe_server %}). Existing repositories keep the previous format unless they opt in. For more information, see [AUTOTITLE](/actions/reference/openid-connect-reference#immutable-subject-claims).
35-
3634
{% ifversion ghes %}
3735
{% data reusables.actions.oidc-endpoints %}
3836
<!-- This note is indented to align with the above reusable. -->

content/actions/reference/security/oidc.md

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The OIDC token includes the following claims.
2626
| ----------- | -----| ---------------------- |
2727
| `aud`| Audience | By default, this is the URL of the repository owner, such as the organization that owns the repository. You can set a custom audience with a toolkit command: [`core.getIDToken(audience)`](https://www.npmjs.com/package/@actions/core/v/1.6.0) |
2828
| `iss`| Issuer | The issuer of the OIDC token: {% ifversion ghes %}`https://HOSTNAME/_services/token`{% else %}`https://token.actions.githubusercontent.com`{% endif %} |
29-
| `sub`| Subject | Defines the subject claim that is to be validated by the cloud provider. This setting is essential for making sure that access tokens are only allocated in a predictable way. For repositories using immutable subject claims, the `sub` format includes immutable owner and repository IDs (not available on {% data variables.product.prodname_ghe_server %}). |
29+
| `sub`| Subject | Defines the subject claim that is to be validated by the cloud provider. This setting is essential for making sure that access tokens are only allocated in a predictable way. |
3030

3131
### Additional standard JOSE header parameters and claims
3232

@@ -163,22 +163,6 @@ You can configure a subject that includes metadata containing colons. In this ex
163163

164164
{% endif %}
165165

166-
## Immutable subject claims
167-
168-
The OpenID Connect (OIDC) specification requires subject (`sub`) claims to be locally unique and never reassigned. Previously, the default `sub` format used only organization and repository names. If a namespace was recycled, a different owner could create the same subject value.
169-
170-
To help prevent this scenario, repositories created after June 18, 2026 now use an immutable default subject format that includes both the owner ID and repository ID. This rollout does not include {% data variables.product.prodname_ghe_server %}.
171-
172-
* Syntax: `repo:OWNER-ID/REPO-ID:ref:refs/heads/BRANCH`
173-
* Previous format example: `repo:octo-org/octo-repo:ref:refs/heads/main`
174-
* Immutable format example: `repo:octo-org-123456/octo-repo-456789:ref:refs/heads/main`
175-
176-
The `-` separator is used between names and IDs because `-` cannot appear in {% data variables.product.github %} usernames or repository names.
177-
178-
Repositories created before June 18, 2026 keep the previous format unless you opt in to immutable subject claims. You can opt in at the organization or repository level by using the OIDC settings UI or REST API.
179-
180-
Repository renames and transfers after June 18, 2026 also move to the immutable subject format.
181-
182166
## Configuring the subject in your cloud provider
183167

184168
To configure the subject in your cloud provider's trust relationship, you must add the subject string to its trust configuration. The following examples demonstrate how various cloud providers can accept the same `repo:octo-org/octo-repo:ref:refs/heads/demo-branch` subject in different ways:
@@ -190,15 +174,6 @@ To configure the subject in your cloud provider's trust relationship, you must a
190174
| Google Cloud Platform| `(assertion.sub=='repo:octo-org/octo-repo:ref:refs/heads/demo-branch')` |
191175
| HashiCorp Vault| `bound_subject="repo:octo-org/octo-repo:ref:refs/heads/demo-branch"` |
192176

193-
For repositories created after June 18, 2026, or that have opted in to immutable subject claims, the `sub` claim includes `owner_id` and `repo_id` as shown in the immutable examples. Update your trust policies to match the format your repository uses. Immutable subject claims are not available on {% data variables.product.prodname_ghe_server %}.
194-
195-
| Cloud provider | Immutable format example |
196-
| ------ | ----------- |
197-
| Amazon Web Services | `"token.actions.githubusercontent.com:sub": "repo:octo-org-123456/octo-repo-456789:ref:refs/heads/demo-branch"` |
198-
| Azure| `repo:octo-org-123456/octo-repo-456789:ref:refs/heads/demo-branch` |
199-
| Google Cloud Platform| `(assertion.sub=='repo:octo-org-123456/octo-repo#456789:ref:refs/heads/demo-branch')` |
200-
| HashiCorp Vault| `bound_subject="repo:octo-org-123456/octo-repo-456789:ref:refs/heads/demo-branch"` |
201-
202177
For more information about configuring specific cloud providers, see the guides listed in [AUTOTITLE](/actions/how-tos/security-for-github-actions/security-hardening-your-deployments).
203178

204179
## Customizing the token claims
@@ -340,7 +315,6 @@ Customizing the claims results in a new format for the entire `sub` claim, which
340315
> [!NOTE]
341316
> The `sub` claim uses the shortened form `repo` (for example, `repo:ORG-NAME/REPO-NAME`) instead of `repository` to reference the repository. {% ifversion fpt or ghec or ghes > 3.15 %}
342317
> Any `:` within the context value will be replaced with `%3A`. {% endif %}
343-
> For repositories using immutable subject claims (not available on {% data variables.product.prodname_ghe_server %}), `owner_id` and `repo_id` are always included in the `repo` segment of the `sub` claim, even when you customize claims with `include_claim_keys`. You can't remove these IDs from the immutable format.
344318
345319
The following example templates demonstrate various ways to customize the subject claim. To configure these settings on {% data variables.product.prodname_dotcom %}, admins use the REST API to specify a list of claims that must be included in the subject (`sub`) claim.
346320

0 commit comments

Comments
 (0)