-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pathogen-repo-build: create AWS IAM inline session policy
Adds a repo AWS IAM policy JSON template that is expected to be interpolated with environment variables: - FULL_REPO_NAME - REPO_NAME - PREFIX This is used in the pathogen-repo-build workflow to dynamically create repo specific inline session policy for the runtime AWS session, which will be added in the following commit. The policy template is modified from nextstrain/infra@b1ceb76
- Loading branch information
1 parent
53cced0
commit 67c358d
Showing
4 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid": "ListPublicData", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"s3:ListBucket" | ||
], | ||
"Resource": [ | ||
"arn:aws:s3:::nextstrain-data", | ||
"arn:aws:s3:::nextstrain-staging" | ||
], | ||
"Condition": { | ||
"StringLike": { | ||
"token.actions.githubusercontent.com:aud": "sts.amazonaws.com", | ||
"token.actions.githubusercontent.com:sub": "repo:${FULL_REPO_NAME}:*:job_workflow_ref:nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@*", | ||
"s3:prefix": [ | ||
"files/workflows/${REPO_NAME}/*", | ||
"files/datasets/${REPO_NAME}/*", | ||
"${PREFIX}*.json" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"Sid": "ReadWritePublicData", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"s3:GetObject", | ||
"s3:PutObject" | ||
], | ||
"Resource": [ | ||
"arn:aws:s3:::nextstrain-data/files/workflows/${REPO_NAME}/*", | ||
"arn:aws:s3:::nextstrain-data/files/datasets/${REPO_NAME}/*", | ||
"arn:aws:s3:::nextstrain-data/${PREFIX}*.json", | ||
"arn:aws:s3:::nextstrain-staging/files/workflows/${REPO_NAME}/*", | ||
"arn:aws:s3:::nextstrain-staging/files/datasets/${REPO_NAME}/*", | ||
"arn:aws:s3:::nextstrain-staging/${PREFIX}*.json", | ||
"arn:aws:s3:::nextstrain-staging/trial_*_${PREFIX}*.json" | ||
], | ||
"Condition": { | ||
"StringLike": { | ||
"token.actions.githubusercontent.com:aud": "sts.amazonaws.com", | ||
"token.actions.githubusercontent.com:sub": "repo:${FULL_REPO_NAME}:*:job_workflow_ref:nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@*" | ||
} | ||
} | ||
} | ||
] | ||
} |