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

Credentials are not exported when using --sso flags with a JIT backend #676

Closed
chrnorm opened this issue Jun 4, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@chrnorm
Copy link
Contributor

chrnorm commented Jun 4, 2024

When using Granted with Common Fate, when running the following command:

. assume --sso --sso-start-url https://example.awsapps.com/start --sso-region eu-west-1 --account-id 000000000000 --role-name MyRole

AWS_* credentials are not exported in the shell. Re-running the command a second time does export the credentials.

We need to handling for the --sso flags in Granted so that this command works the first time rather than requiring multiple runs.

Example Granted config to reproduce this issue:

$ cat ~/.granted/config 
DefaultBrowser = "CHROMIUM"
CustomBrowserPath = "/usr/bin/chromium-browser"
CustomSSOBrowserPath = ""
Ordering = ""
ExportCredentialSuffix = ""

An additional note: retrying the command immediately causes it to fail (this is because the account assignment has not yet completed provisioning). Retrying again after ~5s works.

@chrnorm chrnorm added the bug Something isn't working label Jun 4, 2024
@JoshuaWilkes
Copy link
Contributor

This is now working as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants