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

Add information on regional STS endpoints for IRSA #337

Merged
merged 2 commits into from
Dec 21, 2021

Conversation

lnalex
Copy link

@lnalex lnalex commented Mar 22, 2021

Issue #, if available:
N/A

Description of changes:

IRSA in a private cluster requires the use of STS VPC endpoints. However, most AWS SDKs use the global STS endpoint by default for the STS AssumeRoleWithWebIdentity call, which bypasses the STS VPC endpoint (and hence fails in a private cluster).

To make this work correctly, we may need to explicitly instruct the SDK to use the regional STS endpoint. Usually this is done by passing some environment variables to the container/pod:

      - env:
        - name: AWS_REGION
          value: <REGION>
        - name: AWS_STS_REGIONAL_ENDPOINTS
          value: regional

Relevant info:
aws/amazon-eks-pod-identity-webhook#55 (Note: eks.amazonaws.com/sts-regional-endpoints doesn't appear to be supported yet in EKS)
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts_vpce.html#id_credentials_sts_vpce_create

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

IRSA in a private cluster requires the use of STS VPC endpoints. However, the most AWS SDKs use the global STS endpoint by default for the STS `AssumeRoleWithWebIdentity` call, which bypasses the STS VPC endpoint (and fails in a private cluster).

To make this work correctly, we may need to explicitly instruct the SDK to use the regional STS endpoint. Usually this is done by passing some environment variables:

```yaml
      - env:
        - name: AWS_REGION
          value: <REGION>
        - name: AWS_STS_REGIONAL_ENDPOINTS
          value: regional
```

Relevant info:
aws/amazon-eks-pod-identity-webhook#55 (Note: `eks.amazonaws.com/sts-regional-endpoints` doesn't appear to be supported yet in EKS)
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts_vpce.html#id_credentials_sts_vpce_create
@obrienjason obrienjason merged commit f7bb54c into awsdocs:master Dec 21, 2021
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