-
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
[state-of-the-world reconciler] Wasm config #822
Comments
@didierofrivia @adam-cattermole @alexsnaps, I could use a sanity check on the description for this one. |
@adam-cattermole wrt your comment on the current refactoring, I'm wondering if we should consider |
If I understood correctly my discussion with others, I was lead to believe that the |
@alexsnaps, a Gateway API HTTPRouteRule may contain multiple HTTPRouteMatches which are This doesn't mean we necessarily have to support Do you have a preference? |
Actually, it is The predicate, as a CEL expression, can express boolean operators as desired. The current design is because expression predicates in yaml is not easy, so we decided to implement something like the following to cover most use cases.
That's the reason why there is only conditions:
- AllOf:
- request.path == /v1
- request.method == GET
- AllOf:
- request.path == /v1
- request.method == POST With CEL, I do not think there is a need for OR'ed predicated or anything like that. One predicate can include internal OR's and AND's. So, maybe something like ---
extensions:
limitador:
type: ratelimit
endpoint: limitador-cluster
failureMode: deny
policies:
- name: rlp-ns-A/rlp-name-A
hostnames:
- '*.toystore.com'
- example.com
rules:
- predicate: CEL_PREDICATE_A
actions:
- extension: limitador
scope: rlp-ns-A/rlp-name-A
data:
- static:
key: A
value: "1"
- selector:
selector: auth.metadata.username
- predicate: CEL_PREDICATE_B
actions:
- extension: limitador
scope: rlp-ns-A/rlp-name-A
data:
- static:
key: B
value: "1"
- selector:
selector: auth.metadata.username The predicate can be string that can be parsed by the CEL parser or some AST. |
I'm OK with Also, as of today (with recent developments on the wasm-shim included), Semantics aside, I agree with the general behaviour described by @eguzki. As for the exact format of the new config, I guess it's TBD. The part that matters the most is This other part from the example, on the other hand, is not strictly needed: - name: rlp-ns-A/rlp-name-A
hostnames:
- '*.toystore.com'
- example.com It may serve to a purpose of indexation inside the config, which I'm fine with should we want to keep it. Just remember that what we call "policies" in the wasm config will no longer map 1:1 to policy resources necessarily, due to merges. |
Sorry, my bad
Maybe better like this? |
Being implemented for Rate Limit in #893 according to Kuadrant/wasm-shim#110 |
Reconciliation of the wasm config for the auth and RL effective policies.
Each path in the topology graph (Gateway → Gateway Listener → HTTPRoute → HTTPRouteRule) and additional top-level conditions, expressed in the form of a predicate (CEL expression), induces a call to a protection service (auth or RL) with a given payload (unique identifier of the policy/policy rules to enforce).
Other than
host
, please refer to HTTPRouteMatch and GRPCRouteMatch respectively for the matching rules to build predicate functions respectively for HTTP and GRPC.Additionally, remove integration from Istio and OSSM regarding register of external authorization service. #814 seems no longer valid and should be closed.
Additionally, remove integration with Envoy Gateway regarding external authorization service (via SecurityPolicy).
The text was updated successfully, but these errors were encountered: