tilfinltd / aws-extend-switch-roles

Extend your AWS IAM switching roles by Chrome extension, Firefox add-on, or Edge add-on
https://chromewebstore.google.com/detail/aws-extend-switch-roles/jpmkfafbacpgapdghgdpembnojdlgkdl?utm_source=github
MIT License
1.32k stars 141 forks source link

Enhancement Request - make links with aws console urls work cross-account #143

Closed mcintyre321 closed 2 years ago

mcintyre321 commented 4 years ago

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.

AdrianSimionov commented 4 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.

tilfin commented 2 years ago

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.