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: support eks endpoints and auth token file in container creds #1093

Merged
merged 3 commits into from
Oct 31, 2023

Conversation

lucix-aws
Copy link
Contributor

Description of changes

  • Allow specification of EKS container URLS via AWS_CONTAINER_CREDENTIALS_FULL_URI
  • Add support for AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE which is queried on every credentials retrieval for its auth token.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@lucix-aws lucix-aws requested a review from a team as a code owner October 27, 2023 20:34
@github-actions
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK

@github-actions
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK

Comment on lines +162 to 165
// TODO - resolve hostnames
is Host.Domain -> throw ProviderConfigurationException(
"The container credentials full URI ($uri) is specified via hostname which is not currently supported.",
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: Leaving aside the question of full hostname resolution, is it not safe to accept "localhost" here?

Copy link
Contributor

Choose a reason for hiding this comment

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

localhost can be remapped. Obviously at that point you already have bigger issues if your attacker has root access to be able to do such things.

We have a ticket for this #476

@@ -81,7 +78,7 @@ public class EcsCredentialsProvider(
}

val op = SdkHttpOperation.build<Unit, Credentials> {
serializer = EcsCredentialsSerializer(authToken)
serializer = EcsCredentialsSerializer(loadAuthToken())
Copy link
Contributor

Choose a reason for hiding this comment

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

style: I would have left this suspend call as an assignment to authToken as it was

Comment on lines +162 to 165
// TODO - resolve hostnames
is Host.Domain -> throw ProviderConfigurationException(
"The container credentials full URI ($uri) is specified via hostname which is not currently supported.",
)
Copy link
Contributor

Choose a reason for hiding this comment

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

localhost can be remapped. Obviously at that point you already have bigger issues if your attacker has root access to be able to do such things.

We have a ticket for this #476

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 8 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK

@lucix-aws lucix-aws merged commit e95dffa into main Oct 31, 2023
16 checks passed
lucix-aws added a commit that referenced this pull request Oct 31, 2023
@lucix-aws lucix-aws deleted the feat-ekscontainerauth branch October 31, 2023 14:58
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.

3 participants