googleapis / googleapis/google-cloud-java

[google-auth-library-java] Workload Identity Federation should support ECS Fargate container credentials

Open
#12,605 4 comments 37 reactions 0 assignees View on GitHub
priority: p3 type: feature request
Dominant language
Java
Stars
2.1k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
154

Description

**Is your feature request related to a problem? Please describe.**
I am trying to use Workload Identity Federation on AWS ECS Fargate. It seems that `AwsCredentials.getAwsSecurityCredentials` ([code](https://github.com/googleapis/google-auth-library-java/blob/acc1ce3603435f1c0cf23b8606af71b05e566f2f/oauth2_http/java/com/google/auth/oauth2/AwsCredentials.java#L319-L325
)) only supports EC2 metadata service and does not support [ECS Fargate container credential URL](https://docs.aws.amazon.com/sdkref/latest/guide/feature-container-credentials.html).

**Describe the solution you'd like**
Google auth SDK should support [ECS Fargate container credential URL](https://docs.aws.amazon.com/sdkref/latest/guide/feature-container-credentials.html) through environment variable `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`.

**Describe alternatives you've considered**
The alternative to use Workload Identity Federation on ECS Fargate is implementing the [REST authentication](https://cloud.google.com/iam/docs/using-workload-identity-federation#rest) myself.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.