tilfinltd / aws-extend-switch-roles

Extend your AWS IAM switching roles by Chrome extension, Firefox add-on, or Edge add-on
https://goo.gl/0QFjow
MIT License
1.31k stars 140 forks source link
aws aws-iam chrome-extension firefox-addon switching-roles

AWS Extend Switch Roles

Chrome Web Store Firefox Add-on Edge Add-on

Extend your AWS IAM switching roles by Chrome extension, Firefox add-on, or Edge add-on

Switch role history only stores the last 5 roles (maximum) on the AWS Management Console. This extension shows a menu of switchable roles that you can configure manually.

Large Supporters

Classmethod, Inc.

Development and Distribution Guideline

Minimizes required permissions and operates only on AWS Console pages

A browser plug-in goes with security risks. AWS Management Console allows you to manipulate your essential data.

Supports only the latest version of each official browser

This extension does not restrict the use of other compatible browsers. The version restrictions are only due to the JavaScript language features used.

Install

Configuration

Left-click the extension, click "Configure", enter your configuration in the text box, and click "Save". You can write the configuration in INI format like ~/.aws/config or ~/.aws/credentials.

Simple Configuration

The simplest configuration is for multiple target roles when you always intend to show the whole list. Target roles can be expressed with a role_arn or with both aws_account_id and role_name.

Optional parameters

[profile marketingadmin]
role_arn = arn:aws:iam::123456789012:role/marketingadmin
color = ffaaee

[anotheraccount]
aws_account_id = 987654321987
role_name = anotherrole
region=ap-northeast-1

[athirdaccount]
aws_account_id = 987654321988
role_name = athirdrole
image = "https://via.placeholder.com/150"

Complex Configuration

More complex configurations involve multiple AWS accounts and/or organizations.

[organization1]
aws_account_id = 000011112222
aws_account_alias = your-account-alias ; If your account is aliased

[Org1-Account1-Role1]
role_arn = arn:aws:iam::123456789012:role/Role1
source_profile = organization1

[Org1-Account1-Role2]
aws_account_id = 123456789012
role_name = Role2
source_profile = organization1

[Org1-Account2-Role1]
aws_account_id = 210987654321
role_name = Role1
source_profile = organization1

[baseaccount2]
aws_account_id = 000000000000

[Base2-Role1]
role_arn = arn:aws:iam::234567890123:role/Role1
source_profile = baseaccount2

[AnotherRole]
role_name = SomeOtherRole
aws_account_id = account-3-alias

;
; target_role_name example
;
[Org2-BaseAccount]
aws_account_id = 222200000000
target_role_name = Developer

[Org2-Account1-Developer]
aws_account_id = 222200001111
source_profile = Org2-BaseAccount

[Org2-Account2-Manager]
aws_account_id = 222200002222
role_name = Manager ; overrides target role name
source_profile = Org2-BaseAccount

;
; base account with role_name example
;
[Org3-BaseAccount1]
aws_account_id = 333300000000
role_name = Entry-Role-1 ; Role for Federated Login, or User to login

[Org3-BaseAccount2]
aws_account_id = 333300000000
aws_account_alias = mycompany
role_name = custom_permission-set ; DO NOT set AWSReservedSSO_custom_permission-set_0123456890abcdef

[Org3-Account1-Role1]
aws_account_id = 333300001111
role_name = Role1
source_profile = Org3-BaseAccount1

[Org2-Account2-Role2]
aws_account_id = 222200002222
role_name = Role2
source_profile = Org3-BaseAccount2

If you sign-in a base account, target roles of the other base accounts are excluded.

The 'Show only matching roles' setting is for use with more sophisticated account structures where you're using AWS Organizations with multiple accounts along with AWS Federated Logins via something like Active Directory or Google GSuite. Common practice is to have a role in the master account that is allowed to assume a role of the same name in other member accounts. Checking this box means that if you're logged in to the 'Developer' role in the master account, only member accounts with a role_arn ending in 'role/Developer' will be shown. You won't see roles that your current role can't actually assume.

Settings

Extension API

Appearance

Screen Shot 1

Screen Shot 3