Skip to content

Use the default AWS credential chain for S3 log storage - #1516

Open
cvas22 wants to merge 1 commit into
tektoncd:mainfrom
cvas22:feat/665-s3-default-credentials
Open

cvas22 wants to merge 1 commit into
tektoncd:mainfrom
cvas22:feat/665-s3-default-credentials

Conversation

@cvas22

@cvas22 cvas22 commented Oct 23, 2026

Copy link
Copy Markdown

Changes

Fixes #665

The S3 log storage always built a static credentials provider from S3_ACCESS_KEY_ID / S3_SECRET_ACCESS_KEY, even when they were empty, which overrode the default AWS credential chain. That made it impossible to use web identity tokens (IRSA), instance profiles or the AWS_* environment variables.

Static credentials are now only used when both values are set. Otherwise LoadDefaultConfig resolves credentials through the default chain, which includes the web identity provider. Existing configurations that set both values behave as before. The README documents that the two variables are optional.

Tests: TestInitConfigCredentials checks that static credentials win when both are set, and that the default chain is used when they are missing or only the key id is set. I could not exercise a real IRSA setup locally.

/kind feature

Submitter Checklist

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Tested your changes locally (unit tests only, no cluster)
  • Follows the commit message standard
  • Meets the Tekton contributor standards
  • Has a kind label
  • Release notes block below has been updated with any user-facing changes
  • Release notes contain the string "action required" if the change requires additional action from users switching to the new release

Release Notes

S3 log storage now uses the default AWS credential chain (for example IRSA web identity) when S3_ACCESS_KEY_ID and S3_SECRET_ACCESS_KEY are not both set.

Only use static credentials when both S3_ACCESS_KEY_ID and
S3_SECRET_ACCESS_KEY are set. Otherwise fall back to the default AWS
credential chain, which allows web identity tokens (IRSA), instance
profiles and the AWS_* environment variables to be used.

Fixes tektoncd#665

Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
@tekton-robot tekton-robot added kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Oct 23, 2026
@tekton-robot
tekton-robot requested review from enarha and khrm October 23, 2026 10:27
@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign khrm after the PR has been reviewed.
You can assign the PR to them by writing /assign @khrm in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: cvas22 / name: Srinivas Chippagiri (e98ed79)

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

S3 client should support AssumeRoleWithWebIdentity

2 participants