-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Remove explicit "deny" from preset "auditor" role, make preset roles V4 #8959
Conversation
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.
LGTM. I think auditor role could be a bit more permissive without loosing the value.
7bc0b61
to
1cf5b27
Compare
Version: types.V3, | ||
Version: types.V4, |
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.
Looks like the editor
role will lose wildcard allow rules for nodes, k8s, etc. Not sure if this is intentional
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 think that makes sense, the intention of these roles seems to be to grant distinct, limited sets of permissions each. If you'd like access, you should create a user with access,editor
. A "superuser" would be one with all three roles.
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.
It probably does make sense I just think we should be careful/intentional with this change as it may break some user's expectations of the editor role (even though this will not affect existing clusters, it could break expectations for new clusters).
Can we confirm this won't break the editor
's ability to edit any labelled resource? I'm not sure if that's even something you can do but worth double checking.
With 8.0 we are already changing admin/auditor so it probably is the time to make this change but I think this is at least worth calling out in the PR description and getting UX sign-off
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.
@nklaassen you're right, with this change editor
role on its own does not allow editing nodes, DBs, etc. Not sure whether should be this case, the description of editor
in the docs is somewhat vague:
Allows editing of cluster configuration settings.
https://goteleport.com/docs/ver/8.0/access-controls/reference/#preset-roles
Alternatively, we could leave these roles on V3, only remove explicit deny
on auditor
. This means auditor
remains with insecure defaults (wildcard labels), but nologin-FOO
and the absence of {{internal.logins}}
should prevent from accidentally granting infra access to auditors.
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 think to edit nodes, DBs, etc., requiring users to have access,editor
makes the most sense and keeps things nicely modular. Whether we slowly deprecate this or remove the default labels now doesn't make much of a difference since it won't affect current clusters and users will have to adapt to these fixed presets sooner or later.
So I agree, let's update the PR description to include this hidden change and get it signed off.
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.
@Joerger thanks for your 2¢, I have updated the description, but I'm not very familiar with the UX review process, could you tag the key people for a review?
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.
IMO we should still update the editor
role to v4. We can either add the explicit wildcard allow labels to keep the existing functionality, or leave them off if we intentionally want the editor
role to be more restricted, I'm not sure which is better but I would view adding the wildcard allow labels as the default, non-change. If we want to remove them that may be valid but is kind of a separate issue. But I think it's fine either way. Last time I needed UX review it's just @klizhentas
…V4 (#8959) * Remove explicit "deny" from preset "auditor" role * Upgrade preset roles to V4
This PR intends to make the
auditor
purely additive and bring the combination of built-inaccess,auditor,editor
roles up to par with the legacyadmin
. The two main goals of this:auditor
role to the account in order to try out session replay and losing permissions to the infra itself is a confusing outcome.Previously, the
auditor
role would explicitlydeny
access to infrastructure, and as such combining it withaccess
took away the permissions granted by theaccess
role. This made sense asv3
roles had laxallow
rules by default (node_labels: {'*': '*'}
). However,v4
roles do notallow
anything implicitly (see Roles V4 PR).By this reasoning, removing
deny
together with moving the roles tov4
should be safe (i.e. not giveauditor
extra permissions), while removing its negative interplay with other built-in roles.Additional impact of this change:
editor
role does not grant access to compute infrastructure by default, theeditor
role by itself is not sufficient to edit nodes, DBs, and other labelled resources. The user must be givenaccess,editor
roles to be able to edit these objects.