RBAC: conditionally exclude certain labels without a full blown deny #20145
Labels
c-dbl
Internal Customer Reference
c-dc
Internal Customer Reference
c-ju
Internal Customer Reference
c-ns
Internal Customer Reference
c-un
Internal Customer Reference
feature-request
Used for new features in Teleport, improvements to current should be #enhancements
rbac
Issues related to Role Based Access Control
What would you like Teleport to do?
It should be possible for a role to express "allow all except" without using a full-blown deny rule.
What problem does this solve?
A teleport user is supposed to have access to hundreds of resources but needs to submit an access request for a small number of resources only (prod). The labeling strategy for a large number of resources is dynamic and inconsistent enough, that it would be much easier to say "allow all but this". Using a simple deny rule will not work because the deny will still take precedence if this user were to request access to the prod server via access workflows.
If a workaround exists, please include it.
Things that were investigated, but didn't work out.
It looks like no conditional options exist for
node_labels
,db_labels
, and other label allow rules in RoleSpecV5. Potentially, a where/filter could only apply a deny if the user doesn't have the role granted by an access request.Something like
where: !contains(user.spec.roles, "prodrole"
could make the above deny only activate if the user hasn't issued an access request forprodrole
.Use of a negative lookahead assertion in the allow rule. Golang uses re2, which does not support negative lookahead assertions.
The text was updated successfully, but these errors were encountered: