yannrouillard / aws-sso-profiles-switcher

Browser extension to easily switch between roles available in the AWS Single-Sign-On Portal
Mozilla Public License 2.0
4 stars 0 forks source link

Feature request - customization for the open in Firefox container option #16

Open lolwut405 opened 6 months ago

lolwut405 commented 6 months ago

Would it be possible to include additional customization for the "Open each AWS profile in a dedicated container" option for Firefox?

I would like the container name to be the AWS "accountname" instead of "accountname - rolename"

The container name that gets created is sometimes long. If you ever open the Firefox Multi-Account Container addon, you may see that the container name doesn't fit and it can overlap with your other profiles.

I also use Common-Fate's "Granted" CLI utility. It creates Firefox containers with just the AWS "accountname". I want to reuse existing Firefox containers that were automatically generated from that utility alongside with your extension. Otherwise, I would have duplicate containers within Firefox for each AWS profile. Thank you!

yannrouillard commented 6 months ago

Hey @lolwut405

That's a useful feature indeed, I will look into it. BTW you want to name the profile only accountname, but you can have several roles available for the same account. This would mean several containers with same name. Not a problem for you?

You mentioned Granted" CLI utility, I am curious how you use the extension and this one together (it also has a firefox extension no?). Could you tell me more about it?

lolwut405 commented 6 months ago

Thank you. No issue personally with that. My use case is having to manage many different AWS accounts (like 100 of them) and using a single role (like an admin role). Typically jumping between 2 or 3 accounts at a time.

Granted is really awesome. One feature it has is running a CLI command "assume -c", which prompts you for which AWS profile to choose from (based on your ~/.aws/config file) and then launches a Firefox container for that profile. They have good documentation and they have a screen recording of that workflow on their website

https://www.granted.dev/ https://docs.commonfate.io/granted/usage/console

I like your extension as an alternative to needing to run a command in a terminal. It's kinda lazy to be honest. In some ways I feel like it is saving time/energy by not needing to switch my context (leaving your web browser to run terminal commands). I would still be using Granted if I only needed to run AWS CLI commands and if I was already in the terminal to launch the AWS console.

-- I also like having your extension if you were to click on an account from the AWS access portal webpage to automatically open a container. Which would be somewhat rare, I would rather use the extension popup (via keyboard shortcut).

Last thing I forgot to mention is that I had already customized the colors of my existing Firefox containers (that were originally created from Granted). So for example, I have my PROD environments customized to be a red color. So that's another reason why I would like to reuse/share Firefox containers. I don't pay attention to the colors in the extension popup, but more so the tab highlight color of the Firefox container.

I've tried some other browser extensions (like https://github.com/WTFender/aws-sso-extender) that let you customize the container color based on certain criteria, but I've never felt like it was a must have feature. Granted also lets you do that, but you have to make changes to your AWS config file just for that.