-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
feat: allow defining iam role session name #155
feat: allow defining iam role session name #155
Conversation
This is a small enhancement that allows overriding the default `assumed-from-leapp` role session name for AWS IAM Chained Sessions. This is useful for organisations that share roles and alert on when someone assumes them and use the role session name to differentiate individuals. This change adjusts the size of the main Electron window slightly to accommodate the new field in the chained session setup page.
I check out the PR and everything seems ok. I have some doubt about the UX as I think it could be better to have a global role session name (so you don't have to set it for each session) or to directly inherit it from the session alias instead to set for each chained role. What do you think? |
A global session name might be a good idea (or the ability to change the default- I wasn't sure how the preferences worked). If I understand how the session alias gets used, I'm not sure that would be ideal because the session alias aligns more with the role a person assumes, while (in our case) the session name has more to do with the person assuming the role. For example, here's the current output for
After this change, it will look something like:
If we used the session alias, it might end up looking like:
Which doesn't resolve the problem of being able to uniquely identify the person who assumed the role. |
I totally agree with this statement which is aligned with the AssumeRole documentation when it talks about RoleSessionName:
So, the RoleSessionName specifies the context in which the Principal assumes a specific Role. @matthewriedel-flux could it be useful to have a Let me know what you think about that :-) |
Imo, the next step is to give the user the possibility to edit old sessions which have no RoleSessionName setup. In the meanwhile I will add a check that fallbacks to "assumed-from-leapp" in case of old sessions |
I think that would be totally fine. I was basing my regex on the documentation on this page: https://aws.amazon.com/blogs/security/easily-control-naming-individual-iam-role-sessions/ and I didn't see |
This is a small enhancement that allows overriding the default `assumed-from-leapp` role session name for AWS IAM Chained Sessions. This is useful for organisations that share roles and alert on when someone assumes them and use the role session name to differentiate individuals. This change adjusts the size of the main Electron window slightly to accommodate the new field in the chained session setup page.
@matthewriedel-flux Is it possible to edit old sessions which have no RoleSessionName configured? |
@joebowbeer : In the version of Leapp this was added to, it wasn't really possible to edit sessions once they were created (at least as far as I could tell), so the easiest thing is to delete and create a new one. I'm not sure if it's possible in the new UX, though, I haven't checked. |
Changelog
This is a small enhancement that allows overriding the default
assumed-from-leapp
role session name for AWS IAM Chained Sessions. Retains the default if undefined.Bugfixes
Enhancements
This is useful for organisations that share roles and alert on when
someone assumes them and use the role session name to differentiate
individuals.
Notes
This change adjusts the size of the main Electron window slightly to
accommodate the new field in the chained session setup page.