From fbe4efdcebddacd6a65efea266b04982f64e1063 Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Tue, 5 Nov 2024 09:56:48 +0100 Subject: [PATCH] README.md: update reference example Signed-off-by: Eguzki Astiz Lezaun --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f366693..cb52533 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ services: ratelimit-service: type: ratelimit endpoint: ratelimit-cluster - failureMode: deny + failureMode: allow actionSets: - name: rlp-ns-A/rlp-name-A routeRuleConditions: @@ -29,9 +29,12 @@ actionSets: - request.host == "test.toystore.com" - request.method == "GET" actions: + - service: auth-service + scope: auth-scope-a - service: ratelimit-service - scope: rlp-ns-A/rlp-name-A - conditions: [] + scope: ratelimit-scope-a + predicates: + - auth.identity.anonymous == "true" data: - expression: key: my_header @@ -42,8 +45,8 @@ actionSets: ### CEL Predicates and Expression -`routeRuleConditions`'s `predicate`s are expressed in [Common Expression Language (CEL)](https://cel.dev). `Predicate`s -evaluating to a `bool` value, while `Expression`, used for passing data to a service, evaluate to some `Value`. +`routeRuleConditions`'s `predicate`s are expressed in [Common Expression Language (CEL)](https://cel.dev). `Predicate`s +evaluating to a `bool` value, while `Expression`, used for passing data to a service, evaluate to some `Value`. These expression can operate on the data made available to them through the Well Known Attributes, see below