Skip to content
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

README.md: update reference example #133

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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

Expand Down
Loading