aws / aws-tools-for-powershell

The AWS Tools for PowerShell lets developers and administrators manage their AWS services from the PowerShell scripting environment.
Apache License 2.0
238 stars 79 forks source link

Cannot assume roles interactively through SAML if there are more than 26 options #27

Closed mitchellrj closed 2 years ago

mitchellrj commented 5 years ago

Expected Behavior Assuming a role via SAML should allow the user to use any role in the returned claim.

Current Behavior

  1. Use Set-AWSSamlRoleProfile to authenticate and get a list of roles that may be assumed
  2. The list of roles is displayed in the console, with a letter of the alphabet next to each one, used to select it
  3. After Z, the options are displayed, but there is no means of selecting them.

Possible Solution

Steps to Reproduce (for bugs)

  1. Create and integrate a SAML provider
  2. Create a user credential that returns > 26 values for the role claim
  3. Authenticate via Set-AWSSamlRoleProfile

Context Workaround is to specify the role on the command line using the -PrincipleArn and -RoleArn options, but this is not very user friendly.

Your Environment Include as many relevant details about the environment where the bug was discovered.

bogdanpopey commented 5 years ago

i think this is more an issue than an enhancement :). Thanks Richard for reporting this.

matteo-prosperi commented 4 years ago

PowerShell (PromptForChoice)[https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.host.pshostuserinterface.promptforchoice] capability is limited to shortcuts being a single character and case insensitive.

In order to address this we would need to reimplement PromptForChoice. I will investigate this further.

0ni0nrings commented 4 years ago

hello, any update on this issue? I have got the same problem, I am using AWS tools for PowerShell and have more than 26 roles to assume. The alphabets run out after [Z] and the remaining roles show up without any character.

github-actions[bot] commented 2 years ago

We have noticed this issue has not recieved attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.