-
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
Add support for a policy resource to Teleport #17220
Conversation
bc849c3
to
a96f953
Compare
Is there an RFD or design doc for this somewhere? Hard to give a meaningful review without more context. I'm hesitant to add something like this to the public API without a clear idea of how the feature as a whole will work. |
IMO if there isn't an RFD yet, this should have its own separate dev branch for now. |
@fspmarshall Seems apt, I've changed the base to a
This PR provides a more practical example of the admin-side of things. |
bf4f74b
to
17f68db
Compare
@xacrimon - this PR is large and will require admin approval to merge. Consider breaking it up into a series smaller changes. |
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.
Code looks fine, just a couple comments on comments and naming. I don't want to block this from merging to a dev branch but I do thing policy
is probably too generic of a name
@xacrimon Investigate if we need to add this resource into the cache system. I seem to remember having to add resources into some giant switch statement whenever I had to do this. |
* add workings for policy resource * add grpc defs for create/get policy * policy resource plumbing * fix some bugs & add tctl get command * add listing code * use a custom api instead of listresources * rename ListPolicies to GetPolicies * update allow/deny/options to be a map of scopes instead * keep option a nonmap * trim policy def * touchups * add rbac checks * revert e ref * rename
This PR adds support for a predicate based policy resource to Teleport. It primarily contains expressions that will be evaluated by a predicate (the internal expression language) based evaluator. This PR pairs with gravitational/predicate-lang#17. See that PR for the practical usage for the resource & commands introduced by this PR.
@klizhentas Should we keep predicate related changes in a separate branch or merge to master?
EDIT: I've changed the target branch to
dev-predicate
.