Closed mcintyre321 closed 2 years ago
It is assumed to work the way you describe it, and it was at some point in the past. It seems there is a bug preventing it.
AWS Management Console redirects if you try to go to a URL whose AWS region different than current page. In order to control the redirective request, AESR must have web-request permission. But the permission is difficult to handle, so I won't implement this feature.
First, thanks for this awesome extension, and second, apologies for making a feature request! If by some miracle I find some time, I will see if I can contribute this capability myself.
It would be really great if AWS Console URLs included the account id and/or role to use, and then people following the links could jump into the correct role automatically. I spend a lot of time explaining to people which account role is needed (and how to assume it) when sending them links to view.
I was thinking that the extension could use pushstate to append some querystring parameter whenever the url changes
&aws-extend-switch-roles-accountid=1234566&aws-extend-switch-roles-role=/some/path/and/role
It could then also check that that matches the currently signed in account/role, and if not, redirect the user to the assume role page for the correct account and url.