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

Profile provider doesn't work with aws configure sso output #741

Closed
GTB3NW opened this issue Feb 16, 2023 · 4 comments
Closed

Profile provider doesn't work with aws configure sso output #741

GTB3NW opened this issue Feb 16, 2023 · 4 comments
Labels
bug This issue is a bug. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days.

Comments

@GTB3NW
Copy link

GTB3NW commented Feb 16, 2023

Describe the bug

The file provider does not work with credentials configured with aws configure sso. Instead you must copy the following fields into the profile (rather than sourcing the session)

  • sso_region
  • sso_start_url
  • sso_registration_scopes

and remove the source of the sso-session. At which point you then have to aws sso login to get some fresh credentials in the cache.

Expected Behavior

Considering this is an official project, the file provider should work with the standardised profile and sso-session configuration

Current Behavior

It does not inherit the settings from the source

Reproduction Steps

  • aws configure sso
  • try use the profile with simple provider snippet
    ^ Bug should be pro

Possible Solution

  • copy sso_region into profile
  • copy sso_start_url into profile
  • copy sso_registration_scopes into profile
  • remove source
  • optionally remove the sso-session
  • aws sso login

manual fix of aws config required to avoid the issue for now, but this should work with standard setups that the aws cli generates

Additional Information/Context

I created my profile as default, but other profile names do not work either. My suspicion is it's the source of the sso-session which it's not merging the required sso fields in

Version

aws-config = "0.54.1"
aws-sdk-ec2 = "0.24.0"
aws-types= "0.54.1"

Environment details (OS name and version, etc.)

aws-cli/2.9.15

Logs

Error: Unhandled(Unhandled { source: ConstructionFailure(ConstructionFailure { source: CredentialsStageError { source: InvalidConfiguration(InvalidConfiguration { source: "ProfileFile provider could not be built: profile default was not defined: sso_region was missing" }) } }) })

@GTB3NW GTB3NW added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 16, 2023
@Velfi
Copy link
Contributor

Velfi commented Feb 17, 2023

Hey @GTB3NW, thanks for submitting this issue. We'll add it to our backlog.

@Velfi Velfi added p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Feb 17, 2023
@ysaito1001
Copy link
Collaborator

Hello, thank you for reporting this! Support for sso-session has not been implemented but we keep track of it via #703. Meanwhile, feel free to submit a PR to add support.

@ysaito1001 ysaito1001 added the response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. label Feb 17, 2023
@GTB3NW
Copy link
Author

GTB3NW commented Feb 17, 2023

Hello, thank you for reporting this! Support for sso-session has not been implemented but we keep track of it via #703. Meanwhile, feel free to submit a PR to add support

Perfect thank you. I'm subscribed to that thread and look forward to it. I'll close this.

@GTB3NW GTB3NW closed this as completed Feb 17, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants