-
Notifications
You must be signed in to change notification settings - Fork 33
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
AuthPolicy top-level conditions based on CEL only #988
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #988 +/- ##
==========================================
+ Coverage 76.15% 76.33% +0.17%
==========================================
Files 111 112 +1
Lines 8986 8995 +9
==========================================
+ Hits 6843 6866 +23
+ Misses 1852 1836 -16
- Partials 291 293 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
9f49a7f
to
a189890
Compare
… cel predicates only Signed-off-by: Guilherme Cassolato <[email protected]>
a189890
to
8ecfdbf
Compare
Confused about that bit… Do you mean that they are all now always |
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.
Side-effect: drop support for named patterns for user-defined top-level conditions in the AuthPolicy; they can still be used for rule-level conditions though.
Would love for us to find a way to eventually define these as functions (CEL) and make these usable by the user in their conditions/expression… 🤔
No, that's not what I meant. This is about merging 2 policies with the Say 2 AuthPolicies specify respectively sets |
… cel predicates only (#988) Signed-off-by: Guilherme Cassolato <[email protected]>
selector, operator, value
user-defined top-level conditions, in favour of using CEL predicates for top-level conditions only.Verification steps
Create a couple policies:
Check the wasm config: (The sets of top-level conditions of each policy go straight into the predicates of the action in the wasm config.)
Expected output
Create a default merge policy:
Check the wasm config: (The set of conditions from the most specific policy wins.)
Expected output
Create an override merge policy:
Check the wasm config: (The set of conditions from the least specific policy wins.)
Expected output