-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Added rate limit to OIDC+K8s auth user guide (#121)
- Loading branch information
1 parent
b508fa9
commit 21de0a1
Showing
2 changed files
with
99 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Rate limit policy to protect an API | ||
# Each user ID is entitled to a limit of 5 requests to the API every 10 seconds. | ||
apiVersion: kuadrant.io/v1beta1 | ||
kind: RateLimitPolicy | ||
metadata: | ||
name: toystore-rate-limit | ||
spec: | ||
targetRef: | ||
group: gateway.networking.k8s.io | ||
kind: HTTPRoute | ||
name: toystore | ||
rateLimits: | ||
- configurations: | ||
- actions: | ||
- metadata: | ||
descriptor_key: "userID" | ||
default_value: "no-user" | ||
metadata_key: | ||
key: "envoy.filters.http.ext_authz" | ||
path: | ||
- segment: | ||
key: "ext_auth_data" | ||
- segment: | ||
key: "userID" | ||
limits: | ||
- conditions: [] | ||
maxValue: 5 | ||
seconds: 10 | ||
variables: | ||
- userID |