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

codecatalyst: fix invalid SSO profile in Dev Env #5005

Merged
merged 1 commit into from
May 16, 2024

Conversation

nkomonen-amazon
Copy link
Contributor

@nkomonen-amazon nkomonen-amazon commented May 15, 2024

Problem:

When a Dev Env is spun up, the AWS Toolkit extension automatically creates an SSO profile in the Dev Env using the the sso session metadata in the ~/.aws/config file.

In the scenario the ~/.aws/config file contained the session for a non-builder id session (IdC), the SSO profile created would be incorrect due to the startUrl and Region being reversed with eachother when the SSO profile was created.

This led to an invalid SSO profile, so any attempts to reauthenticate would fail.

Solution:

correctly create the SSO profile by swapping the args in the method call.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem:

When a Dev Env is spun up, the AWS Toolkit extension automatically creates
an SSO profile in the Dev Env using the the sso session metadata in the ~/.aws/config file.

In the scenario the ~/.aws/config file contained the session for a non-builder id session
the SSO profile created would be incorrect due to the startUrl and Region being reversed
with eachother when the SSO profile was created.

This led to an invalid SSO profile, so any attempts to reauthenticate would fail.

Solution:

correctly create the SSO profile.

Signed-off-by: Nikolas Komonen <nkomonen@amazon.com>
@nkomonen-amazon nkomonen-amazon requested a review from a team as a code owner May 15, 2024 20:30
@nkomonen-amazon nkomonen-amazon merged commit b7bcf11 into aws:master May 16, 2024
16 of 17 checks passed
@nkomonen-amazon nkomonen-amazon deleted the wronDevEnvProfile branch May 16, 2024 00:55
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

Successfully merging this pull request may close these issues.

None yet

2 participants