SSO OIDC endpoint uses .amazonaws.com instead of .amazonaws.eu for AWS European Sovereign Cloud regions
#948
masterElmar
started this conversation in
Feature Requests, Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When using
assumewith--ssoflags targeting an AWS European Sovereign Cloud region (e.g.eusc-de-east-1), the SSO OIDCRegisterClientcall fails because Granted constructs the endpoint URL using the.amazonaws.comdomain instead of the correct.amazonaws.eudomain required by the AWS Sovereign Cloud partition.The
AWS_ENDPOINT_URL_SSO_OIDCenvironment variable override has no effect, confirming that Granted does not respect standard AWS SDK endpoint override mechanisms for this call.Granted Version: v0.38.0
Your config:
Steps to replicate:
Working aws cli command:
eusc-de-east-1) with an SSO start URL onidentitycenter.amazonaws.euExpected behavior:
Granted should resolve the correct OIDC endpoint based on the AWS partition. For the
aws-eu-sovcloudpartition, the endpoint must use.amazonaws.eu:This is exactly the endpoint the AWS CLI uses successfully for the same region and credentials.
Additional context:
The AWS CLI handles this correctly —
aws sso login --profile esc-managementresolves and callshttps://oidc.eusc-de-east-1.amazonaws.euwithout any issues. The AWS SDK determines the correct endpoint domain based on the partition (aws-eu-sovcloud), but Granted appears to bypass this logic and hardcodes.amazonaws.comwhen constructing the OIDC endpoint URL.Setting
AWS_ENDPOINT_URL_SSO_OIDC=https://oidc.eusc-de-east-1.amazonaws.euhas no effect, which suggests the endpoint is not being sourced from the SDK's endpoint resolution chain at all.Potential fix:
The OIDC endpoint construction in Granted should delegate to the AWS SDK's endpoint resolver rather than building the URL manually. This would ensure correct behavior across all AWS partitions (
aws,aws-cn,aws-us-gov,aws-eu-sovcloud, etc.) without requiring hardcoded domain suffixes.Workaround:
Authenticate via the AWS CLI first, then use Granted without
--no-cacheto reuse the cached SSO token:All reactions