Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support reading AWS token from the filesystem #6997

Merged

Conversation

cmaddalozzo
Copy link
Contributor

Fixes #6724

Why the changes in this PR are needed?

PR #6894 adds support for the AWS container credential provider but it is missing support for providing the token as file via the AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE environment variable. This mechanism is used by EKS pod identities.

What are the changes in this PR?

When using the container credential provider we will attempt to load the token from file if AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE is set. If both AWS_CONTAINER_AUTHORIZATION_TOKEN and AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE are set the former takes precedence.

Notes to assist PR review:

The changes in this PR have been confirmed working in EKS.

plugins/rest/aws.go Outdated Show resolved Hide resolved
Copy link
Member

@ashutosh-narkar ashutosh-narkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ashutosh-narkar ashutosh-narkar merged commit cdd09e5 into open-policy-agent:main Sep 9, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support EKS Pod Identities for Signing S3 Bundle Requests
2 participants