-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve AWS account aliases (if possible) and print them to the users #39
Conversation
I just had a discussion the other day about this, and how useful it would be. I'm completely in favor of this! I would prefer PR #38 gets in first, and then we can rebase this (I will gladly help). |
Sure thing. I've subscribed #38 and I'll rebase once it's merged. |
Hmmm ... I have to say I like the idea, but I'm a bit uncertain about this implementation. Every time someone authenticates, there's going to be a flood of A couple of alternatives that I can think of quickly:
Let's keep kicking this around a bit ... |
Ok, I see your point. How about scraping AWS account aliases from that
landing page (account selection) presented to the user during login process?
…On 19 Jan 2018 08:26, "Colin Panisset" ***@***.***> wrote:
Hmmm ... I have to say I like the idea, but I'm a bit uncertain about this
implementation. Every time someone authenticates, there's going to be a
flood of sts:AssumeRoleWithSAML calls, whether that account is actually
used or not in the end. That's going to pollute CloudTrail, at the very
least.
A couple of alternatives that I can think of quickly:
- keep an alias of each account in some file under ~/.aws; load it if
it's there, create/update it every time you assume a role in an account so
that it's there for next time (means the first time you use the tool for
each account, it's confusing; and if account names change, you don't see
that until afterwards)
- allow user-assigned aliases for accounts (implementation thoughts
based on hand-waving)
Let's keep kicking this around a bit ...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOhaWkHcvXVbsPSQELb2r7IGAP36UjlPks5tMFGwgaJpZM4Razys>
.
|
aha ... well, as it turns out, that landing page is only presented if you're a browser. For |
@mide this should work with 0.18. |
Awesome! I know I personally would love this feature! |
It works, and it doesn't appreciably slow things down. I like the usability piece, and I like that it's not on-by-default (we can change that later once it's had a bit of time to soak). The one thing I think we can improve is the output; for one example use case, I see:
and I find that the account alias gets lost between the choice number and the ARN. Perhaps using a separator, or more whitespace (or a subset of the ARN, like just the role name without the rest) would make it more readable. How about this as a mock-up:
All I've done is trim the "noise" of the ARN and standardised the whitespace with tabs so that the account aliases are separated from the role names. Other thoughts: Using the
Using the term
I'm happy with the technical implementation, but I'd like to make sure we improve the usability as much as we reasonably can, since that's the purpose of this improvement. |
I really like "@" design but I think that account@role_name would be better (eg my-prod-account@administrator) than role_name@account. |
That's interesting ... I wonder if this is something that (gasp) we should start being aware of from a localisation perspective (is this a cultural difference for precedence in organisational hierarchy?). In my thinking, it's like an email address: user@domain (and so role@account) but I'd be keen to hear whether I'm making a broad assumption about how other languages tend to organise these things (from your perspective, Polish ... right?) |
Right, I don't think this is culturally or lingually related :) In my org, one person might have multiple roles assigned so I thought that might be better to output like this:
rather than this:
but honestly both options look good. I'll test sorting and flip output ot role@account. |
Yeah I see your point -- that is visually a lot cleaner for your use case. So in that case, because I have a gut feeling (not backed up by any research) that use of the
and I'd see:
|
Ok, I've been experimenting with tabulate library. How about something like this:
|
that looks very nice. 👍 |
Alright, here you go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. I'll allow the drop in coverage for this usability piece, because most of it comes from needing to mock out boto3 calls (which we have a good way to do, but isn't really relevant for this PR)
This change allows to print AWS account alias and role ARN when
-a
option is used. It's easier to select correct account when alias is printed, especially when we have set of roles called "Administrator" across accounts.