aws-extend-switch-roles icon indicating copy to clipboard operation
aws-extend-switch-roles copied to clipboard

limit displayname to 64 characters (#244)

Open samhpickering opened this issue 3 years ago • 2 comments

This is a potential fix for #244 - display names over 64 characters cause a 400 response when attempting to switch roles. The change truncates the role name when the total display name length would exceed the limit while leaving the account ID whole (if enabled).

samhpickering avatar Jun 23 '22 16:06 samhpickering

Thanks, but I'm thinking it would be better to invalidate profile names that exceed 64 chars in the configuration editor. Once long profile names are allowed, they must be shortened later.

tilfin avatar Jun 26 '22 13:06 tilfin

There are a couple of benefits I saw to this approach:

  1. Full profile names are visible in the popup interface - useful when you have many roles/environments
  2. When enabling/disabling account ID display, profile name length can adjust dynamically

Validation in tandem with automatic shortening might also work well - if the profile names are too long, then warn the user that their profile names will be shortened for display. This would give them the option to shorten them manually if they preferred.

samhpickering avatar Jul 22 '22 13:07 samhpickering