-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: feat(rbac): pattern on rbac policy objects
Motivation: There is no way to capture multiple objects in a single policy today and match against it. The outcome is that policies for basic permission, where the objects are not catalog entities, are not fine grained. Either you have permission on an action on all the category, or not at all. For example the workflows that the orchestrator plugin exposes are not a catalog entity. They only have a workflow ID the plugin exposes and there is no way today to deny or allow some of the workflows usage. I.e, this is the permission a workflow have for read: orchestrator.workflow.read, read, allow Modification: The only modification for the rbac plugin is to use a regexp match: [matchers] m = g(r.sub, p.sub) && regexMatch(r.obj, p.obj) && r.act == p.act Result: With this change we have the permission be matched by a regexp: orchestrator.workflow , read, allow // catches all workflow orchestrator.workflow.banned ,read, deny // catches 'banned' workflow id Resolves: #2025 Signed-off-by: Roy Golan <[email protected]>
- Loading branch information
Showing
4 changed files
with
33 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
p, role:default/workflowViewer, orchestrator.workflowInstances.read, read, allow | ||
p, role:default/workflowViewer, orchestrator.workflowInstance.read, read, allow | ||
|
||
p, role:default/workflowAdmin, orchestrator.workflow.read, read, allow | ||
p, role:default/workflowAdmin, orchestrator.workflow.execute, use, allow | ||
p, role:default/workflowAdmin, orchestrator.workflow, read, allow | ||
p, role:default/workflowAdmin, orchestrator.workflow.hello_world, read, deny | ||
|
||
p, role:default/workflowAdmin, orchestrator.workflow, use, allow | ||
p, role:default/workflowAdmin, orchestrator.workflow.ansible, use, deny | ||
|
||
p, role:default/workflowAdmin, orchestrator.workflowInstance.abort, use, allow | ||
p, role:default/workflowAdmin, orchestrator.workflowInstances.read, read, allow | ||
p, role:default/workflowAdmin, orchestrator.workflowInstance.read, read, allow | ||
|
||
g, user:default/guest, role:default/workflowViewer | ||
g, user:default/rgolangh, role:default/workflowAdmin | ||
g, user:development/guest, role:default/workflowAdmin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters