trek10inc / awsume

A utility for easily assuming AWS IAM roles from the command line.
https://awsu.me
MIT License
503 stars 91 forks source link

Do not touch the user's shell configuration #133

Open ghost opened 3 years ago

ghost commented 3 years ago

From the docs:

Awsume will make an attempt to place this in a login script such as your ~/.bash_profile or ~/.bashrc when it's being installed, so you may need to restart your terminal or re-source your login file.

It's generally rude for applications to automatically modify a user's custom configuration, especially when using standard utilities like python-setup. Users should be expected to be able to add such functionality themselves - this is a "power tool", after all.

imaginarynik commented 3 years ago

Quick question: Is awsume also storing the temporary tokens in bash_profile/bashrc files?

ghost commented 3 years ago

No, it's all being put in .awsume:

[~]$ tree .awsume/
.awsume/
├── cache
│   └── aws-credentials-XXXXXXXXXXXX
└── config.yaml
mbarneyjr commented 3 years ago

There is a way to prevent awsume from installing the alias on installation through the use of an environment variable (documented here):

AWSUME_SKIP_ALIAS_SETUP=true pipx install awsume

Unfortunately it was released as an "opt-out" as opposed to an "opt-in." Reversing that would be a breaking change, so until a possible awsume version 5, we won't be implementing this just yet

ghost commented 3 years ago

Wouldn't it make sense to keep this ticket open until that's implemented, then?

mbarneyjr commented 3 years ago

Good catch, I'll tag this as version 5 and keep it open