aws-extend-switch-roles
aws-extend-switch-roles copied to clipboard
limit displayname to 64 characters (#244)
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).
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.
There are a couple of benefits I saw to this approach:
- Full profile names are visible in the popup interface - useful when you have many roles/environments
- 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.