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 isn't listed, if it contains a dot in the profilename (or maybe other chars) #12

Closed
michaelfecher opened this issue Sep 29, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@michaelfecher
Copy link

Some background details

I'm using the aws-sso-util tool to manage all my SSO profiles.
There's a neat command, called populate which automatically reads all profiles from a specified SSO start URL and stores them in the AWS config.

The AWS config for an autopopulated profile looks like the following:

[profile amazon-aws-cool-account-dev.AWSAdministratorAccess]
sso_start_url = https://foobar.awsapps.com/start
sso_region = eu-west-1
sso_account_name = amazon-aws-cool-account-dev
sso_account_id = 12345
sso_role_name = AWSAdministratorAccess
region = eu-west-1
etc.

Bug description

The bug happens, when I want to add a profile (e.g. amazon-aws-cool-account-dev.AWSAdministratorAccess).
It isn't listed at all.
So I only can add those profiles, if I manually rename all of them (awww!).

Guess it's about the dot (.)
If I manually rename the profile name in my AWS config, it's working out.

@michaelfecher michaelfecher added the bug Something isn't working label Sep 29, 2022
@rehanvdm
Copy link
Contributor

rehanvdm commented Oct 2, 2022

Yeah, I certainly have no test cases that covers names with a dot in them. Should be able to recreate and fix in the next release

@rehanvdm rehanvdm self-assigned this Oct 2, 2022
@rehanvdm rehanvdm moved this to 📖Backlog in Cloud Glance Oct 2, 2022
@rehanvdm rehanvdm moved this from 📖Backlog to 🏗 In progress in Cloud Glance Oct 4, 2022
@rehanvdm
Copy link
Contributor

rehanvdm commented Oct 4, 2022

Turns out that some INI parsers parse a dot in the name as a path indicator used for nesting. The INI parser we are using https://www.npmjs.com/package/ini (30 million downloads) seem to this as well, npm/ini#22. I did a workaround knowing and it seems to be working, even with more dots and deeply nested objects.

image

Fixed, will be in the next release.

@rehanvdm rehanvdm moved this from 🏗 In progress to ✅ Done in Cloud Glance Oct 4, 2022
@rehanvdm
Copy link
Contributor

rehanvdm commented Oct 9, 2022

@rehanvdm rehanvdm closed this as completed Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants