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

region setting dit not work? #201

Closed kawahara-kunio closed 3 years ago

kawahara-kunio commented 3 years ago

The region setting did not work when I switched, which worked before. (Behavior of chrome or AWS was changed?)

setting example

[base_config]
aws_account_id = XXXXXXXXX
target_role_name = SOME_ROLE_NAME

[account_1]
aws_account_id = YYYYYYYYYY
source_profile = base_config
region = us-west-2

[account_2]
aws_account_id = ZZZZZZZZZZ
source_profile = base_config
region = ap-northeast-1

Reproduction procedure

  1. Switch to account_2 and now region is ap-northeast-1.
  2. Switch to account_1 and now region is ap-northeast-1 as it is. But expectation is us-west-2.
tilfin commented 3 years ago

It seems to be caused by a strict change in the CSP of AWS MC.

Refused to send form data to 'https://ap-northeast-1.console.aws.amazon.com/' because it violates the following Content Security Policy directive: "form-action 'self'
 https://console.aws.amazon.com/feedback/submit-feedback 
 https://signin.aws.amazon.com/switchrole
 https://ap-northeast-2.signin.aws.amazon.com/oauth
 https://ap-northeast-2.console.aws.amazon.com/console/home
 https://ap-northeast-2.signin.aws.amazon.com/switchrole".
tilfin commented 3 years ago

This issue will be fixed in v2.1.1.

kawahara-kunio commented 3 years ago

Thanks!

jurgen-weber-deltatre commented 3 years ago

I am on version 2.1.1 but I have this issue (the switching between accounts does not change region.

[A1]
region=ap-south-1
role_arn = arn:aws:iam::3333:role/CrossAccount-Powerusers
[A2]
region=ap-southeast-2
role_arn = arn:aws:iam::2222:role/CrossAccount-Powerusers
[A3]
region=us-west-2
role_arn = arn:aws:iam::1111:role/CrossAccount-Powerusers
[Accounts]
region=us-east-1
role_arn = arn:aws:iam::0000:role/CrossAccount-Platform-Admins