-
Notifications
You must be signed in to change notification settings - Fork 5
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
Refactor pluginconfig #87
Conversation
pub conditions: Vec<Condition>, | ||
// | ||
pub data: Vec<DataItem>, | ||
pub conditions: Vec<PatternExpression>, |
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.
@eguzki preferred retaining the name allOf
over conditions
here to be explicit that all conditions must apply. I myself am of the opinion that allOf
suggests there's an anyOf
so I prefer the name conditions
, so would like other thoughts
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.
I think it will eventually (very soon) be called predicates
, right @alexsnaps ?
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.
I think whether these are Predicate
s or PatternExpression
s here is orthogonal to @adam-cattermole 's point. I think he wants to keep the field named allOf
, which indeed eventually will be something else than PatternExpression
s. It would eventually become a cel expression representing a Predicate
indeed, tho, as discussed, how that would look like is probably dependent on what work the Kuadrant Operator does with the initial unparsed expression... if it is parsed entirely, we could inject the AST straight into here (more so if there is an easy way to (de)serialize it to yaml, from Go to Rust) or just pass the String
around...
There's an issue with our design here, we've decoupled the rules from the data and actions, which makes some configurations impossible. We likely should nest the actions within the rules - if rule applies, actions performed with relevant data. Examples:
These two examples are not possible with the current config, as either of the two rules would match, triggering all actions with all of the data. |
related Kuadrant/kuadrant-operator#867 |
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
13357796 | Triggered | Generic High Entropy Secret | 91da443 | utils/deploy/authconfig.yaml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Signed-off-by: Adam Cattermole <acatterm@redhat.com>
Signed-off-by: Adam Cattermole <acatterm@redhat.com>
af3c5c3
to
45d9d84
Compare
Signed-off-by: Adam Cattermole <acatterm@redhat.com>
Signed-off-by: Adam Cattermole <acatterm@redhat.com>
45d9d84
to
9f82574
Compare
Co-authored-by: dd di cesare <didi@posteo.net> Signed-off-by: Adam Cattermole <acatterm@redhat.com>
6da8a24
to
57cb6d6
Compare
Signed-off-by: Adam Cattermole <acatterm@redhat.com>
Signed-off-by: Adam Cattermole <acatterm@redhat.com>
Signed-off-by: Adam Cattermole <acatterm@redhat.com>
I think we need some follow ups to improve performance here, will look to iterate to make things better.. we're also in need of new integration tests for auth, as well as auth + rl.. but it's working |
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.
Great, from here on we can dedicate ourself to do the missing integration tests for auth, multi extension and make it faster/prettier. 💪🏼
Changes
domain
field into the actions and renamedscope
. This is thehost
for auth ContextExtensions anddomain
for ratelimitdata
field in the actions and removed thedata
field in rulesExample:
In progress
filter_state
so it can be retrieved by other actionsfilter_state
Verification:
Use the new guide in the README to verify multi-action setup:
Port-forward envoy and watch the logs for all services:
Test the authenticated rate limiting:
Alice has 5 requests per 10 seconds:
Bob has 2 requests per 10 seconds: