common-fate / granted

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

Add --so-scope in hint for granted sso login #619

Closed keymon closed 4 months ago

keymon commented 4 months ago

What changed?

Add -sso-scopes in the login hint if the profile has it set

Example:

$ ./bin/dgranted credential-process --profile myprofile/myrole
[✘] error when retrieving credentials from custom process. please login using 'granted sso login --sso-start-url https://d-....awsapps.com/start --sso-region us-west-2 --sso-scope sso:account:access'

Why?

When running granted without --auto-login, and if the token is expired or missing, it will print a hint. This hint should include --sso-scopes if the profile has this setting as granted_sso_registration_scopes = ...

How did you test it?

Manually, see above

Potential risks

Is patch release candidate?

Link to relevant docs PRs