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

Single Role Being Autoselected if "resolve_aws_alias = True" yet I have 60+ Roles #405

Open
JRman opened this issue May 25, 2023 · 6 comments

Comments

@JRman
Copy link

JRman commented May 25, 2023

If I have "resolve_aws_alias = True" which I DO want to decode my AWS acct ids.. gimme-aws-creds is autoselecting a SINGLE role for me with no prompting: (acct ids and REAL role names redacted)

Detected single role: arn:aws:iam::y:role/test-saml

If I set the same variable False in my .okta_aws_login_config I get the complete role list and prompted:

(I have over 60 roles I cut the list off for brevity... the X denoting the acctid is UNIQUE for each role)

Pick a role:

[0] arn:aws:iam::x:role/test-saml
[1] arn:aws:iam::x:role/othertest-saml
[2] arn:aws:iam::x:role/test-saml
[9] arn:aws:iam::x:role/test-saml
[4] arn:aws:iam::x:role/othertest-saml
[5] arn:aws:iam::x:role/test-saml
[6] arn:aws:iam::x:role/test-saml
[7] arn:aws:iam::x:role/othertest-saml
[8] arn:aws:iam::x:role/test-saml
[9] arn:aws:iam::x:role/test-saml
[10] arn:aws:iam::x:role/test-saml
[11] arn:aws:iam::x:role/test-saml
[12] arn:aws:iam::y:role/test-saml
[19] arn:aws:iam::x:role/test-saml
[14] arn:aws:iam::x:role/test-saml
[15] arn:aws:iam::x:role/test-saml
[16] arn:aws:iam::x:role/test-saml
...

Expected Behavior

Would expect prompting for role regardless of the Alias setting.

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • App Version used:
  • Environment name and version:
  • Operating System and version:
@epierce
Copy link
Member

epierce commented May 26, 2023

Do your accounts have unique aliases? If not, the account data won't get read correctly from the AWS role selection screen. If you do have unique aliases, is there anything that's not typical about your setup (i.e. your accounts are in GovCloud, your machine is set to a non-English locale, etc)? The aliases are scraped out of the AWS role selection screen, so if the HTML elements in your screen are different of some reason, the parser would miss the Account names.

@JRman
Copy link
Author

JRman commented May 26, 2023

Yes, all the aliases are unique.

The REALLY interesting thing, we only see this when run from the CLI on an AWS EC2 instance. If I run this from my laptop it does NOT happen, I get prompted correctly for role even if alias setting is True.

And the "auto selected" role is the ONE role that matches the account where the EC2 instance is deployed.

So not sure what is going on here... Not sure if somewhere the instance role/profile is being used and confusing things?

@epierce
Copy link
Member

epierce commented May 31, 2023

I can't replicate this on an EC2 instance. I thought it might be an environment variable that boto is picking up from the EC2 instance, but I can't find any that would cause that issue.

@JRman
Copy link
Author

JRman commented May 31, 2023

I was looking for any debug flags, etc that maybe I could try, but did not find any....

@solarce
Copy link

solarce commented Aug 21, 2023

I am seeing similar behavior when I have resolve_aws_alias = True and from what I can see, the overall HTML of the AWS page for choosing a role has changed dramatically for me, as of today.

See my redacted screenshot for how it looks for me now,
Amazon Web Services Sign-In_2023-08-21_10 19 13

@joeclarktx
Copy link

I'm seeing this issue as well. i can reproduce it every time i login. it happens when in a Mac, but not on a Windows machine attaching to the same IdP

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

No branches or pull requests

4 participants