-
Notifications
You must be signed in to change notification settings - Fork 229
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
For AWS Credentials , can we use AWSCredentialsProviderChain . This will provide the credentials if the application running on EC2, ECS, EKS ,etc or from default env variables. #714
Comments
@VisibleForTesting
} |
We have the same problem when using the lib in AWS Lambda. AWS Lambda is using an assumed IAM Role with temporary security credentials and therefore It is not possible to create a valid subject token to be exchanged with sts.googleapis.com. In AWSCredentials the following code exists:
As @sankalpkale88 mentioned the provider chain could be a possible solution. On the other hand the environment variable for the session token in an AWS environment is named "AWS_SESSION_TOKEN" and not "Token" so this could be another approach to fix the issue.
Refer to Python library google-auth-library-python where the processing of temporary security credentials is correctly implemented. Kind regards, |
@oprigan-cgi Could you please confirm if this issue now resolved? Given the one of the possible solutions got implemented. |
Hi team! Is there some plan to implement this? This would allow services deployed on AWS EKS using IRSA to get successfully the GCP tokens using WIF. Thanks! |
Hi @TimurSadykov. Yes, the AWSCredentialsProviderChain. Especially if there are any plans to enhance AwsCredentials class to support reading AWS credentials using WebIdentityTokenFileCredentialsProvider method. I am having a use case that I have my service deployed on AWS EKS cluster which uses IRSA mechanism. Metadata service access is blocked. With the usage of AWSCredentialsProviderChain (especially WebIdentityTokenFileCredentialsProvider) I can get my AWS credentials using the AWS SDK, however the AWSCredentials class from the google-auth-library does not support this method of retrieving credentials. The AWSCredentials class (especially google-auth-library-java/oauth2_http/java/com/google/auth/oauth2/AwsCredentials.java Line 301 in 577e9a5
|
Hi @TimurSadykov , Any update on this ? |
@lsirac could you please comment? |
We're aware of the gaps and will update when we add support for this. |
Hi @TimurSadykov @Isirac, do you have at least some rough ETA, when this could be introduced please? |
@michalstefanext hopefully sometime next week |
Timur means next half :) |
Added support for using a custom implementation to supply AWS security credentials in #1336, released in v1.23.0. |
google-auth-library-java/oauth2_http/java/com/google/auth/oauth2/AwsCredentials.java
Line 272 in aa7ede1
https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/AWSCredentialsProviderChain.html
The text was updated successfully, but these errors were encountered: