common-fate / granted

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

Values from `session` block does not get exported when using `--export-sso-token` #577

Closed cedieio closed 6 months ago

cedieio commented 6 months ago

When using session on ~/.aws/config the sso_start_url is not exported on the credentials under ~/.aws/sso/cache/

e.g.

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

[profile test-profile]
common_fate_generated_from = aws-sso
sso_account_id =000000000
sso_role_name = test-role

When running assume test-profile --export-sso-token

It gives the following credentials

{
   "accessToken"some_access_token",
   "expiresAt":"2023-12-20T19:31:16+10:00",
   "ssoSessionName":"test-session",
   "startUrl":"",
   "region":""
}