From cf38cac32b7deadab6669df27135b2da2250e080 Mon Sep 17 00:00:00 2001 From: Istio Automation Date: Mon, 4 Oct 2021 19:48:22 -0700 Subject: [PATCH] Automator: update istio.io@ reference docs (#10401) --- .../config/networking/envoy-filter/index.html | 7 +- .../request_authentication/index.html | 65 +++++++++++++++++++ 2 files changed, 66 insertions(+), 6 deletions(-) diff --git a/content/en/docs/reference/config/networking/envoy-filter/index.html b/content/en/docs/reference/config/networking/envoy-filter/index.html index 7fce90b7cb..22049ce7d7 100644 --- a/content/en/docs/reference/config/networking/envoy-filter/index.html +++ b/content/en/docs/reference/config/networking/envoy-filter/index.html @@ -340,12 +340,7 @@ spec: name: my-wasm-extension # This must match the name above config_discovery: config_source: - api_config_source: - api_type: GRPC - transport_api_version: V3 - grpc_services: - - envoy_grpc: - cluster_name: xds-grpc + ads: {} type_urls: ["envoy.extensions.filters.http.wasm.v3.Wasm"] diff --git a/content/en/docs/reference/config/security/request_authentication/index.html b/content/en/docs/reference/config/security/request_authentication/index.html index 32fa68e0d2..995ecc1d78 100644 --- a/content/en/docs/reference/config/security/request_authentication/index.html +++ b/content/en/docs/reference/config/security/request_authentication/index.html @@ -146,6 +146,71 @@ spec: paths: ["/healthz"] + + +

The following example creates the request authentication and authorization policies for JWT validation on ingress +gateway and routes requests based on the “version” claim in the validated JWT.

+ +
apiVersion: security.istio.io/v1beta1
+kind: RequestAuthentication
+metadata:
+  name: jwt-on-ingress
+  namespace: istio-system
+spec:
+ selector:
+   matchLabels:
+     app: istio-ingressgateway
+  jwtRules:
+  - issuer: "issuer-foo"
+    jwksUri: https://example.com/.well-known/jwks.json
+---
+apiVersion: security.istio.io/v1beta1
+kind: AuthorizationPolicy
+metadata:
+  name: require-jwt
+  namespace: istio-system
+spec:
+ selector:
+   matchLabels:
+     app: istio-ingressgateway
+  rules:
+  - from:
+    - source:
+        requestPrincipals: ["*"]
+---
+apiVersion: networking.istio.io/v1alpha3
+kind: VirtualService
+metadata:
+  name: route-jwt
+spec:
+  hosts:
+  - foo.prod.svc.cluster.local
+  gateways:
+  - istio-ingressgateway
+  http:
+  - name: "v2-route"
+    match:
+    - headers:
+        x-jwt-claim.version:
+          exact: "v2"
+    route:
+    - destination:
+        host: foo.prod.svc.cluster.local
+        subset: v2
+  - name: "default-route"
+    route:
+    - destination:
+        host: foo.prod.svc.cluster.local
+        subset: v1
+
+ +

Note: This routing is only supported on Gateways and proper request authentication must first be applied to validate the JWT.

+