common-fate / granted

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

Using profiles with session set and no start_url fails when trying to assume with `--export-sso-token` #571

Closed cedieio closed 6 months ago

cedieio commented 6 months ago

Using profiles with session set and no sso_start_url fails when trying to assume with --export-sso-token

This is caused by directly referencing profile.AWSConfig.SSOStartURL on ExportAccessTokenToCache, which in this case should use profile.SSOStartURL()

Sample profile config

[sso-session test-session]
sso_region = ap-southeast-2
sso_registration_scopes = sso:account:access
sso_start_url = https://test.com/start#

[profile test-profile]
common_fate_generated_from = aws-sso
sso_account_id = 175914186171
sso_role_name = test-role
sso_session = nine