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

Profiles not loaded correctly #1784

Closed
share-me opened this issue Jun 2, 2021 · 3 comments
Closed

Profiles not loaded correctly #1784

share-me opened this issue Jun 2, 2021 · 3 comments
Labels
auth-credentials authentication, authorization, credentials, AWS Builder ID, sso bug We can reproduce the issue and confirmed it is a bug. needs-response Waiting on reply from issue/PR author.

Comments

@share-me
Copy link

share-me commented Jun 2, 2021

Describe the bug

Only profiles not presents in "config" file are loaded

.aws/config

[profile second-role]
role_arn = arn:aws:iam::000000000000:role/myrole
source_profile = myrole
region = us-east-2

.aws/credentials

[first-role]
output = json
region = us-east-2
aws_access_key_id = secret
aws_secret_access_key = secret
aws_session_token = secret

[second-role]
output = json
region = us-east-2
aws_access_key_id = secret
aws_secret_access_key = secret
aws_session_token = secret

To Reproduce

  1. Click on "Connect to AWS"
  2. Only one profile appears (instead of 5)

Expected behavior

2 profiles

Desktop (please complete the following information):

OS: Windows_NT x64 10.0.18363
Visual Studio Code Extension Host Version: 1.56.2
AWS Toolkit Version: 1.25.0

debug
2021-06-02 15:10:41 [INFO]: AWS Toolkit Version: 1.25.0
2021-06-02 15:36:46 [WARN]: Shared Credentials Profile first-role is not valid. It will not be used by the toolkit. Cycle detected within Shared Credentials Profiles. Reference chain: first-role -> first-role

@share-me share-me added the bug We can reproduce the issue and confirmed it is a bug. label Jun 2, 2021
@share-me share-me changed the title Profiles with more than 27 letters are not populated Profiles not loaded correctly Jun 2, 2021
@justinmk3
Copy link
Contributor

Does it work with aws CLI?

[WARN]: Shared Credentials Profile first-role is not valid. It will not be used by the toolkit. Cycle detected within Shared Credentials Profiles. Reference chain: first-role -> first-role

Doesn't this explain the issue?

For reference, it could be useful to try the artifact from #1766 :

  1. Download and extract buildArtifacts.zip
  2. From the VSCode command list (ctrl-shift-p or cmd-shift-p) run Extensions: Install from VSIX... to install the *.vsix file.
  3. Reload VSCode and verify that the Toolkit has version 1.26 (not the release version 1.25).

@justinmk3 justinmk3 added the auth-credentials authentication, authorization, credentials, AWS Builder ID, sso label Jun 2, 2021
@JadenSimon
Copy link
Contributor

JadenSimon commented Jun 2, 2021

Just to be clear, the profiles in both credentials and config files are combined. That is, the source_profile should never refer to itself. The profile prefix in config files does not mean the profile is different from the credentials profile. In this example, the [profile second-role] and [second-role] parameters are being combined into one and thus self-referencing (assuming myrole is actually second-role).

Some more context would be very helpful in figuring out this bug.

@justinmk3 justinmk3 added the needs-response Waiting on reply from issue/PR author. label Jun 2, 2021
@share-me
Copy link
Author

share-me commented Jun 3, 2021

Just to be clear, the profiles in both credentials and config files are combined. That is, the source_profile should never refer to itself. The profile prefix in config files does not mean the profile is different from the credentials profile. In this example, the [profile second-role] and [second-role] parameters are being combined into one and thus self-referencing (assuming myrole is actually second-role).

Some more context would be very helpful in figuring out this bug.

You were right, i was misusing this parameter..

@share-me share-me closed this as completed Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth-credentials authentication, authorization, credentials, AWS Builder ID, sso bug We can reproduce the issue and confirmed it is a bug. needs-response Waiting on reply from issue/PR author.
Projects
None yet
Development

No branches or pull requests

3 participants