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

feat: container credential provider support auth token #107

Merged
merged 5 commits into from
Feb 28, 2024

Conversation

windmgc
Copy link
Member

@windmgc windmgc commented Feb 26, 2024

Summary

This PR adds support for using authorization token in Container Credential Provider. Container Credential Provider uses two environment variables for the auth token content: AWS_CONTAINER_AUTHORIZATION_TOKEN(for token value) and AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE(for a file path that stores token value). See https://docs.aws.amazon.com/sdkref/latest/guide/feature-container-credentials.html. If one of the token env vars exists, the token value will be used as Authorization header value when requesting credential provider URI.

By adding support for auth token in Container Credential Provider, we can support the latest "Pod Identity" IAM Auth method in AWS EKS. See How EKS Pod Identity works

Reference:
https://github.com/aws/aws-sdk-js/blob/3276faf83e32dfea637797c66a73431affe54e64/lib/credentials/remote_credentials.js#L118C3-L118C18

https://konghq.atlassian.net/browse/KAG-3424

Copy link

github-actions bot commented Feb 26, 2024

Luacheck Report

39 tests    0 ✅  0s ⏱️
 1 suites   0 💤
 1 files    39 ❌

For more details on these failures, see this check.

Results for commit 132762f.

♻️ This comment has been updated with latest results.

@windmgc
Copy link
Member Author

windmgc commented Feb 26, 2024

Here @Tieske

I added back the token environment variable and remove useless comments/TODOs

Copy link
Member

@Tieske Tieske left a comment

Choose a reason for hiding this comment

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

lgtm, but needs a rebase

@windmgc windmgc force-pushed the feat-container-cred-provider-auth branch from cf75f2c to 8ef9c77 Compare February 27, 2024 13:21
@windmgc
Copy link
Member Author

windmgc commented Feb 27, 2024

rebased

@Tieske Tieske merged commit f6a4468 into main Feb 28, 2024
9 checks passed
@Tieske Tieske deleted the feat-container-cred-provider-auth branch February 28, 2024 10:01
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.

2 participants