diff --git a/website/docs/policies/authorization-rules.md b/website/docs/policies/authorization-rules.md index 6b6a091..fd45153 100644 --- a/website/docs/policies/authorization-rules.md +++ b/website/docs/policies/authorization-rules.md @@ -90,7 +90,7 @@ spec: status: google.rpc.Status{ code: 7 }, - denied_response: envoy.service.auth.v3.DeniedHttpResponse{ + http_response: envoy.service.auth.v3.DeniedHttpResponse{ status: envoy.type.v3.HttpStatus{ code: 403 } @@ -102,7 +102,7 @@ spec: status: google.rpc.Status{ code: 0 }, - ok_response: envoy.service.auth.v3.OkHttpResponse{} + http_response: envoy.service.auth.v3.OkHttpResponse{} } ``` @@ -114,7 +114,7 @@ This second policy showcases a more advanced example. apiVersion: envoy.kyverno.io/v1alpha1 kind: AuthorizationPolicy metadata: - name: demo-policy.example.com + name: demo spec: variables: - name: force_authorized diff --git a/website/docs/policies/match-conditions.md b/website/docs/policies/match-conditions.md index 0ba6616..a944c65 100644 --- a/website/docs/policies/match-conditions.md +++ b/website/docs/policies/match-conditions.md @@ -19,7 +19,7 @@ spec: failurePolicy: Fail matchConditions: - name: has-header - expression: has(object.attributes.request.http.headers["x-force-deny"]) + expression: object.attributes.request.http.headers[?"x-force-deny"].hasValue() deny: - response: > envoy.Denied(403).Response() diff --git a/website/docs/reference/json-schemas.md b/website/docs/reference/json-schemas.md index e9e98b7..ccb1260 100644 --- a/website/docs/reference/json-schemas.md +++ b/website/docs/reference/json-schemas.md @@ -17,7 +17,7 @@ In VS code, simply add a comment on top of your YAML resources. apiVersion: envoy.kyverno.io/v1alpha1 kind: AuthorizationPolicy metadata: - name: demo-policy.example.com + name: demo spec: variables: - name: force_authorized