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

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

Closed
cedieio opened this issue Dec 19, 2023 · 0 comments

Comments

@cedieio
Copy link
Contributor

cedieio commented Dec 19, 2023

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
cedieio added a commit to cedieio/granted that referenced this issue Dec 19, 2023
Use `profile.SSOStartURL()` instead of `profile.AWSConfig.SSOSessionName`
when trying to export credentials. This will fail when the
config does nont have `SSO_START_URL` set on their config.

The `profile.SSOStartURL()` finds it from the session block
which provides the correct URL.

Fix for common-fate#571.
cedieio added a commit to cedieio/granted that referenced this issue Dec 19, 2023
Use `profile.SSOStartURL()` instead of `profile.AWSConfig.SSOSessionName`
when trying to export credentials. This will fail when the
config does nont have `SSO_START_URL` set on their config.

The `profile.SSOStartURL()` finds it from the session block
which provides the correct URL.

Fix for common-fate#571.
JoshuaWilkes pushed a commit that referenced this issue Dec 19, 2023
Use `profile.SSOStartURL()` instead of `profile.AWSConfig.SSOSessionName`
when trying to export credentials. This will fail when the
config does nont have `SSO_START_URL` set on their config.

The `profile.SSOStartURL()` finds it from the session block
which provides the correct URL.

Fix for #571.
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

No branches or pull requests

2 participants