Skip to content

Commit ba382b2

Browse files
aripollakhubwriter
andauthored
Tweak AWS OIDC instructions (#11621)
* Tweak AWS OIDC instructions * Only contents: read is necessary * Remove :aud filter because it's set to "sts.amazonaws.com" when using aws-actions/configure-aws-credentials * Update to be valid JSON, and actually remove :aud Co-authored-by: hubwriter <hubwriter@github.com>
1 parent bb1a75b commit ba382b2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ To add the {% data variables.product.prodname_dotcom %} OIDC provider to IAM, se
3838

3939
To configure the role and trust in IAM, see the AWS documentation for ["Assuming a Role"](https://github.com/aws-actions/configure-aws-credentials#assuming-a-role) and ["Creating a role for web identity or OpenID connect federation"](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html).
4040

41-
By default, the validation only includes the audience (`aud`) condition, so you must manually add a subject (`sub`) condition. Edit the trust relationship to add the `sub` field to the validation conditions. For example:
41+
Edit the trust relationship to add the `sub` field to the validation conditions. For example:
4242

4343
```json{:copy}
4444
"Condition": {
4545
"StringEquals": {
46-
"token.actions.githubusercontent.com:aud": "https://github.com/octo-org",
4746
"token.actions.githubusercontent.com:sub": "repo:octo-org/octo-repo:ref:refs/heads/octo-branch"
4847
}
4948
}
@@ -86,7 +85,7 @@ env:
8685
# permission can be added at job level or workflow level
8786
permissions:
8887
id-token: write
89-
contents: write # This is required for actions/checkout@v1
88+
contents: read # This is required for actions/checkout@v1
9089
jobs:
9190
S3PackageUpload:
9291
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)