common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
957 stars 90 forks source link

Bug: Region and Start URL not read from sso-session configuration #548

Closed kirnberger1980 closed 7 months ago

kirnberger1980 commented 8 months ago

After an update to version 0.20.0 the following AWS Profile file leads to an error, when using assume command:

[sso-session sso]
sso_start_url=https://myapp.awsapps.com/start
sso_region=eu-central-1
sso_registration_scopes=sso:account:access

[default]
sso_session=sso

[profile superaccount]
sso_session=sso
sso_account_id=00101010101001
sso_role_name=MyRole
region=eu-central-1
output=json
cli_pager=cat

This is the error:

~ assume superaccount
[✘] operation error SSO OIDC: RegisterClient, failed to resolve service endpoint, an AWS region is required, but was not found

If I add sso_start_url and sso_region to the profile superaccount, then the I get no error.

Assumption: sso_start_url and sso_region are not read from sso-session configuration.

shwethaumashanker commented 8 months ago

@kirnberger1980 Thank you for reporting this issue! v0.20.1 includes https://github.com/common-fate/granted/pull/544 which should resolve this issue. Please let me know if it works for you after you do an update.

kirnberger1980 commented 7 months ago

@shwethaumashanker , thanks for the quick reply. We updated to 0.20.2. The update fixed the issue. Thanks a lot.

Kind regards, Marcell