feat(aws): use ambient AWS credentials when static keys are empty#349
Merged
Conversation
Enable GitHub OIDC / instance-profile / default-chain credentials for sc deploy & provision: when an aws auth config has no accessKey/secretAccessKey, do NOT pin empty static creds on the Pulumi AWS provider, do NOT blank the AWS_* env vars in the state-store setup, and omit them from the static-website s3-sync command env — falling back to the AWS default credential chain instead. Mirrors the guarded handling already in cloudtrail_validation.go + cloudtrail_security_alerts.go. Fully backward compatible: configs with static keys behave exactly as before. Prereq for de-keying the integrail-deployer-bot service-deploy path via OIDC. Signed-off-by: Dmitrii Creed <creeed22@gmail.com>
Semgrep Scan ResultsRepository:
Scanned at 2026-06-29 17:21 UTC |
Security Scan ResultsRepository:
Scanned at 2026-06-29 17:21 UTC |
📊 Statement coverageMeasured on the documented included set (see
Baseline: |
- provider_test.go: regression tests that InitStateStore preserves ambient AWS_* env when no static keys are configured (the OIDC path), and still exports static keys when present (back-compat). - parent-ecs-fargate guide: note accessKey/secretAccessKey are optional; omitting them falls back to the AWS default credential chain (OIDC / instance profile / env). Signed-off-by: Dmitrii Creed <creeed22@gmail.com>
smecsia
approved these changes
Jun 30, 2026
universe-ops
approved these changes
Jun 30, 2026
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.
When an aws auth config has no `accessKey`/`secretAccessKey`, fall back to the AWS default credential chain (GitHub OIDC web-identity / instance profile / env) instead of pinning empty static creds.
Three spots that previously hard-wired static creds now guard on non-empty:
Mirrors the guarded handling already in `cloudtrail_validation.go` + `cloudtrail_security_alerts.go`.
Backward compatible: configs with static keys behave exactly as before. Prereq for de-keying the service-deploy path (integrail-deployer-bot) via OIDC.