common-fate / granted

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

Unclear warning with no way to quiet the error text. #617

Open zwing99 opened 4 months ago

zwing99 commented 4 months ago

when you do not have a suffix you get this warning and there seems to be no way to silence the warning without setting a suffix. Furthermore the docs and warning itself do not make clear the risk. Please allow me to silence the warning AND please make it clear what i should be afraid of.

$ assume coolcompany/Developer
[✔] [coolcompany/Developer](us-east-1) session credentials will expire in 8 hours
[!] No credential suffix found. This can cause issues with using exported credentials if conflicting profiles exist. Run `granted settings export-suffix set` to set one.
[✔] Exported credentials to ~/.aws/credentials file as coolcompany/Developer successfully

https://github.com/common-fate/granted/blob/3ae786ea106e6ec82bb978a3e6f7a0fc381928c2/pkg/assume/assume.go#L531

chrnorm commented 4 months ago

Thanks for the report @zwing99. Could you please share the [profile coolcompany/Developer] block in your ~/.aws/config (redacting any AWS account IDs etc)?

zwing99 commented 4 months ago
[profile coolcompany/Developer]
granted_sso_start_url      = https://coolcompany.awsapps.com/start
granted_sso_region         = us-east-1
granted_sso_account_id     = 3.141592653589793 🤪
granted_sso_role_name      = Developer
common_fate_generated_from = aws-sso
credential_process         = granted credential-process --profile coolcompany/Developer