feat: AWS OIDC auth composite action (issue #27)#41
Open
ms280690 wants to merge 1 commit into
Open
Conversation
Add aws-oidc-auth composite action wrapping aws-actions/configure-aws-credentials@v6.1.3.
Enforces role-session-name as '{repo}-{run_id}' for CloudTrail traceability.
Calling job requires id-token: write; no static credentials stored.
Add docs/oidc-trust-policies.md with:
- IAM trust policy templates scoped to repo/branch/environment
- GitHub Environments setup for production deployment gating
- Migration checklist for moving from static keys to OIDC
Update approved-actions.md with aws-actions entry and aws-actions/* org allowlist pattern.
Update README with usage example and link to trust policy docs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new aws-oidc-auth composite action that wraps aws-actions/configure-aws-credentials@v6.1.3 to perform short-lived AWS credential exchange via GitHub OIDC, eliminating the need for static AWS keys stored as secrets. Also adds supporting documentation and updates the approved-actions registry. Implements the AWS portion of issue #27 (Pillar 3: Modern Secret Management & Identity Federation); GCP WIF and org-level secret migration are explicitly out of scope.
Changes:
- New
aws-oidc-authcomposite action with pinned SHA, requiredrole-arn/aws-regioninputs, and an enforced{repo}-{run_id}session name (overridable). - New
docs/oidc-trust-policies.mdcovering trust policy templates, scope conditions, environment gating, and a migration checklist. - Approved-actions registry and org allowlist updated to include
aws-actions/configure-aws-credentials/aws-actions/*; README updated with action table entry and usage example.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/actions/aws-oidc-auth/action.yml |
New composite action invoking configure-aws-credentials with traceable session name. |
docs/oidc-trust-policies.md |
New doc with trust-policy template, sub-claim scope table, env setup, and migration checklist. |
docs/approved-actions.md |
Registers aws-actions/configure-aws-credentials and adds aws-actions/* to the org allowlist. |
README.md |
Adds the action to the index and a usage example pointing to the new doc. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+70
to
+71
| | `repo:sparkgeo/app:ref:refs/heads/*` | Any branch (never use for production roles) | | ||
| | `repo:sparkgeo/*` | Any repo in org — avoid | |
| with: | ||
| role-to-assume: ${{ inputs.role-arn }} | ||
| aws-region: ${{ inputs.aws-region }} | ||
| role-session-name: ${{ inputs.role-session-name != '' && inputs.role-session-name || format('{0}-{1}', github.event.repository.name, github.run_id) }} |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
aws-oidc-authcomposite action wrappingaws-actions/configure-aws-credentials@v6.1.3— no static credentials storedrole-session-name: {repo}-{run_id}so every CloudTrail event is traceable to a specific rundocs/oidc-trust-policies.mdwith IAM trust policy templates, GitHub Environments setup, and migration checklistaws-actions/configure-aws-credentialsto approved-actions registry andaws-actions/*to org allowlistUsage
Notes
ci.yml— requires a real IAM role and trust policy in an AWS accountTest plan
docs/oidc-trust-policies.md, use action, verifyaws sts get-caller-identitysucceeds and CloudTrail shows{repo}-{run_id}session namerole-session-nameoverride input works when trust policy requires fixed prefixCloses #27 (composite action + docs deliverable; org-level secret migration is ongoing)
🤖 Generated with Claude Code