AdRoll / hologram

Easy, painless AWS credentials on developer laptops.
Apache License 2.0
803 stars 42 forks source link

Role alias system #52

Closed copumpkin closed 7 years ago

copumpkin commented 9 years ago

Instead of having to remember a bunch of ugly ARNs, it would be nice if the hologram CLI tool looked at some sort of config file (could default to ~/.hologram perhaps) that listed human-readable alias mappings for full ARNs. For example:

[Aliases]
prod-zomg = arn:aws:iam::123456789012:role/ZOMG
whoa-wtf = arn:aws:iam::09876543210:role/muahahhaa

Then hologram use prod-zomg would do the obvious thing.

gaylatea commented 9 years ago

A JSON format would probably be better for this, considering that that's the format we use elsewhere. :)

Otherwise, great idea and I'd love to see support for this. :+1:

copumpkin commented 9 years ago

Extending this a step further, I'm thinking we could have separate aliases for account numbers and roles: then instead of putting hyphens in my role aliases, I can make an account alias for prod and type hologram use prod rolefoo. Does that still make sense? It seems like it would allow for more structure across accounts, rather than expecting people to make a cartesian product of role/account pairs (prod-foo, prod-bar, dev-foo, dev-bar, etc.)

walterking commented 7 years ago

Master now has account aliases. With {prod: "arn:aws:iam::123456789012"}, hologram use prod/foo will give you foo role on prod account

https://github.com/AdRoll/hologram#account-aliases