-
Notifications
You must be signed in to change notification settings - Fork 170
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 docs for the conditional policy #820
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.
Amazing! I hope we can abstract from the user having to set the "types".
Stupid question: Does the "right" side has types? can we use a regex?
@jmprusi not for now. The only available operations are "==" and "!=". However, we could add operations like "matches" or "starts_with" that work with regexes, if there's a need for it. It should be pretty straightforward. |
If we had Extra operations would also be interesting, ie. I foresee we'll need more things, combining stuff with nands without associativity other than left-to-right or top-down can be hard, but this might be enough for now. |
How about adding the possibility to choose a policy as the one that will be passed responsibility to say yay/nay: "condition": {
"external": {
"name": "a_policy_that_talks_to_a_decision_engine",
"parameters": "all"
}
} |
0bbe480
to
b78fbdb
Compare
@jmprusi regarding the types, I added a clarification in the document. |
I opened a new issue to keep track of the operations that we need to support according to what has been discussed here. Feel free to add more: #821 |
@unleashed That doesn't really fit the policy model we currently have. Each policy needs to implement a function for each of the nginx phases it wants to run on. However, what you need is a method that evaluates a condition and returns a boolean. What you could do is implement your own conditional policy. It would be the same as this one but you could choose to describe and evaluate the conditions as you wish. |
yes at some moment, having a policy that can use for ex. Open Policy Agent would be really cool :) |
No description provided.