Skip to content

Commit a849eb3

Browse files
authored
Merge pull request #3 from code-dot-org/simplify-trust-policy
Simplify trust policy example
2 parents a512d71 + d472b58 commit a849eb3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Or install it yourself as:
2121
## Usage
2222

2323
- Visit the [Google API Console](https://console.developers.google.com/) to create/obtain OAuth 2.0 Client ID credentials (client ID and client secret) for an application in your Google account.
24-
- Create an AWS IAM Role with the desired IAM policies attached, and a 'trust relationship' (`AssumeRolePolicyDocument`) allowing the `sts:AssumeRoleWithWebIdentity` action to be permitted
25-
by your Google Client ID and a specific set of Google Account IDs:
24+
- Create an AWS IAM Role with the desired IAM policies attached, and a ['trust policy'](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#term_trust-policy) ([`AssumeRolePolicyDocument`](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html)) allowing the [`sts:AssumeRoleWithWebIdentity`](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html) action with [Web Identity Federation condition keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#condition-keys-wif) authorizing
25+
your Google Client ID (`accounts.google.com:aud`) and a specific set of Google Account IDs (`accounts.google.com:sub`):
2626

2727
```json
2828
{
@@ -36,9 +36,7 @@ by your Google Client ID and a specific set of Google Account IDs:
3636
"Action": "sts:AssumeRoleWithWebIdentity",
3737
"Condition": {
3838
"StringEquals": {
39-
"accounts.google.com:aud": "123456789012-abcdefghijklmnopqrstuvwzyz0123456.apps.googleusercontent.com"
40-
},
41-
"ForAnyValue:StringEquals": {
39+
"accounts.google.com:aud": "123456789012-abcdefghijklmnopqrstuvwzyz0123456.apps.googleusercontent.com",
4240
"accounts.google.com:sub": [
4341
"000000000000000000000",
4442
"111111111111111111111"

0 commit comments

Comments
 (0)