From 33a385f6d84c16737cfa95629a0a65c01d40f9f0 Mon Sep 17 00:00:00 2001 From: Guilherme Cassolato Date: Wed, 21 Dec 2022 12:18:07 +0100 Subject: [PATCH] docs: User guide 'Authenticated rate limiting with JWTs and Kubernetes authnz' to doc directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `examples/oidc-k8s-auth` → `doc/authenticated-rl-with-jwt-and-k8s-authnz.md` --- README.md | 1 + ...uthenticated-rl-with-jwt-and-k8s-authnz.md | 0 examples/oidc-k8s-auth/ratelimitpolicy.yaml | 30 ------------------- .../authpolicy_jwt-k8s-authnz.yaml} | 0 4 files changed, 1 insertion(+), 30 deletions(-) rename examples/oidc-k8s-auth/README.md => doc/user-guides/authenticated-rl-with-jwt-and-k8s-authnz.md (100%) delete mode 100644 examples/oidc-k8s-auth/ratelimitpolicy.yaml rename examples/{oidc-k8s-auth/authpolicy.yaml => toystore/authpolicy_jwt-k8s-authnz.yaml} (100%) diff --git a/README.md b/README.md index 866bf5fa1..8125c7b6d 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,7 @@ The user guides section of the docs gathers several use-cases as well as the ins * [Simple rate limiting for API owners](doc/user-guides/simple-rl-for-api-owners.md) * [Authenticated rate limiting for API owners](doc/user-guides/authenticated-rl-for-api-owners.md) * [Gateway rate limiting for cluster operators](doc/user-guides/gateway-rl-for-cluster-operators.md) +* [Authenticated rate limiting with JWTs and Kubernetes authnz](doc/user-guides/authenticated-rl-with-jwt-and-k8s-authnz.md) ## [Kuadrant Rate Limiting](/doc/rate-limiting.md) diff --git a/examples/oidc-k8s-auth/README.md b/doc/user-guides/authenticated-rl-with-jwt-and-k8s-authnz.md similarity index 100% rename from examples/oidc-k8s-auth/README.md rename to doc/user-guides/authenticated-rl-with-jwt-and-k8s-authnz.md diff --git a/examples/oidc-k8s-auth/ratelimitpolicy.yaml b/examples/oidc-k8s-auth/ratelimitpolicy.yaml deleted file mode 100644 index 1778f7351..000000000 --- a/examples/oidc-k8s-auth/ratelimitpolicy.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# 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 diff --git a/examples/oidc-k8s-auth/authpolicy.yaml b/examples/toystore/authpolicy_jwt-k8s-authnz.yaml similarity index 100% rename from examples/oidc-k8s-auth/authpolicy.yaml rename to examples/toystore/authpolicy_jwt-k8s-authnz.yaml