{
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "Desired policy configuration.",
      "properties": {
        "backend": {
          "description": "Settings for how to connect to destination backends.\n\nA backend policy can target a `Gateway` (optionally, with a\n`sectionName` indicating the listener), `ListenerSet`, `Route`\n(optionally, with a `sectionName` indicating the route rule), or a\n`Service` or `Backend` (optionally, with a `sectionName` indicating the\nnumeric port for `Service`, or sub-backend for `Backend`).\n\nNote that a backend policy applies when connecting to a specific destination backend. Targeting a higher level\nresource, like `Gateway`, is just a way to easily apply a policy to a\ngroup of backends.\n\nWhen multiple policies are selected for a given request, they are merged on a field-level basis, but not a deep\nmerge. Precedence is given to more precise policies: `Gateway` <\n`Listener` < `Route` < `Route Rule` < `Backend` or `Service`. For\nexample, if a `Gateway` policy sets `tcp` and `tls`, and a `Backend`\npolicy sets `tls`, the effective policy would be `tcp` from the\n`Gateway`, and `tls` from the `Backend`.",
          "properties": {
            "ai": {
              "description": "Settings for AI workloads. This is only applicable when\nconnecting to a `Backend` of type `ai`.",
              "properties": {
                "defaults": {
                  "description": "Defaults to merge with user input fields. If the field is already set, the field in the request is used.",
                  "items": {
                    "description": "Default value for a field in the JSON request body sent to the LLM provider.\nThese defaults are merged with the user-provided request to ensure missing fields are populated.\n\nUser input fields here refer to the fields in the JSON request body that a client sends when making a request to the LLM provider.\nDefaults set here do _not_ override those user-provided values unless you explicitly set `override` to `true`.\n\nExample: Setting a default system field for Anthropic, which does not support system role messages:\n\n\tdefaults:\n\t  - field: \"system\"\n\t    value: \"answer all questions in French\"\n\nExample: Setting a default temperature and overriding `max_tokens`:\n\n\tdefaults:\n\t  - field: \"temperature\"\n\t    value: \"0.5\"\n\t  - field: \"max_tokens\"\n\t    value: \"100\"\n\t    override: true\n\nExample: Setting custom lists fields:\n\n\tdefaults:\n\t  - field: \"custom_integer_list\"\n\t    value: [1,2,3]\n\n\toverrides:\n\t  - field: \"custom_string_list\"\n\t    value: [\"one\",\"two\",\"three\"]\n\nNote: The `field` values correspond to keys in the JSON request body, not fields in this CRD.",
                    "properties": {
                      "field": {
                        "description": "Name of the field.",
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      },
                      "value": {
                        "description": "Default value for the field. This can be any JSON data type.",
                        "x-kubernetes-preserve-unknown-fields": true
                      }
                    },
                    "required": [
                      "field",
                      "value"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 64,
                  "minItems": 1,
                  "type": "array"
                },
                "finalTransformations": {
                  "description": "CEL transformations to compute and set fields in the request body.\nThe expression result overwrites any existing value for that field.\nThis has a higher priority than `overrides` if both are set for the same\nkey.\nThose transformations are applied after the request is converted to the provider's format, so they can be used to set provider-specific fields.",
                  "items": {
                    "description": "Maps a request JSON field to a CEL expression.\nThe expression is evaluated against the current request body and its result\nis assigned to the configured field.",
                    "properties": {
                      "expression": {
                        "description": "CEL expression used to compute the field value.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "field": {
                        "description": "Name of the field to set.",
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "expression",
                      "field"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 64,
                  "minItems": 1,
                  "type": "array",
                  "x-kubernetes-list-map-keys": [
                    "field"
                  ],
                  "x-kubernetes-list-type": "map"
                },
                "modelAliases": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Maps friendly model names to actual provider model names.\nExample: `{\"fast\": \"gpt-3.5-turbo\", \"smart\": \"gpt-4-turbo\"}`.\nNote: This field is only applicable when using the agentgateway data plane.",
                  "maxProperties": 64,
                  "type": "object"
                },
                "overrides": {
                  "description": "Overrides to merge with user input fields. If the field is already set, the field is overwritten.",
                  "items": {
                    "description": "Default value for a field in the JSON request body sent to the LLM provider.\nThese defaults are merged with the user-provided request to ensure missing fields are populated.\n\nUser input fields here refer to the fields in the JSON request body that a client sends when making a request to the LLM provider.\nDefaults set here do _not_ override those user-provided values unless you explicitly set `override` to `true`.\n\nExample: Setting a default system field for Anthropic, which does not support system role messages:\n\n\tdefaults:\n\t  - field: \"system\"\n\t    value: \"answer all questions in French\"\n\nExample: Setting a default temperature and overriding `max_tokens`:\n\n\tdefaults:\n\t  - field: \"temperature\"\n\t    value: \"0.5\"\n\t  - field: \"max_tokens\"\n\t    value: \"100\"\n\t    override: true\n\nExample: Setting custom lists fields:\n\n\tdefaults:\n\t  - field: \"custom_integer_list\"\n\t    value: [1,2,3]\n\n\toverrides:\n\t  - field: \"custom_string_list\"\n\t    value: [\"one\",\"two\",\"three\"]\n\nNote: The `field` values correspond to keys in the JSON request body, not fields in this CRD.",
                    "properties": {
                      "field": {
                        "description": "Name of the field.",
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      },
                      "value": {
                        "description": "Default value for the field. This can be any JSON data type.",
                        "x-kubernetes-preserve-unknown-fields": true
                      }
                    },
                    "required": [
                      "field",
                      "value"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 64,
                  "minItems": 1,
                  "type": "array"
                },
                "prompt": {
                  "description": "Enriches requests sent to the LLM provider by appending and prepending system prompts. This can be configured only for\nLLM providers that use the `CHAT` or `CHAT_STREAMING` API route type.",
                  "properties": {
                    "append": {
                      "description": "Messages to append to the prompt sent by the client.",
                      "items": {
                        "description": "An entry for a message to prepend or append to each prompt.",
                        "properties": {
                          "content": {
                            "description": "String content of the message.",
                            "type": "string"
                          },
                          "role": {
                            "description": "Role of the message. The available roles depend on the backend\nLLM provider model, such as `SYSTEM` or `USER` in the OpenAI API.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "content",
                          "role"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "type": "array"
                    },
                    "prepend": {
                      "description": "Messages to prepend to the prompt sent by the client.",
                      "items": {
                        "description": "An entry for a message to prepend or append to each prompt.",
                        "properties": {
                          "content": {
                            "description": "String content of the message.",
                            "type": "string"
                          },
                          "role": {
                            "description": "Role of the message. The available roles depend on the backend\nLLM provider model, such as `SYSTEM` or `USER` in the OpenAI API.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "content",
                          "role"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "type": "array"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "promptCaching": {
                  "description": "Automatic prompt caching for supported\nproviders, currently AWS Bedrock.\nReduces API costs by caching static content like system prompts and tool definitions.\nOnly applicable for Bedrock Claude 3+ and Nova models.",
                  "properties": {
                    "cacheMessageOffset": {
                      "description": "Shifts the message cache point further back in the\nconversation. 0 (default) places it at the second-to-last message.\nHigher values move it N additional messages towards the start, clamped\nto bounds.",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "cacheMessages": {
                      "description": "Enables caching for conversation messages. Defaults to true.\nCaches all messages in the conversation for cost savings.",
                      "type": "boolean"
                    },
                    "cacheSystem": {
                      "description": "Enables caching for system prompts. Defaults to true.\nInserts a cache point after all system messages.",
                      "type": "boolean"
                    },
                    "cacheTools": {
                      "description": "Enables caching for tool definitions. Defaults to false.\nInserts a cache point after all tool specifications.",
                      "type": "boolean"
                    },
                    "minTokens": {
                      "description": "Minimum estimated token count\nbefore caching is enabled. Uses rough heuristic (word count \u00d7 1.3) to estimate tokens.\nDefaults to 1024. Bedrock requires at least 1,024 tokens for caching to be effective.",
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "promptGuard": {
                  "description": "Guardrails for LLM requests and responses.",
                  "properties": {
                    "request": {
                      "description": "Prompt guards to apply to requests sent by the client.",
                      "items": {
                        "description": "Prompt guards to apply to requests sent by the client.",
                        "properties": {
                          "bedrockGuardrails": {
                            "description": "AWS Bedrock Guardrails settings for prompt\nguarding.",
                            "properties": {
                              "action": {
                                "description": "Action controls whether the guardrail's verdict is enforced or only\nobserved. `Reject` (the default) enforces the guardrail: a blocked\nassessment rejects the request/response and an anonymized assessment masks\nthe matched content. `Audit` runs the guardrail in observe mode: it is\ninvoked and its assessment recorded (metrics + structured log), but the\nrequest/response is never blocked or masked.",
                                "enum": [
                                  "Audit",
                                  "Reject"
                                ],
                                "type": "string"
                              },
                              "failureMode": {
                                "description": "Behavior when the provider is unavailable or returns an error.\n`FailOpen` allows the request to continue; `FailClosed` (default) rejects it.",
                                "enum": [
                                  "FailClosed",
                                  "FailOpen"
                                ],
                                "type": "string"
                              },
                              "identifier": {
                                "description": "Identifier of the Guardrail policy to use for the backend.",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              },
                              "policies": {
                                "description": "Policies for communicating with AWS Bedrock Guardrails.",
                                "properties": {
                                  "auth": {
                                    "description": "Settings for authenticating to AWS Bedrock Guardrails.",
                                    "properties": {
                                      "aws": {
                                        "description": "AWS authentication method for Bedrock Guardrails. Use `aws: {}` for\ndefault AWS SDK credential discovery.",
                                        "properties": {
                                          "assumeRole": {
                                            "description": "AWS STS AssumeRole settings to use before signing backend requests.\nAmbient AWS credentials are used as the source credentials for STS.",
                                            "properties": {
                                              "externalId": {
                                                "description": "ExternalID is set when the role's trust policy requires sts:ExternalId.",
                                                "maxLength": 1224,
                                                "minLength": 2,
                                                "pattern": "^[\\w+=,.@:/-]+$",
                                                "type": "string"
                                              },
                                              "roleArn": {
                                                "description": "AWS IAM role ARN to assume.",
                                                "minLength": 1,
                                                "pattern": "^arn:aws[a-z-]*:iam::[0-9]{12}:role/.+$",
                                                "type": "string"
                                              },
                                              "sessionName": {
                                                "description": "SessionName is a custom session name (RoleSessionName) for CloudTrail and\nCost & Usage Report attribution. If unset, AWS generates a random name.",
                                                "pattern": "^[\\w+=,.@-]{2,64}$",
                                                "type": "string"
                                              },
                                              "sessionNameExpression": {
                                                "description": "SessionNameExpression is a CEL expression evaluated against each request\nto produce the session name (RoleSessionName), for example `jwt.sub` or\n`request.headers[\"x-team\"]`. If the expression does not produce a valid\nsession name at request time, the request is rejected.",
                                                "maxLength": 16384,
                                                "minLength": 1,
                                                "type": "string"
                                              },
                                              "tags": {
                                                "description": "Session tags passed to STS AssumeRole for cost attribution in the AWS Cost\n& Usage Report, once activated. STS allows at most 50 per role session.",
                                                "items": {
                                                  "description": "AwsSessionTag is an AWS STS session tag passed to AssumeRole for cost\nattribution. Exactly one of value and expression must be set.",
                                                  "properties": {
                                                    "expression": {
                                                      "description": "CEL expression evaluated against each request to produce the tag value,\nfor example `jwt.sub` or `request.headers[\"x-app\"]`. Requests with invalid\ntag values are rejected.",
                                                      "maxLength": 16384,
                                                      "minLength": 1,
                                                      "type": "string"
                                                    },
                                                    "key": {
                                                      "description": "Key is the tag key.",
                                                      "maxLength": 128,
                                                      "minLength": 1,
                                                      "type": "string"
                                                    },
                                                    "value": {
                                                      "description": "Value is a static tag value.",
                                                      "maxLength": 256,
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "key"
                                                  ],
                                                  "type": "object",
                                                  "x-kubernetes-validations": [
                                                    {
                                                      "message": "exactly one of value or expression must be set",
                                                      "rule": "has(self.value) != has(self.expression)"
                                                    }
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "maxItems": 50,
                                                "type": "array",
                                                "x-kubernetes-list-map-keys": [
                                                  "key"
                                                ],
                                                "x-kubernetes-list-type": "map"
                                              }
                                            },
                                            "required": [
                                              "roleArn"
                                            ],
                                            "type": "object",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "at most one of the fields in [sessionName sessionNameExpression] may be set",
                                                "rule": "(has(self.sessionName)?1:0)+(has(self.sessionNameExpression)?1:0) <= 1"
                                              }
                                            ],
                                            "additionalProperties": false
                                          },
                                          "region": {
                                            "description": "AWS SigV4 signing region, for example `us-east-1`. Set this when the\ntarget AWS service is in a different region than the gateway. If unset,\ntyped AWS backends may provide this automatically; otherwise the ambient\nAWS region is used.",
                                            "maxLength": 256,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "secretRef": {
                                            "description": "Credential source for AWS credentials, defaulting to a Kubernetes `Secret`.\nThe default Secret resolver expects `accessKey`, `secretKey`, and optional\n`sessionToken` keys.",
                                            "properties": {
                                              "group": {
                                                "description": "API group of the referenced credential; empty selects the core API group",
                                                "type": "string"
                                              },
                                              "kind": {
                                                "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                                "type": "string"
                                              },
                                              "name": {
                                                "description": "Name of the referenced credential",
                                                "maxLength": 253,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "x-kubernetes-map-type": "atomic",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "custom credential refs must set both group and kind",
                                                "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                              }
                                            ],
                                            "additionalProperties": false
                                          },
                                          "serviceName": {
                                            "description": "AWS SigV4 signing service name, for example\n`bedrock`, `bedrock-agentcore`, or `execute-api`). If unset, typed AWS\nbackends may provide this automatically.",
                                            "maxLength": 256,
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "type": "object",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "secretRef and assumeRole are mutually exclusive",
                                            "rule": "!(has(self.secretRef) && has(self.assumeRole))"
                                          }
                                        ],
                                        "additionalProperties": false
                                      },
                                      "key": {
                                        "description": "Inline API key to use as the value of the `Authorization` header.\nThis option is the least secure; usage of a `Secret` is preferred.",
                                        "maxLength": 2048,
                                        "type": "string"
                                      },
                                      "location": {
                                        "description": "Where API keys are inserted. Defaults to the `Authorization` header with\nthe `Bearer ` prefix. Applies to `key` and `secretRef`.",
                                        "properties": {
                                          "cookie": {
                                            "properties": {
                                              "name": {
                                                "maxLength": 256,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "additionalProperties": false
                                          },
                                          "header": {
                                            "properties": {
                                              "name": {
                                                "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                                                "maxLength": 256,
                                                "minLength": 1,
                                                "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                                "type": "string"
                                              },
                                              "prefix": {
                                                "maxLength": 256,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "additionalProperties": false
                                          },
                                          "queryParameter": {
                                            "properties": {
                                              "name": {
                                                "maxLength": 256,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "additionalProperties": false
                                          }
                                        },
                                        "type": "object",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "exactly one of the fields in [header queryParameter cookie] must be set",
                                            "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0) == 1"
                                          }
                                        ],
                                        "additionalProperties": false
                                      },
                                      "secretRef": {
                                        "description": "Credential source for the API key, defaulting to a Kubernetes `Secret`.\nBy default, the value is read from the `Authorization` key; set\n`secretRef.key` to override it. A `Bearer ` prefix is stripped only from\nthe default `Authorization` key.",
                                        "properties": {
                                          "group": {
                                            "description": "API group of the referenced credential; empty selects the core API group",
                                            "type": "string"
                                          },
                                          "key": {
                                            "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                            "maxLength": 253,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "kind": {
                                            "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                            "type": "string"
                                          },
                                          "name": {
                                            "description": "Name of the referenced credential",
                                            "maxLength": 253,
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "type": "object",
                                        "x-kubernetes-map-type": "atomic",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "custom credential refs must set both group and kind",
                                            "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                          }
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "location may only be set for key or secretRef auth",
                                        "rule": "has(self.location) ? has(self.key) || has(self.secretRef) : true"
                                      },
                                      {
                                        "message": "exactly one of the fields in [key secretRef aws] must be set",
                                        "rule": "(has(self.key)?1:0)+(has(self.secretRef)?1:0)+(has(self.aws)?1:0) == 1"
                                      }
                                    ],
                                    "additionalProperties": false
                                  },
                                  "http": {
                                    "description": "Settings for managing HTTP requests to the backend",
                                    "properties": {
                                      "requestTimeout": {
                                        "description": "Deadline for receiving a response from the backend.",
                                        "maxLength": 32,
                                        "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                        "type": "string",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "requestTimeout must be at least 1ms",
                                            "rule": "duration(self) >= duration('1ms')"
                                          }
                                        ]
                                      },
                                      "version": {
                                        "description": "HTTP protocol version for backend connections. If unset, it is inferred:\n`Service` appProtocol, `HTTP2` for gRPC, the original protocol for\nplaintext HTTP, or `HTTP1` for HTTPS because clients often upgrade HTTPS\nto HTTP/2 even when the backend does not support it.",
                                        "enum": [
                                          "HTTP1",
                                          "HTTP2"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "type": "object",
                                    "additionalProperties": false
                                  },
                                  "tcp": {
                                    "description": "Settings for managing TCP connections to the backend",
                                    "properties": {
                                      "connectTimeout": {
                                        "description": "Deadline for establishing a connection to\nthe destination.",
                                        "maxLength": 32,
                                        "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                        "type": "string",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "connectTimeout must be at least 100ms",
                                            "rule": "duration(self) >= duration('100ms')"
                                          }
                                        ]
                                      },
                                      "keepalive": {
                                        "description": "Settings for enabling TCP keepalives on the\nconnection.",
                                        "properties": {
                                          "interval": {
                                            "description": "Time between keepalive probes.\nIf unset, this defaults to 180s.",
                                            "maxLength": 32,
                                            "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                            "type": "string",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "interval must be at least 1 second",
                                                "rule": "duration(self) >= duration('1s')"
                                              }
                                            ]
                                          },
                                          "retries": {
                                            "description": "Maximum number of keepalive probes to send before dropping the connection.\nIf unset, this defaults to 9.",
                                            "format": "int32",
                                            "maximum": 64,
                                            "minimum": 1,
                                            "type": "integer"
                                          },
                                          "time": {
                                            "description": "Time a connection needs to be idle before keepalive probes start being sent.\nIf unset, this defaults to 180s.",
                                            "maxLength": 32,
                                            "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                            "type": "string",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "time must be at least 1 second",
                                                "rule": "duration(self) >= duration('1s')"
                                              }
                                            ]
                                          }
                                        },
                                        "type": "object",
                                        "additionalProperties": false
                                      }
                                    },
                                    "type": "object",
                                    "additionalProperties": false
                                  },
                                  "tls": {
                                    "description": "Settings for managing TLS connections to the backend\n\nWhen set, TLS is originated to the backend using the system trusted CA\ncertificates, and SNI is inferred from the destination.",
                                    "properties": {
                                      "alpnProtocols": {
                                        "description": "Application-Layer Protocol Negotiation (`ALPN`)\nvalue to use in the TLS handshake.\n\nIf not present, defaults to `[\"h2\", \"http/1.1\"]`.",
                                        "items": {
                                          "maxLength": 64,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "maxItems": 16,
                                        "minItems": 1,
                                        "type": "array"
                                      },
                                      "caCertificateRefs": {
                                        "description": "CA certificate source to use to verify the server certificate. Omitted kind\nand `ConfigMap` select a ConfigMap; `Secret` selects a Secret. The bundle is\nread from the `ca.crt` key unless `key` names a different one. If unset, the\nsystem's trusted certificates are used.",
                                        "items": {
                                          "description": "LocalCACertificateRef references a same-namespace CA certificate source.\nAn omitted kind defaults to ConfigMap, and an omitted key to `ca.crt`.",
                                          "properties": {
                                            "key": {
                                              "description": "Key within the referenced source holding the PEM-encoded CA bundle.\nOmitted defaults to `ca.crt`.",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "pattern": "^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$",
                                              "type": "string"
                                            },
                                            "kind": {
                                              "description": "Kind of the referenced CA certificate source. Omitted defaults to ConfigMap.",
                                              "enum": [
                                                "ConfigMap",
                                                "Secret"
                                              ],
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Name of the referenced CA certificate source.",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "type": "object",
                                          "x-kubernetes-map-type": "atomic",
                                          "additionalProperties": false
                                        },
                                        "maxItems": 1,
                                        "type": "array",
                                        "x-kubernetes-list-type": "atomic"
                                      },
                                      "certificateSource": {
                                        "description": "Source for the gateway's client identity and trust roots (`Inline` default, or `SPIFFE`).",
                                        "enum": [
                                          "Inline",
                                          "SPIFFE"
                                        ],
                                        "type": "string"
                                      },
                                      "insecureSkipVerify": {
                                        "description": "Originates TLS but skips verification of the backend's certificate\nWARNING: insecure; only use if the risks are understood\n\nModes:\n* `All` disables all TLS verification\n* `Hostname` trusts the CA certificate but ignores hostname/SAN mismatches.\n  Still insecure; prefer `verifySubjectAltNames` where possible.",
                                        "enum": [
                                          "All",
                                          "Hostname"
                                        ],
                                        "type": "string"
                                      },
                                      "keyExchangeGroups": {
                                        "description": "Ordered list of key exchange groups for a TLS connection.\nFor example: `X25519_MLKEM768,X25519`.",
                                        "items": {
                                          "enum": [
                                            "P-256",
                                            "P-384",
                                            "X25519",
                                            "X25519_MLKEM768"
                                          ],
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "mtlsCertificateRef": {
                                        "description": "Enables mutual TLS to the backend using `tls.key` and `tls.crt` from the\nreferenced credential source (defaulting to a Kubernetes `Secret`). An\noptional `ca.cert`, if present, verifies the server certificate, but\n`caCertificateRefs` takes priority. If unspecified, no client certificate\nis used.",
                                        "items": {
                                          "description": "References a same-namespace credential\nSet only `name` for a Kubernetes Secret",
                                          "properties": {
                                            "group": {
                                              "description": "API group of the referenced credential; empty selects the core API group",
                                              "type": "string"
                                            },
                                            "kind": {
                                              "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Name of the referenced credential",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "type": "object",
                                          "x-kubernetes-map-type": "atomic",
                                          "x-kubernetes-validations": [
                                            {
                                              "message": "custom credential refs must set both group and kind",
                                              "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                            }
                                          ],
                                          "additionalProperties": false
                                        },
                                        "maxItems": 1,
                                        "type": "array",
                                        "x-kubernetes-list-type": "atomic"
                                      },
                                      "sni": {
                                        "description": "Server Name Indicator (`SNI`) to use in the TLS\nhandshake. If unset, the `SNI` is automatically set based on the\ndestination hostname.",
                                        "maxLength": 253,
                                        "minLength": 1,
                                        "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                        "type": "string"
                                      },
                                      "verifySubjectAltNames": {
                                        "description": "Subject Alternative Names (`SAN`)\nto verify in the server certificate.\nIf not present, the destination hostname is automatically used.",
                                        "items": {
                                          "maxLength": 256,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "maxItems": 16,
                                        "minItems": 1,
                                        "type": "array"
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "insecureSkipVerify All and caCertificateRefs may not be set together",
                                        "rule": "has(self.insecureSkipVerify) && self.insecureSkipVerify == 'All' ? !has(self.caCertificateRefs) : true"
                                      },
                                      {
                                        "message": "insecureSkipVerify and verifySubjectAltNames may not be set together",
                                        "rule": "has(self.insecureSkipVerify) ? !has(self.verifySubjectAltNames) : true"
                                      },
                                      {
                                        "message": "certificateSource SPIFFE may not be combined with mtlsCertificateRef, caCertificateRefs, or insecureSkipVerify",
                                        "rule": "!has(self.certificateSource) || self.certificateSource != 'SPIFFE' || (!has(self.mtlsCertificateRef) && !has(self.caCertificateRefs) && !has(self.insecureSkipVerify))"
                                      },
                                      {
                                        "message": "at most one of the fields in [verifySubjectAltNames insecureSkipVerify] may be set",
                                        "rule": "(has(self.verifySubjectAltNames)?1:0)+(has(self.insecureSkipVerify)?1:0) <= 1"
                                      }
                                    ],
                                    "additionalProperties": false
                                  },
                                  "tunnel": {
                                    "description": "Settings for managing tunnel connections to the backend, like `HTTPS_PROXY`",
                                    "properties": {
                                      "backendRef": {
                                        "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                                        "properties": {
                                          "group": {
                                            "default": "",
                                            "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                                            "maxLength": 253,
                                            "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                            "type": "string"
                                          },
                                          "kind": {
                                            "default": "Service",
                                            "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                                            "maxLength": 63,
                                            "minLength": 1,
                                            "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                            "type": "string"
                                          },
                                          "name": {
                                            "description": "Name is the name of the referent.",
                                            "maxLength": 253,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "namespace": {
                                            "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                                            "maxLength": 63,
                                            "minLength": 1,
                                            "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                            "type": "string"
                                          },
                                          "port": {
                                            "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                                            "format": "int32",
                                            "maximum": 65535,
                                            "minimum": 1,
                                            "type": "integer"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "type": "object",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "Must have port for Service reference",
                                            "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                                          }
                                        ],
                                        "additionalProperties": false
                                      },
                                      "mode": {
                                        "description": "How requests are sent through the proxy.\nDefaults to `Auto`.",
                                        "enum": [
                                          "Auto",
                                          "Connect"
                                        ],
                                        "type": "string"
                                      },
                                      "url": {
                                        "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                                        "maxLength": 1024,
                                        "minLength": 1,
                                        "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                                        "type": "string"
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "exactly one of the fields in [backendRef url] must be set",
                                        "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                                      },
                                      {
                                        "message": "url must not include a path for backend tunnel",
                                        "rule": "!has(self.url) || self.url.matches('^https?://[^/?#]+$')"
                                      }
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "type": "object",
                                "x-kubernetes-validations": [
                                  {
                                    "message": "at least one of the fields in [auth http tcp tls tunnel] must be set",
                                    "rule": "[has(self.auth),has(self.http),has(self.tcp),has(self.tls),has(self.tunnel)].filter(x,x==true).size() >= 1"
                                  }
                                ],
                                "additionalProperties": false
                              },
                              "region": {
                                "description": "AWS region where the guardrail is deployed, for example\n`us-west-2`).",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              },
                              "version": {
                                "description": "Version of the Guardrail policy to use for the backend.",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "identifier",
                              "region",
                              "version"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "googleModelArmor": {
                            "description": "Google Model Armor settings for prompt guarding.",
                            "properties": {
                              "action": {
                                "description": "Action controls whether flagged content is rejected or only observed.\n`Reject` (the default) rejects flagged content; `Audit` records the\nwould-be rejection without blocking.",
                                "enum": [
                                  "Audit",
                                  "Reject"
                                ],
                                "type": "string"
                              },
                              "failureMode": {
                                "description": "Behavior when the provider is unavailable or returns an error.\n`FailOpen` allows the request to continue; `FailClosed` (default) rejects it.",
                                "enum": [
                                  "FailClosed",
                                  "FailOpen"
                                ],
                                "type": "string"
                              },
                              "location": {
                                "description": "Google Cloud location, for example `us-central1`.\nDefaults to `us-central1` if not specified.",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              },
                              "policies": {
                                "description": "Policies for communicating with Google Model Armor.",
                                "properties": {
                                  "auth": {
                                    "description": "Settings for authenticating to Google Model Armor.",
                                    "properties": {
                                      "gcp": {
                                        "description": "Google authentication method for Model Armor. Use `gcp: {}` for default\nGoogle credential discovery.",
                                        "properties": {
                                          "audience": {
                                            "description": "Explicit `aud` value for the ID token. Only\nvalid with `IdToken` type. If not set, the `aud` is automatically\nderived from the backend hostname.",
                                            "maxLength": 256,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "secretRef": {
                                            "description": "Credential source for ADC-compatible Google credential JSON, defaulting to\na Kubernetes `Secret`. By default, the value is read from\n`credentials.json`; set `secretRef.key` to override it. When omitted,\nambient credentials are used.",
                                            "properties": {
                                              "group": {
                                                "description": "API group of the referenced credential; empty selects the core API group",
                                                "type": "string"
                                              },
                                              "key": {
                                                "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                                "maxLength": 253,
                                                "minLength": 1,
                                                "type": "string"
                                              },
                                              "kind": {
                                                "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                                "type": "string"
                                              },
                                              "name": {
                                                "description": "Name of the referenced credential",
                                                "maxLength": 253,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "x-kubernetes-map-type": "atomic",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "custom credential refs must set both group and kind",
                                                "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                              }
                                            ],
                                            "additionalProperties": false
                                          },
                                          "type": {
                                            "description": "The type of token to generate. To authenticate to GCP services,\ngenerally an `AccessToken` is used. To authenticate to Cloud Run, an\n`IdToken` is used.",
                                            "enum": [
                                              "AccessToken",
                                              "IdToken"
                                            ],
                                            "type": "string"
                                          }
                                        },
                                        "type": "object",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "audience is only valid with IdToken",
                                            "rule": "has(self.audience) ? self.type == 'IdToken' : true"
                                          }
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "exactly one of the fields in [gcp] must be set",
                                        "rule": "(has(self.gcp)?1:0) == 1"
                                      }
                                    ],
                                    "additionalProperties": false
                                  },
                                  "http": {
                                    "description": "Settings for managing HTTP requests to the backend",
                                    "properties": {
                                      "requestTimeout": {
                                        "description": "Deadline for receiving a response from the backend.",
                                        "maxLength": 32,
                                        "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                        "type": "string",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "requestTimeout must be at least 1ms",
                                            "rule": "duration(self) >= duration('1ms')"
                                          }
                                        ]
                                      },
                                      "version": {
                                        "description": "HTTP protocol version for backend connections. If unset, it is inferred:\n`Service` appProtocol, `HTTP2` for gRPC, the original protocol for\nplaintext HTTP, or `HTTP1` for HTTPS because clients often upgrade HTTPS\nto HTTP/2 even when the backend does not support it.",
                                        "enum": [
                                          "HTTP1",
                                          "HTTP2"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "type": "object",
                                    "additionalProperties": false
                                  },
                                  "tcp": {
                                    "description": "Settings for managing TCP connections to the backend",
                                    "properties": {
                                      "connectTimeout": {
                                        "description": "Deadline for establishing a connection to\nthe destination.",
                                        "maxLength": 32,
                                        "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                        "type": "string",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "connectTimeout must be at least 100ms",
                                            "rule": "duration(self) >= duration('100ms')"
                                          }
                                        ]
                                      },
                                      "keepalive": {
                                        "description": "Settings for enabling TCP keepalives on the\nconnection.",
                                        "properties": {
                                          "interval": {
                                            "description": "Time between keepalive probes.\nIf unset, this defaults to 180s.",
                                            "maxLength": 32,
                                            "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                            "type": "string",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "interval must be at least 1 second",
                                                "rule": "duration(self) >= duration('1s')"
                                              }
                                            ]
                                          },
                                          "retries": {
                                            "description": "Maximum number of keepalive probes to send before dropping the connection.\nIf unset, this defaults to 9.",
                                            "format": "int32",
                                            "maximum": 64,
                                            "minimum": 1,
                                            "type": "integer"
                                          },
                                          "time": {
                                            "description": "Time a connection needs to be idle before keepalive probes start being sent.\nIf unset, this defaults to 180s.",
                                            "maxLength": 32,
                                            "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                            "type": "string",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "time must be at least 1 second",
                                                "rule": "duration(self) >= duration('1s')"
                                              }
                                            ]
                                          }
                                        },
                                        "type": "object",
                                        "additionalProperties": false
                                      }
                                    },
                                    "type": "object",
                                    "additionalProperties": false
                                  },
                                  "tls": {
                                    "description": "Settings for managing TLS connections to the backend\n\nWhen set, TLS is originated to the backend using the system trusted CA\ncertificates, and SNI is inferred from the destination.",
                                    "properties": {
                                      "alpnProtocols": {
                                        "description": "Application-Layer Protocol Negotiation (`ALPN`)\nvalue to use in the TLS handshake.\n\nIf not present, defaults to `[\"h2\", \"http/1.1\"]`.",
                                        "items": {
                                          "maxLength": 64,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "maxItems": 16,
                                        "minItems": 1,
                                        "type": "array"
                                      },
                                      "caCertificateRefs": {
                                        "description": "CA certificate source to use to verify the server certificate. Omitted kind\nand `ConfigMap` select a ConfigMap; `Secret` selects a Secret. The bundle is\nread from the `ca.crt` key unless `key` names a different one. If unset, the\nsystem's trusted certificates are used.",
                                        "items": {
                                          "description": "LocalCACertificateRef references a same-namespace CA certificate source.\nAn omitted kind defaults to ConfigMap, and an omitted key to `ca.crt`.",
                                          "properties": {
                                            "key": {
                                              "description": "Key within the referenced source holding the PEM-encoded CA bundle.\nOmitted defaults to `ca.crt`.",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "pattern": "^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$",
                                              "type": "string"
                                            },
                                            "kind": {
                                              "description": "Kind of the referenced CA certificate source. Omitted defaults to ConfigMap.",
                                              "enum": [
                                                "ConfigMap",
                                                "Secret"
                                              ],
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Name of the referenced CA certificate source.",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "type": "object",
                                          "x-kubernetes-map-type": "atomic",
                                          "additionalProperties": false
                                        },
                                        "maxItems": 1,
                                        "type": "array",
                                        "x-kubernetes-list-type": "atomic"
                                      },
                                      "certificateSource": {
                                        "description": "Source for the gateway's client identity and trust roots (`Inline` default, or `SPIFFE`).",
                                        "enum": [
                                          "Inline",
                                          "SPIFFE"
                                        ],
                                        "type": "string"
                                      },
                                      "insecureSkipVerify": {
                                        "description": "Originates TLS but skips verification of the backend's certificate\nWARNING: insecure; only use if the risks are understood\n\nModes:\n* `All` disables all TLS verification\n* `Hostname` trusts the CA certificate but ignores hostname/SAN mismatches.\n  Still insecure; prefer `verifySubjectAltNames` where possible.",
                                        "enum": [
                                          "All",
                                          "Hostname"
                                        ],
                                        "type": "string"
                                      },
                                      "keyExchangeGroups": {
                                        "description": "Ordered list of key exchange groups for a TLS connection.\nFor example: `X25519_MLKEM768,X25519`.",
                                        "items": {
                                          "enum": [
                                            "P-256",
                                            "P-384",
                                            "X25519",
                                            "X25519_MLKEM768"
                                          ],
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "mtlsCertificateRef": {
                                        "description": "Enables mutual TLS to the backend using `tls.key` and `tls.crt` from the\nreferenced credential source (defaulting to a Kubernetes `Secret`). An\noptional `ca.cert`, if present, verifies the server certificate, but\n`caCertificateRefs` takes priority. If unspecified, no client certificate\nis used.",
                                        "items": {
                                          "description": "References a same-namespace credential\nSet only `name` for a Kubernetes Secret",
                                          "properties": {
                                            "group": {
                                              "description": "API group of the referenced credential; empty selects the core API group",
                                              "type": "string"
                                            },
                                            "kind": {
                                              "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Name of the referenced credential",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "type": "object",
                                          "x-kubernetes-map-type": "atomic",
                                          "x-kubernetes-validations": [
                                            {
                                              "message": "custom credential refs must set both group and kind",
                                              "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                            }
                                          ],
                                          "additionalProperties": false
                                        },
                                        "maxItems": 1,
                                        "type": "array",
                                        "x-kubernetes-list-type": "atomic"
                                      },
                                      "sni": {
                                        "description": "Server Name Indicator (`SNI`) to use in the TLS\nhandshake. If unset, the `SNI` is automatically set based on the\ndestination hostname.",
                                        "maxLength": 253,
                                        "minLength": 1,
                                        "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                        "type": "string"
                                      },
                                      "verifySubjectAltNames": {
                                        "description": "Subject Alternative Names (`SAN`)\nto verify in the server certificate.\nIf not present, the destination hostname is automatically used.",
                                        "items": {
                                          "maxLength": 256,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "maxItems": 16,
                                        "minItems": 1,
                                        "type": "array"
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "insecureSkipVerify All and caCertificateRefs may not be set together",
                                        "rule": "has(self.insecureSkipVerify) && self.insecureSkipVerify == 'All' ? !has(self.caCertificateRefs) : true"
                                      },
                                      {
                                        "message": "insecureSkipVerify and verifySubjectAltNames may not be set together",
                                        "rule": "has(self.insecureSkipVerify) ? !has(self.verifySubjectAltNames) : true"
                                      },
                                      {
                                        "message": "certificateSource SPIFFE may not be combined with mtlsCertificateRef, caCertificateRefs, or insecureSkipVerify",
                                        "rule": "!has(self.certificateSource) || self.certificateSource != 'SPIFFE' || (!has(self.mtlsCertificateRef) && !has(self.caCertificateRefs) && !has(self.insecureSkipVerify))"
                                      },
                                      {
                                        "message": "at most one of the fields in [verifySubjectAltNames insecureSkipVerify] may be set",
                                        "rule": "(has(self.verifySubjectAltNames)?1:0)+(has(self.insecureSkipVerify)?1:0) <= 1"
                                      }
                                    ],
                                    "additionalProperties": false
                                  },
                                  "tunnel": {
                                    "description": "Settings for managing tunnel connections to the backend, like `HTTPS_PROXY`",
                                    "properties": {
                                      "backendRef": {
                                        "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                                        "properties": {
                                          "group": {
                                            "default": "",
                                            "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                                            "maxLength": 253,
                                            "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                            "type": "string"
                                          },
                                          "kind": {
                                            "default": "Service",
                                            "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                                            "maxLength": 63,
                                            "minLength": 1,
                                            "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                            "type": "string"
                                          },
                                          "name": {
                                            "description": "Name is the name of the referent.",
                                            "maxLength": 253,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "namespace": {
                                            "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                                            "maxLength": 63,
                                            "minLength": 1,
                                            "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                            "type": "string"
                                          },
                                          "port": {
                                            "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                                            "format": "int32",
                                            "maximum": 65535,
                                            "minimum": 1,
                                            "type": "integer"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "type": "object",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "Must have port for Service reference",
                                            "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                                          }
                                        ],
                                        "additionalProperties": false
                                      },
                                      "mode": {
                                        "description": "How requests are sent through the proxy.\nDefaults to `Auto`.",
                                        "enum": [
                                          "Auto",
                                          "Connect"
                                        ],
                                        "type": "string"
                                      },
                                      "url": {
                                        "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                                        "maxLength": 1024,
                                        "minLength": 1,
                                        "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                                        "type": "string"
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "exactly one of the fields in [backendRef url] must be set",
                                        "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                                      },
                                      {
                                        "message": "url must not include a path for backend tunnel",
                                        "rule": "!has(self.url) || self.url.matches('^https?://[^/?#]+$')"
                                      }
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "type": "object",
                                "x-kubernetes-validations": [
                                  {
                                    "message": "at least one of the fields in [auth http tcp tls tunnel] must be set",
                                    "rule": "[has(self.auth),has(self.http),has(self.tcp),has(self.tls),has(self.tunnel)].filter(x,x==true).size() >= 1"
                                  }
                                ],
                                "additionalProperties": false
                              },
                              "projectId": {
                                "description": "Google Cloud project ID.",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              },
                              "templateId": {
                                "description": "Template ID for Google Model Armor.",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "projectId",
                              "templateId"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "openAIModeration": {
                            "description": "Passes prompt data through the OpenAI Moderations\nendpoint.\nSee https://developers.openai.com/api/reference/resources/moderations for more information.",
                            "properties": {
                              "action": {
                                "description": "Action controls whether flagged content is rejected or only observed.\n`Reject` (the default) rejects flagged content; `Audit` records the\nwould-be rejection without blocking.",
                                "enum": [
                                  "Audit",
                                  "Reject"
                                ],
                                "type": "string"
                              },
                              "failureMode": {
                                "description": "Behavior when the provider is unavailable or returns an error.\n`FailOpen` allows the request to continue; `FailClosed` (default) rejects it.",
                                "enum": [
                                  "FailClosed",
                                  "FailOpen"
                                ],
                                "type": "string"
                              },
                              "model": {
                                "description": "Moderation model to use. For example,\n`omni-moderation`.",
                                "type": "string"
                              },
                              "policies": {
                                "description": "Policies for communicating with OpenAI.",
                                "properties": {
                                  "auth": {
                                    "description": "Settings for authenticating to OpenAI.",
                                    "properties": {
                                      "key": {
                                        "description": "Inline key to use as the value of the\n`Authorization` header. This option is the least secure; usage of a\n`Secret` is preferred.",
                                        "maxLength": 2048,
                                        "type": "string"
                                      },
                                      "location": {
                                        "description": "Where backend credentials are inserted. Defaults to the `Authorization`\nheader with the `Bearer ` prefix. Applies to `key` and `secretRef`.",
                                        "properties": {
                                          "cookie": {
                                            "properties": {
                                              "name": {
                                                "maxLength": 256,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "additionalProperties": false
                                          },
                                          "header": {
                                            "properties": {
                                              "name": {
                                                "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                                                "maxLength": 256,
                                                "minLength": 1,
                                                "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                                "type": "string"
                                              },
                                              "prefix": {
                                                "maxLength": 256,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "additionalProperties": false
                                          },
                                          "queryParameter": {
                                            "properties": {
                                              "name": {
                                                "maxLength": 256,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "additionalProperties": false
                                          }
                                        },
                                        "type": "object",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "exactly one of the fields in [header queryParameter cookie] must be set",
                                            "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0) == 1"
                                          }
                                        ],
                                        "additionalProperties": false
                                      },
                                      "secretRef": {
                                        "description": "Credential source for the authorization value, defaulting to a Kubernetes\n`Secret`. By default, the value is read from the `Authorization` key; set\n`secretRef.key` to override it. A `Bearer ` prefix is stripped only from\nthe default `Authorization` key.",
                                        "properties": {
                                          "group": {
                                            "description": "API group of the referenced credential; empty selects the core API group",
                                            "type": "string"
                                          },
                                          "key": {
                                            "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                            "maxLength": 253,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "kind": {
                                            "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                            "type": "string"
                                          },
                                          "name": {
                                            "description": "Name of the referenced credential",
                                            "maxLength": 253,
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "type": "object",
                                        "x-kubernetes-map-type": "atomic",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "custom credential refs must set both group and kind",
                                            "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                          }
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "exactly one of the fields in [key secretRef] must be set",
                                        "rule": "(has(self.key)?1:0)+(has(self.secretRef)?1:0) == 1"
                                      }
                                    ],
                                    "additionalProperties": false
                                  },
                                  "http": {
                                    "description": "Settings for managing HTTP requests to the backend",
                                    "properties": {
                                      "requestTimeout": {
                                        "description": "Deadline for receiving a response from the backend.",
                                        "maxLength": 32,
                                        "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                        "type": "string",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "requestTimeout must be at least 1ms",
                                            "rule": "duration(self) >= duration('1ms')"
                                          }
                                        ]
                                      },
                                      "version": {
                                        "description": "HTTP protocol version for backend connections. If unset, it is inferred:\n`Service` appProtocol, `HTTP2` for gRPC, the original protocol for\nplaintext HTTP, or `HTTP1` for HTTPS because clients often upgrade HTTPS\nto HTTP/2 even when the backend does not support it.",
                                        "enum": [
                                          "HTTP1",
                                          "HTTP2"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "type": "object",
                                    "additionalProperties": false
                                  },
                                  "tcp": {
                                    "description": "Settings for managing TCP connections to the backend",
                                    "properties": {
                                      "connectTimeout": {
                                        "description": "Deadline for establishing a connection to\nthe destination.",
                                        "maxLength": 32,
                                        "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                        "type": "string",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "connectTimeout must be at least 100ms",
                                            "rule": "duration(self) >= duration('100ms')"
                                          }
                                        ]
                                      },
                                      "keepalive": {
                                        "description": "Settings for enabling TCP keepalives on the\nconnection.",
                                        "properties": {
                                          "interval": {
                                            "description": "Time between keepalive probes.\nIf unset, this defaults to 180s.",
                                            "maxLength": 32,
                                            "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                            "type": "string",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "interval must be at least 1 second",
                                                "rule": "duration(self) >= duration('1s')"
                                              }
                                            ]
                                          },
                                          "retries": {
                                            "description": "Maximum number of keepalive probes to send before dropping the connection.\nIf unset, this defaults to 9.",
                                            "format": "int32",
                                            "maximum": 64,
                                            "minimum": 1,
                                            "type": "integer"
                                          },
                                          "time": {
                                            "description": "Time a connection needs to be idle before keepalive probes start being sent.\nIf unset, this defaults to 180s.",
                                            "maxLength": 32,
                                            "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                            "type": "string",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "time must be at least 1 second",
                                                "rule": "duration(self) >= duration('1s')"
                                              }
                                            ]
                                          }
                                        },
                                        "type": "object",
                                        "additionalProperties": false
                                      }
                                    },
                                    "type": "object",
                                    "additionalProperties": false
                                  },
                                  "tls": {
                                    "description": "Settings for managing TLS connections to the backend\n\nWhen set, TLS is originated to the backend using the system trusted CA\ncertificates, and SNI is inferred from the destination.",
                                    "properties": {
                                      "alpnProtocols": {
                                        "description": "Application-Layer Protocol Negotiation (`ALPN`)\nvalue to use in the TLS handshake.\n\nIf not present, defaults to `[\"h2\", \"http/1.1\"]`.",
                                        "items": {
                                          "maxLength": 64,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "maxItems": 16,
                                        "minItems": 1,
                                        "type": "array"
                                      },
                                      "caCertificateRefs": {
                                        "description": "CA certificate source to use to verify the server certificate. Omitted kind\nand `ConfigMap` select a ConfigMap; `Secret` selects a Secret. The bundle is\nread from the `ca.crt` key unless `key` names a different one. If unset, the\nsystem's trusted certificates are used.",
                                        "items": {
                                          "description": "LocalCACertificateRef references a same-namespace CA certificate source.\nAn omitted kind defaults to ConfigMap, and an omitted key to `ca.crt`.",
                                          "properties": {
                                            "key": {
                                              "description": "Key within the referenced source holding the PEM-encoded CA bundle.\nOmitted defaults to `ca.crt`.",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "pattern": "^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$",
                                              "type": "string"
                                            },
                                            "kind": {
                                              "description": "Kind of the referenced CA certificate source. Omitted defaults to ConfigMap.",
                                              "enum": [
                                                "ConfigMap",
                                                "Secret"
                                              ],
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Name of the referenced CA certificate source.",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "type": "object",
                                          "x-kubernetes-map-type": "atomic",
                                          "additionalProperties": false
                                        },
                                        "maxItems": 1,
                                        "type": "array",
                                        "x-kubernetes-list-type": "atomic"
                                      },
                                      "certificateSource": {
                                        "description": "Source for the gateway's client identity and trust roots (`Inline` default, or `SPIFFE`).",
                                        "enum": [
                                          "Inline",
                                          "SPIFFE"
                                        ],
                                        "type": "string"
                                      },
                                      "insecureSkipVerify": {
                                        "description": "Originates TLS but skips verification of the backend's certificate\nWARNING: insecure; only use if the risks are understood\n\nModes:\n* `All` disables all TLS verification\n* `Hostname` trusts the CA certificate but ignores hostname/SAN mismatches.\n  Still insecure; prefer `verifySubjectAltNames` where possible.",
                                        "enum": [
                                          "All",
                                          "Hostname"
                                        ],
                                        "type": "string"
                                      },
                                      "keyExchangeGroups": {
                                        "description": "Ordered list of key exchange groups for a TLS connection.\nFor example: `X25519_MLKEM768,X25519`.",
                                        "items": {
                                          "enum": [
                                            "P-256",
                                            "P-384",
                                            "X25519",
                                            "X25519_MLKEM768"
                                          ],
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "mtlsCertificateRef": {
                                        "description": "Enables mutual TLS to the backend using `tls.key` and `tls.crt` from the\nreferenced credential source (defaulting to a Kubernetes `Secret`). An\noptional `ca.cert`, if present, verifies the server certificate, but\n`caCertificateRefs` takes priority. If unspecified, no client certificate\nis used.",
                                        "items": {
                                          "description": "References a same-namespace credential\nSet only `name` for a Kubernetes Secret",
                                          "properties": {
                                            "group": {
                                              "description": "API group of the referenced credential; empty selects the core API group",
                                              "type": "string"
                                            },
                                            "kind": {
                                              "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Name of the referenced credential",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "type": "object",
                                          "x-kubernetes-map-type": "atomic",
                                          "x-kubernetes-validations": [
                                            {
                                              "message": "custom credential refs must set both group and kind",
                                              "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                            }
                                          ],
                                          "additionalProperties": false
                                        },
                                        "maxItems": 1,
                                        "type": "array",
                                        "x-kubernetes-list-type": "atomic"
                                      },
                                      "sni": {
                                        "description": "Server Name Indicator (`SNI`) to use in the TLS\nhandshake. If unset, the `SNI` is automatically set based on the\ndestination hostname.",
                                        "maxLength": 253,
                                        "minLength": 1,
                                        "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                        "type": "string"
                                      },
                                      "verifySubjectAltNames": {
                                        "description": "Subject Alternative Names (`SAN`)\nto verify in the server certificate.\nIf not present, the destination hostname is automatically used.",
                                        "items": {
                                          "maxLength": 256,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "maxItems": 16,
                                        "minItems": 1,
                                        "type": "array"
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "insecureSkipVerify All and caCertificateRefs may not be set together",
                                        "rule": "has(self.insecureSkipVerify) && self.insecureSkipVerify == 'All' ? !has(self.caCertificateRefs) : true"
                                      },
                                      {
                                        "message": "insecureSkipVerify and verifySubjectAltNames may not be set together",
                                        "rule": "has(self.insecureSkipVerify) ? !has(self.verifySubjectAltNames) : true"
                                      },
                                      {
                                        "message": "certificateSource SPIFFE may not be combined with mtlsCertificateRef, caCertificateRefs, or insecureSkipVerify",
                                        "rule": "!has(self.certificateSource) || self.certificateSource != 'SPIFFE' || (!has(self.mtlsCertificateRef) && !has(self.caCertificateRefs) && !has(self.insecureSkipVerify))"
                                      },
                                      {
                                        "message": "at most one of the fields in [verifySubjectAltNames insecureSkipVerify] may be set",
                                        "rule": "(has(self.verifySubjectAltNames)?1:0)+(has(self.insecureSkipVerify)?1:0) <= 1"
                                      }
                                    ],
                                    "additionalProperties": false
                                  },
                                  "tunnel": {
                                    "description": "Settings for managing tunnel connections to the backend, like `HTTPS_PROXY`",
                                    "properties": {
                                      "backendRef": {
                                        "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                                        "properties": {
                                          "group": {
                                            "default": "",
                                            "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                                            "maxLength": 253,
                                            "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                            "type": "string"
                                          },
                                          "kind": {
                                            "default": "Service",
                                            "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                                            "maxLength": 63,
                                            "minLength": 1,
                                            "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                            "type": "string"
                                          },
                                          "name": {
                                            "description": "Name is the name of the referent.",
                                            "maxLength": 253,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "namespace": {
                                            "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                                            "maxLength": 63,
                                            "minLength": 1,
                                            "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                            "type": "string"
                                          },
                                          "port": {
                                            "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                                            "format": "int32",
                                            "maximum": 65535,
                                            "minimum": 1,
                                            "type": "integer"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "type": "object",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "Must have port for Service reference",
                                            "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                                          }
                                        ],
                                        "additionalProperties": false
                                      },
                                      "mode": {
                                        "description": "How requests are sent through the proxy.\nDefaults to `Auto`.",
                                        "enum": [
                                          "Auto",
                                          "Connect"
                                        ],
                                        "type": "string"
                                      },
                                      "url": {
                                        "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                                        "maxLength": 1024,
                                        "minLength": 1,
                                        "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                                        "type": "string"
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "exactly one of the fields in [backendRef url] must be set",
                                        "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                                      },
                                      {
                                        "message": "url must not include a path for backend tunnel",
                                        "rule": "!has(self.url) || self.url.matches('^https?://[^/?#]+$')"
                                      }
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "type": "object",
                                "x-kubernetes-validations": [
                                  {
                                    "message": "at least one of the fields in [auth http tcp tls tunnel] must be set",
                                    "rule": "[has(self.auth),has(self.http),has(self.tcp),has(self.tls),has(self.tunnel)].filter(x,x==true).size() >= 1"
                                  }
                                ],
                                "additionalProperties": false
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "regex": {
                            "description": "Regular expression (regex) matching for prompt guards and data masking.",
                            "properties": {
                              "action": {
                                "description": "The action to take if a regex pattern is matched in a request or response.\nThe action applies to request and response matches alike. Note that\n`Mask` is not applied to streamed responses: matched content in a\nstreamed response is passed through unmodified.\nDefaults to `Mask`.",
                                "enum": [
                                  "Audit",
                                  "Mask",
                                  "Reject"
                                ],
                                "type": "string"
                              },
                              "builtins": {
                                "description": "Built-in regex patterns to match against the request or response.\nMatches and built-ins are additive.",
                                "items": {
                                  "description": "Built-in regex patterns for specific types of strings in prompts.\nFor example, if you specify `CreditCard`, any credit card numbers\nin the request or response are matched.",
                                  "enum": [
                                    "CaSin",
                                    "CreditCard",
                                    "Email",
                                    "PhoneNumber",
                                    "Ssn"
                                  ],
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "matches": {
                                "description": "Regex patterns to match against the request or response.\nMatches and built-ins are additive.",
                                "items": {
                                  "maxLength": 1024,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "response": {
                            "description": "Custom response message to return to the client. If not specified, defaults to\n`The request was rejected due to inappropriate content`.",
                            "properties": {
                              "message": {
                                "description": "Custom response message to return to the client. If not specified, defaults to\n`The request was rejected due to inappropriate content`.",
                                "type": "string"
                              },
                              "statusCode": {
                                "description": "Status code to return to the client. Defaults to 403.",
                                "format": "int32",
                                "maximum": 599,
                                "minimum": 200,
                                "type": "integer"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "scope": {
                            "description": "Which parts of the request this guard inspects. When unset, defaults to\n`SystemPrompt` and `Messages`. Tool call inputs and outputs are not\ninspected unless `ToolInput`/`ToolOutput` are listed explicitly.\nIn APIs that send tool arguments as opaque JSON, such as Completions, the\narguments are masked as a single string, meaning a prompt guard has the\npotential to rewrite the arguments into invalid JSON.",
                            "items": {
                              "description": "Which category of request content a prompt guard inspects.",
                              "enum": [
                                "Messages",
                                "SystemPrompt",
                                "ToolInput",
                                "ToolOutput"
                              ],
                              "type": "string"
                            },
                            "maxItems": 4,
                            "minItems": 1,
                            "type": "array",
                            "x-kubernetes-list-type": "set"
                          },
                          "webhook": {
                            "description": "Webhook that receives requests for prompt guarding.",
                            "properties": {
                              "action": {
                                "description": "Action controls whether the webhook's verdict is enforced or only observed.\n`Reject` (the default) enforces it; `Audit` records the would-be action\nwithout blocking or masking.",
                                "enum": [
                                  "Audit",
                                  "Reject"
                                ],
                                "type": "string"
                              },
                              "backendRef": {
                                "description": "Webhook server to reach.\n\nSupported types: Service and Backend.",
                                "properties": {
                                  "group": {
                                    "default": "",
                                    "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                                    "maxLength": 253,
                                    "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                    "type": "string"
                                  },
                                  "kind": {
                                    "default": "Service",
                                    "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                    "type": "string"
                                  },
                                  "name": {
                                    "description": "Name is the name of the referent.",
                                    "maxLength": 253,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "namespace": {
                                    "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                    "type": "string"
                                  },
                                  "port": {
                                    "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                                    "format": "int32",
                                    "maximum": 65535,
                                    "minimum": 1,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "type": "object",
                                "x-kubernetes-validations": [
                                  {
                                    "message": "Must have port for Service reference",
                                    "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                                  }
                                ],
                                "additionalProperties": false
                              },
                              "failureMode": {
                                "description": "Behavior when the webhook guardrail is unavailable\nor returns an error. `FailOpen` allows the request to continue.\n`FailClosed` (default) rejects the request.",
                                "enum": [
                                  "FailClosed",
                                  "FailOpen"
                                ],
                                "type": "string"
                              },
                              "forwardHeaderMatches": {
                                "description": "HTTP header matches used to select the headers to forward to the webhook.\nRequest headers are used when forwarding requests and response headers\nare used when forwarding responses.\nBy default, no headers are forwarded.",
                                "items": {
                                  "description": "HTTPHeaderMatch describes how to select a HTTP route by matching HTTP request\nheaders.",
                                  "properties": {
                                    "name": {
                                      "description": "Name of the HTTP header to match, case-insensitive. When names are equivalent, only the first matching entry is used",
                                      "maxLength": 256,
                                      "minLength": 1,
                                      "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                      "type": "string"
                                    },
                                    "type": {
                                      "default": "Exact",
                                      "description": "How to match against the header value: `Exact` (default) or `RegularExpression`. The regex dialect is implementation-specific",
                                      "enum": [
                                        "Exact",
                                        "RegularExpression"
                                      ],
                                      "type": "string"
                                    },
                                    "value": {
                                      "description": "Value of the HTTP header to match",
                                      "maxLength": 4096,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "value"
                                  ],
                                  "type": "object",
                                  "additionalProperties": false
                                },
                                "type": "array"
                              },
                              "headers": {
                                "additionalProperties": {
                                  "description": "A Common Expression Language (CEL) expression.",
                                  "maxLength": 16384,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "description": "CEL-computed headers to include in webhook requests.",
                                "maxProperties": 64,
                                "type": "object"
                              }
                            },
                            "required": [
                              "backendRef"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "type": "object",
                        "x-kubernetes-validations": [
                          {
                            "message": "scope: only regex and bedrockGuardrails guards support a non-default scope; other guard kinds always inspect the default (SystemPrompt + Messages)",
                            "rule": "!has(self.scope) || has(self.regex) || has(self.bedrockGuardrails) || (self.scope.size() == 2 && 'SystemPrompt' in self.scope && 'Messages' in self.scope)"
                          },
                          {
                            "message": "exactly one of the fields in [regex webhook openAIModeration bedrockGuardrails googleModelArmor] must be set",
                            "rule": "(has(self.regex)?1:0)+(has(self.webhook)?1:0)+(has(self.openAIModeration)?1:0)+(has(self.bedrockGuardrails)?1:0)+(has(self.googleModelArmor)?1:0) == 1"
                          }
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 8,
                      "minItems": 1,
                      "type": "array"
                    },
                    "response": {
                      "description": "Prompt guards to apply to responses returned by the LLM provider.",
                      "items": {
                        "description": "Prompt guards to apply to responses returned by the LLM provider.",
                        "properties": {
                          "bedrockGuardrails": {
                            "description": "AWS Bedrock Guardrails settings for prompt\nguarding.",
                            "properties": {
                              "action": {
                                "description": "Action controls whether the guardrail's verdict is enforced or only\nobserved. `Reject` (the default) enforces the guardrail: a blocked\nassessment rejects the request/response and an anonymized assessment masks\nthe matched content. `Audit` runs the guardrail in observe mode: it is\ninvoked and its assessment recorded (metrics + structured log), but the\nrequest/response is never blocked or masked.",
                                "enum": [
                                  "Audit",
                                  "Reject"
                                ],
                                "type": "string"
                              },
                              "failureMode": {
                                "description": "Behavior when the provider is unavailable or returns an error.\n`FailOpen` allows the request to continue; `FailClosed` (default) rejects it.",
                                "enum": [
                                  "FailClosed",
                                  "FailOpen"
                                ],
                                "type": "string"
                              },
                              "identifier": {
                                "description": "Identifier of the Guardrail policy to use for the backend.",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              },
                              "policies": {
                                "description": "Policies for communicating with AWS Bedrock Guardrails.",
                                "properties": {
                                  "auth": {
                                    "description": "Settings for authenticating to AWS Bedrock Guardrails.",
                                    "properties": {
                                      "aws": {
                                        "description": "AWS authentication method for Bedrock Guardrails. Use `aws: {}` for\ndefault AWS SDK credential discovery.",
                                        "properties": {
                                          "assumeRole": {
                                            "description": "AWS STS AssumeRole settings to use before signing backend requests.\nAmbient AWS credentials are used as the source credentials for STS.",
                                            "properties": {
                                              "externalId": {
                                                "description": "ExternalID is set when the role's trust policy requires sts:ExternalId.",
                                                "maxLength": 1224,
                                                "minLength": 2,
                                                "pattern": "^[\\w+=,.@:/-]+$",
                                                "type": "string"
                                              },
                                              "roleArn": {
                                                "description": "AWS IAM role ARN to assume.",
                                                "minLength": 1,
                                                "pattern": "^arn:aws[a-z-]*:iam::[0-9]{12}:role/.+$",
                                                "type": "string"
                                              },
                                              "sessionName": {
                                                "description": "SessionName is a custom session name (RoleSessionName) for CloudTrail and\nCost & Usage Report attribution. If unset, AWS generates a random name.",
                                                "pattern": "^[\\w+=,.@-]{2,64}$",
                                                "type": "string"
                                              },
                                              "sessionNameExpression": {
                                                "description": "SessionNameExpression is a CEL expression evaluated against each request\nto produce the session name (RoleSessionName), for example `jwt.sub` or\n`request.headers[\"x-team\"]`. If the expression does not produce a valid\nsession name at request time, the request is rejected.",
                                                "maxLength": 16384,
                                                "minLength": 1,
                                                "type": "string"
                                              },
                                              "tags": {
                                                "description": "Session tags passed to STS AssumeRole for cost attribution in the AWS Cost\n& Usage Report, once activated. STS allows at most 50 per role session.",
                                                "items": {
                                                  "description": "AwsSessionTag is an AWS STS session tag passed to AssumeRole for cost\nattribution. Exactly one of value and expression must be set.",
                                                  "properties": {
                                                    "expression": {
                                                      "description": "CEL expression evaluated against each request to produce the tag value,\nfor example `jwt.sub` or `request.headers[\"x-app\"]`. Requests with invalid\ntag values are rejected.",
                                                      "maxLength": 16384,
                                                      "minLength": 1,
                                                      "type": "string"
                                                    },
                                                    "key": {
                                                      "description": "Key is the tag key.",
                                                      "maxLength": 128,
                                                      "minLength": 1,
                                                      "type": "string"
                                                    },
                                                    "value": {
                                                      "description": "Value is a static tag value.",
                                                      "maxLength": 256,
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "key"
                                                  ],
                                                  "type": "object",
                                                  "x-kubernetes-validations": [
                                                    {
                                                      "message": "exactly one of value or expression must be set",
                                                      "rule": "has(self.value) != has(self.expression)"
                                                    }
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "maxItems": 50,
                                                "type": "array",
                                                "x-kubernetes-list-map-keys": [
                                                  "key"
                                                ],
                                                "x-kubernetes-list-type": "map"
                                              }
                                            },
                                            "required": [
                                              "roleArn"
                                            ],
                                            "type": "object",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "at most one of the fields in [sessionName sessionNameExpression] may be set",
                                                "rule": "(has(self.sessionName)?1:0)+(has(self.sessionNameExpression)?1:0) <= 1"
                                              }
                                            ],
                                            "additionalProperties": false
                                          },
                                          "region": {
                                            "description": "AWS SigV4 signing region, for example `us-east-1`. Set this when the\ntarget AWS service is in a different region than the gateway. If unset,\ntyped AWS backends may provide this automatically; otherwise the ambient\nAWS region is used.",
                                            "maxLength": 256,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "secretRef": {
                                            "description": "Credential source for AWS credentials, defaulting to a Kubernetes `Secret`.\nThe default Secret resolver expects `accessKey`, `secretKey`, and optional\n`sessionToken` keys.",
                                            "properties": {
                                              "group": {
                                                "description": "API group of the referenced credential; empty selects the core API group",
                                                "type": "string"
                                              },
                                              "kind": {
                                                "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                                "type": "string"
                                              },
                                              "name": {
                                                "description": "Name of the referenced credential",
                                                "maxLength": 253,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "x-kubernetes-map-type": "atomic",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "custom credential refs must set both group and kind",
                                                "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                              }
                                            ],
                                            "additionalProperties": false
                                          },
                                          "serviceName": {
                                            "description": "AWS SigV4 signing service name, for example\n`bedrock`, `bedrock-agentcore`, or `execute-api`). If unset, typed AWS\nbackends may provide this automatically.",
                                            "maxLength": 256,
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "type": "object",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "secretRef and assumeRole are mutually exclusive",
                                            "rule": "!(has(self.secretRef) && has(self.assumeRole))"
                                          }
                                        ],
                                        "additionalProperties": false
                                      },
                                      "key": {
                                        "description": "Inline API key to use as the value of the `Authorization` header.\nThis option is the least secure; usage of a `Secret` is preferred.",
                                        "maxLength": 2048,
                                        "type": "string"
                                      },
                                      "location": {
                                        "description": "Where API keys are inserted. Defaults to the `Authorization` header with\nthe `Bearer ` prefix. Applies to `key` and `secretRef`.",
                                        "properties": {
                                          "cookie": {
                                            "properties": {
                                              "name": {
                                                "maxLength": 256,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "additionalProperties": false
                                          },
                                          "header": {
                                            "properties": {
                                              "name": {
                                                "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                                                "maxLength": 256,
                                                "minLength": 1,
                                                "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                                "type": "string"
                                              },
                                              "prefix": {
                                                "maxLength": 256,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "additionalProperties": false
                                          },
                                          "queryParameter": {
                                            "properties": {
                                              "name": {
                                                "maxLength": 256,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "additionalProperties": false
                                          }
                                        },
                                        "type": "object",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "exactly one of the fields in [header queryParameter cookie] must be set",
                                            "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0) == 1"
                                          }
                                        ],
                                        "additionalProperties": false
                                      },
                                      "secretRef": {
                                        "description": "Credential source for the API key, defaulting to a Kubernetes `Secret`.\nBy default, the value is read from the `Authorization` key; set\n`secretRef.key` to override it. A `Bearer ` prefix is stripped only from\nthe default `Authorization` key.",
                                        "properties": {
                                          "group": {
                                            "description": "API group of the referenced credential; empty selects the core API group",
                                            "type": "string"
                                          },
                                          "key": {
                                            "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                            "maxLength": 253,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "kind": {
                                            "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                            "type": "string"
                                          },
                                          "name": {
                                            "description": "Name of the referenced credential",
                                            "maxLength": 253,
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "type": "object",
                                        "x-kubernetes-map-type": "atomic",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "custom credential refs must set both group and kind",
                                            "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                          }
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "location may only be set for key or secretRef auth",
                                        "rule": "has(self.location) ? has(self.key) || has(self.secretRef) : true"
                                      },
                                      {
                                        "message": "exactly one of the fields in [key secretRef aws] must be set",
                                        "rule": "(has(self.key)?1:0)+(has(self.secretRef)?1:0)+(has(self.aws)?1:0) == 1"
                                      }
                                    ],
                                    "additionalProperties": false
                                  },
                                  "http": {
                                    "description": "Settings for managing HTTP requests to the backend",
                                    "properties": {
                                      "requestTimeout": {
                                        "description": "Deadline for receiving a response from the backend.",
                                        "maxLength": 32,
                                        "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                        "type": "string",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "requestTimeout must be at least 1ms",
                                            "rule": "duration(self) >= duration('1ms')"
                                          }
                                        ]
                                      },
                                      "version": {
                                        "description": "HTTP protocol version for backend connections. If unset, it is inferred:\n`Service` appProtocol, `HTTP2` for gRPC, the original protocol for\nplaintext HTTP, or `HTTP1` for HTTPS because clients often upgrade HTTPS\nto HTTP/2 even when the backend does not support it.",
                                        "enum": [
                                          "HTTP1",
                                          "HTTP2"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "type": "object",
                                    "additionalProperties": false
                                  },
                                  "tcp": {
                                    "description": "Settings for managing TCP connections to the backend",
                                    "properties": {
                                      "connectTimeout": {
                                        "description": "Deadline for establishing a connection to\nthe destination.",
                                        "maxLength": 32,
                                        "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                        "type": "string",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "connectTimeout must be at least 100ms",
                                            "rule": "duration(self) >= duration('100ms')"
                                          }
                                        ]
                                      },
                                      "keepalive": {
                                        "description": "Settings for enabling TCP keepalives on the\nconnection.",
                                        "properties": {
                                          "interval": {
                                            "description": "Time between keepalive probes.\nIf unset, this defaults to 180s.",
                                            "maxLength": 32,
                                            "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                            "type": "string",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "interval must be at least 1 second",
                                                "rule": "duration(self) >= duration('1s')"
                                              }
                                            ]
                                          },
                                          "retries": {
                                            "description": "Maximum number of keepalive probes to send before dropping the connection.\nIf unset, this defaults to 9.",
                                            "format": "int32",
                                            "maximum": 64,
                                            "minimum": 1,
                                            "type": "integer"
                                          },
                                          "time": {
                                            "description": "Time a connection needs to be idle before keepalive probes start being sent.\nIf unset, this defaults to 180s.",
                                            "maxLength": 32,
                                            "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                            "type": "string",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "time must be at least 1 second",
                                                "rule": "duration(self) >= duration('1s')"
                                              }
                                            ]
                                          }
                                        },
                                        "type": "object",
                                        "additionalProperties": false
                                      }
                                    },
                                    "type": "object",
                                    "additionalProperties": false
                                  },
                                  "tls": {
                                    "description": "Settings for managing TLS connections to the backend\n\nWhen set, TLS is originated to the backend using the system trusted CA\ncertificates, and SNI is inferred from the destination.",
                                    "properties": {
                                      "alpnProtocols": {
                                        "description": "Application-Layer Protocol Negotiation (`ALPN`)\nvalue to use in the TLS handshake.\n\nIf not present, defaults to `[\"h2\", \"http/1.1\"]`.",
                                        "items": {
                                          "maxLength": 64,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "maxItems": 16,
                                        "minItems": 1,
                                        "type": "array"
                                      },
                                      "caCertificateRefs": {
                                        "description": "CA certificate source to use to verify the server certificate. Omitted kind\nand `ConfigMap` select a ConfigMap; `Secret` selects a Secret. The bundle is\nread from the `ca.crt` key unless `key` names a different one. If unset, the\nsystem's trusted certificates are used.",
                                        "items": {
                                          "description": "LocalCACertificateRef references a same-namespace CA certificate source.\nAn omitted kind defaults to ConfigMap, and an omitted key to `ca.crt`.",
                                          "properties": {
                                            "key": {
                                              "description": "Key within the referenced source holding the PEM-encoded CA bundle.\nOmitted defaults to `ca.crt`.",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "pattern": "^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$",
                                              "type": "string"
                                            },
                                            "kind": {
                                              "description": "Kind of the referenced CA certificate source. Omitted defaults to ConfigMap.",
                                              "enum": [
                                                "ConfigMap",
                                                "Secret"
                                              ],
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Name of the referenced CA certificate source.",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "type": "object",
                                          "x-kubernetes-map-type": "atomic",
                                          "additionalProperties": false
                                        },
                                        "maxItems": 1,
                                        "type": "array",
                                        "x-kubernetes-list-type": "atomic"
                                      },
                                      "certificateSource": {
                                        "description": "Source for the gateway's client identity and trust roots (`Inline` default, or `SPIFFE`).",
                                        "enum": [
                                          "Inline",
                                          "SPIFFE"
                                        ],
                                        "type": "string"
                                      },
                                      "insecureSkipVerify": {
                                        "description": "Originates TLS but skips verification of the backend's certificate\nWARNING: insecure; only use if the risks are understood\n\nModes:\n* `All` disables all TLS verification\n* `Hostname` trusts the CA certificate but ignores hostname/SAN mismatches.\n  Still insecure; prefer `verifySubjectAltNames` where possible.",
                                        "enum": [
                                          "All",
                                          "Hostname"
                                        ],
                                        "type": "string"
                                      },
                                      "keyExchangeGroups": {
                                        "description": "Ordered list of key exchange groups for a TLS connection.\nFor example: `X25519_MLKEM768,X25519`.",
                                        "items": {
                                          "enum": [
                                            "P-256",
                                            "P-384",
                                            "X25519",
                                            "X25519_MLKEM768"
                                          ],
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "mtlsCertificateRef": {
                                        "description": "Enables mutual TLS to the backend using `tls.key` and `tls.crt` from the\nreferenced credential source (defaulting to a Kubernetes `Secret`). An\noptional `ca.cert`, if present, verifies the server certificate, but\n`caCertificateRefs` takes priority. If unspecified, no client certificate\nis used.",
                                        "items": {
                                          "description": "References a same-namespace credential\nSet only `name` for a Kubernetes Secret",
                                          "properties": {
                                            "group": {
                                              "description": "API group of the referenced credential; empty selects the core API group",
                                              "type": "string"
                                            },
                                            "kind": {
                                              "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Name of the referenced credential",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "type": "object",
                                          "x-kubernetes-map-type": "atomic",
                                          "x-kubernetes-validations": [
                                            {
                                              "message": "custom credential refs must set both group and kind",
                                              "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                            }
                                          ],
                                          "additionalProperties": false
                                        },
                                        "maxItems": 1,
                                        "type": "array",
                                        "x-kubernetes-list-type": "atomic"
                                      },
                                      "sni": {
                                        "description": "Server Name Indicator (`SNI`) to use in the TLS\nhandshake. If unset, the `SNI` is automatically set based on the\ndestination hostname.",
                                        "maxLength": 253,
                                        "minLength": 1,
                                        "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                        "type": "string"
                                      },
                                      "verifySubjectAltNames": {
                                        "description": "Subject Alternative Names (`SAN`)\nto verify in the server certificate.\nIf not present, the destination hostname is automatically used.",
                                        "items": {
                                          "maxLength": 256,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "maxItems": 16,
                                        "minItems": 1,
                                        "type": "array"
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "insecureSkipVerify All and caCertificateRefs may not be set together",
                                        "rule": "has(self.insecureSkipVerify) && self.insecureSkipVerify == 'All' ? !has(self.caCertificateRefs) : true"
                                      },
                                      {
                                        "message": "insecureSkipVerify and verifySubjectAltNames may not be set together",
                                        "rule": "has(self.insecureSkipVerify) ? !has(self.verifySubjectAltNames) : true"
                                      },
                                      {
                                        "message": "certificateSource SPIFFE may not be combined with mtlsCertificateRef, caCertificateRefs, or insecureSkipVerify",
                                        "rule": "!has(self.certificateSource) || self.certificateSource != 'SPIFFE' || (!has(self.mtlsCertificateRef) && !has(self.caCertificateRefs) && !has(self.insecureSkipVerify))"
                                      },
                                      {
                                        "message": "at most one of the fields in [verifySubjectAltNames insecureSkipVerify] may be set",
                                        "rule": "(has(self.verifySubjectAltNames)?1:0)+(has(self.insecureSkipVerify)?1:0) <= 1"
                                      }
                                    ],
                                    "additionalProperties": false
                                  },
                                  "tunnel": {
                                    "description": "Settings for managing tunnel connections to the backend, like `HTTPS_PROXY`",
                                    "properties": {
                                      "backendRef": {
                                        "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                                        "properties": {
                                          "group": {
                                            "default": "",
                                            "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                                            "maxLength": 253,
                                            "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                            "type": "string"
                                          },
                                          "kind": {
                                            "default": "Service",
                                            "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                                            "maxLength": 63,
                                            "minLength": 1,
                                            "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                            "type": "string"
                                          },
                                          "name": {
                                            "description": "Name is the name of the referent.",
                                            "maxLength": 253,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "namespace": {
                                            "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                                            "maxLength": 63,
                                            "minLength": 1,
                                            "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                            "type": "string"
                                          },
                                          "port": {
                                            "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                                            "format": "int32",
                                            "maximum": 65535,
                                            "minimum": 1,
                                            "type": "integer"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "type": "object",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "Must have port for Service reference",
                                            "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                                          }
                                        ],
                                        "additionalProperties": false
                                      },
                                      "mode": {
                                        "description": "How requests are sent through the proxy.\nDefaults to `Auto`.",
                                        "enum": [
                                          "Auto",
                                          "Connect"
                                        ],
                                        "type": "string"
                                      },
                                      "url": {
                                        "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                                        "maxLength": 1024,
                                        "minLength": 1,
                                        "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                                        "type": "string"
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "exactly one of the fields in [backendRef url] must be set",
                                        "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                                      },
                                      {
                                        "message": "url must not include a path for backend tunnel",
                                        "rule": "!has(self.url) || self.url.matches('^https?://[^/?#]+$')"
                                      }
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "type": "object",
                                "x-kubernetes-validations": [
                                  {
                                    "message": "at least one of the fields in [auth http tcp tls tunnel] must be set",
                                    "rule": "[has(self.auth),has(self.http),has(self.tcp),has(self.tls),has(self.tunnel)].filter(x,x==true).size() >= 1"
                                  }
                                ],
                                "additionalProperties": false
                              },
                              "region": {
                                "description": "AWS region where the guardrail is deployed, for example\n`us-west-2`).",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              },
                              "version": {
                                "description": "Version of the Guardrail policy to use for the backend.",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "identifier",
                              "region",
                              "version"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "googleModelArmor": {
                            "description": "Google Model Armor settings for prompt guarding.",
                            "properties": {
                              "action": {
                                "description": "Action controls whether flagged content is rejected or only observed.\n`Reject` (the default) rejects flagged content; `Audit` records the\nwould-be rejection without blocking.",
                                "enum": [
                                  "Audit",
                                  "Reject"
                                ],
                                "type": "string"
                              },
                              "failureMode": {
                                "description": "Behavior when the provider is unavailable or returns an error.\n`FailOpen` allows the request to continue; `FailClosed` (default) rejects it.",
                                "enum": [
                                  "FailClosed",
                                  "FailOpen"
                                ],
                                "type": "string"
                              },
                              "location": {
                                "description": "Google Cloud location, for example `us-central1`.\nDefaults to `us-central1` if not specified.",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              },
                              "policies": {
                                "description": "Policies for communicating with Google Model Armor.",
                                "properties": {
                                  "auth": {
                                    "description": "Settings for authenticating to Google Model Armor.",
                                    "properties": {
                                      "gcp": {
                                        "description": "Google authentication method for Model Armor. Use `gcp: {}` for default\nGoogle credential discovery.",
                                        "properties": {
                                          "audience": {
                                            "description": "Explicit `aud` value for the ID token. Only\nvalid with `IdToken` type. If not set, the `aud` is automatically\nderived from the backend hostname.",
                                            "maxLength": 256,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "secretRef": {
                                            "description": "Credential source for ADC-compatible Google credential JSON, defaulting to\na Kubernetes `Secret`. By default, the value is read from\n`credentials.json`; set `secretRef.key` to override it. When omitted,\nambient credentials are used.",
                                            "properties": {
                                              "group": {
                                                "description": "API group of the referenced credential; empty selects the core API group",
                                                "type": "string"
                                              },
                                              "key": {
                                                "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                                "maxLength": 253,
                                                "minLength": 1,
                                                "type": "string"
                                              },
                                              "kind": {
                                                "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                                "type": "string"
                                              },
                                              "name": {
                                                "description": "Name of the referenced credential",
                                                "maxLength": 253,
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object",
                                            "x-kubernetes-map-type": "atomic",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "custom credential refs must set both group and kind",
                                                "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                              }
                                            ],
                                            "additionalProperties": false
                                          },
                                          "type": {
                                            "description": "The type of token to generate. To authenticate to GCP services,\ngenerally an `AccessToken` is used. To authenticate to Cloud Run, an\n`IdToken` is used.",
                                            "enum": [
                                              "AccessToken",
                                              "IdToken"
                                            ],
                                            "type": "string"
                                          }
                                        },
                                        "type": "object",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "audience is only valid with IdToken",
                                            "rule": "has(self.audience) ? self.type == 'IdToken' : true"
                                          }
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "exactly one of the fields in [gcp] must be set",
                                        "rule": "(has(self.gcp)?1:0) == 1"
                                      }
                                    ],
                                    "additionalProperties": false
                                  },
                                  "http": {
                                    "description": "Settings for managing HTTP requests to the backend",
                                    "properties": {
                                      "requestTimeout": {
                                        "description": "Deadline for receiving a response from the backend.",
                                        "maxLength": 32,
                                        "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                        "type": "string",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "requestTimeout must be at least 1ms",
                                            "rule": "duration(self) >= duration('1ms')"
                                          }
                                        ]
                                      },
                                      "version": {
                                        "description": "HTTP protocol version for backend connections. If unset, it is inferred:\n`Service` appProtocol, `HTTP2` for gRPC, the original protocol for\nplaintext HTTP, or `HTTP1` for HTTPS because clients often upgrade HTTPS\nto HTTP/2 even when the backend does not support it.",
                                        "enum": [
                                          "HTTP1",
                                          "HTTP2"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "type": "object",
                                    "additionalProperties": false
                                  },
                                  "tcp": {
                                    "description": "Settings for managing TCP connections to the backend",
                                    "properties": {
                                      "connectTimeout": {
                                        "description": "Deadline for establishing a connection to\nthe destination.",
                                        "maxLength": 32,
                                        "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                        "type": "string",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "connectTimeout must be at least 100ms",
                                            "rule": "duration(self) >= duration('100ms')"
                                          }
                                        ]
                                      },
                                      "keepalive": {
                                        "description": "Settings for enabling TCP keepalives on the\nconnection.",
                                        "properties": {
                                          "interval": {
                                            "description": "Time between keepalive probes.\nIf unset, this defaults to 180s.",
                                            "maxLength": 32,
                                            "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                            "type": "string",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "interval must be at least 1 second",
                                                "rule": "duration(self) >= duration('1s')"
                                              }
                                            ]
                                          },
                                          "retries": {
                                            "description": "Maximum number of keepalive probes to send before dropping the connection.\nIf unset, this defaults to 9.",
                                            "format": "int32",
                                            "maximum": 64,
                                            "minimum": 1,
                                            "type": "integer"
                                          },
                                          "time": {
                                            "description": "Time a connection needs to be idle before keepalive probes start being sent.\nIf unset, this defaults to 180s.",
                                            "maxLength": 32,
                                            "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                            "type": "string",
                                            "x-kubernetes-validations": [
                                              {
                                                "message": "time must be at least 1 second",
                                                "rule": "duration(self) >= duration('1s')"
                                              }
                                            ]
                                          }
                                        },
                                        "type": "object",
                                        "additionalProperties": false
                                      }
                                    },
                                    "type": "object",
                                    "additionalProperties": false
                                  },
                                  "tls": {
                                    "description": "Settings for managing TLS connections to the backend\n\nWhen set, TLS is originated to the backend using the system trusted CA\ncertificates, and SNI is inferred from the destination.",
                                    "properties": {
                                      "alpnProtocols": {
                                        "description": "Application-Layer Protocol Negotiation (`ALPN`)\nvalue to use in the TLS handshake.\n\nIf not present, defaults to `[\"h2\", \"http/1.1\"]`.",
                                        "items": {
                                          "maxLength": 64,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "maxItems": 16,
                                        "minItems": 1,
                                        "type": "array"
                                      },
                                      "caCertificateRefs": {
                                        "description": "CA certificate source to use to verify the server certificate. Omitted kind\nand `ConfigMap` select a ConfigMap; `Secret` selects a Secret. The bundle is\nread from the `ca.crt` key unless `key` names a different one. If unset, the\nsystem's trusted certificates are used.",
                                        "items": {
                                          "description": "LocalCACertificateRef references a same-namespace CA certificate source.\nAn omitted kind defaults to ConfigMap, and an omitted key to `ca.crt`.",
                                          "properties": {
                                            "key": {
                                              "description": "Key within the referenced source holding the PEM-encoded CA bundle.\nOmitted defaults to `ca.crt`.",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "pattern": "^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$",
                                              "type": "string"
                                            },
                                            "kind": {
                                              "description": "Kind of the referenced CA certificate source. Omitted defaults to ConfigMap.",
                                              "enum": [
                                                "ConfigMap",
                                                "Secret"
                                              ],
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Name of the referenced CA certificate source.",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "type": "object",
                                          "x-kubernetes-map-type": "atomic",
                                          "additionalProperties": false
                                        },
                                        "maxItems": 1,
                                        "type": "array",
                                        "x-kubernetes-list-type": "atomic"
                                      },
                                      "certificateSource": {
                                        "description": "Source for the gateway's client identity and trust roots (`Inline` default, or `SPIFFE`).",
                                        "enum": [
                                          "Inline",
                                          "SPIFFE"
                                        ],
                                        "type": "string"
                                      },
                                      "insecureSkipVerify": {
                                        "description": "Originates TLS but skips verification of the backend's certificate\nWARNING: insecure; only use if the risks are understood\n\nModes:\n* `All` disables all TLS verification\n* `Hostname` trusts the CA certificate but ignores hostname/SAN mismatches.\n  Still insecure; prefer `verifySubjectAltNames` where possible.",
                                        "enum": [
                                          "All",
                                          "Hostname"
                                        ],
                                        "type": "string"
                                      },
                                      "keyExchangeGroups": {
                                        "description": "Ordered list of key exchange groups for a TLS connection.\nFor example: `X25519_MLKEM768,X25519`.",
                                        "items": {
                                          "enum": [
                                            "P-256",
                                            "P-384",
                                            "X25519",
                                            "X25519_MLKEM768"
                                          ],
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "mtlsCertificateRef": {
                                        "description": "Enables mutual TLS to the backend using `tls.key` and `tls.crt` from the\nreferenced credential source (defaulting to a Kubernetes `Secret`). An\noptional `ca.cert`, if present, verifies the server certificate, but\n`caCertificateRefs` takes priority. If unspecified, no client certificate\nis used.",
                                        "items": {
                                          "description": "References a same-namespace credential\nSet only `name` for a Kubernetes Secret",
                                          "properties": {
                                            "group": {
                                              "description": "API group of the referenced credential; empty selects the core API group",
                                              "type": "string"
                                            },
                                            "kind": {
                                              "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                              "type": "string"
                                            },
                                            "name": {
                                              "description": "Name of the referenced credential",
                                              "maxLength": 253,
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "type": "object",
                                          "x-kubernetes-map-type": "atomic",
                                          "x-kubernetes-validations": [
                                            {
                                              "message": "custom credential refs must set both group and kind",
                                              "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                            }
                                          ],
                                          "additionalProperties": false
                                        },
                                        "maxItems": 1,
                                        "type": "array",
                                        "x-kubernetes-list-type": "atomic"
                                      },
                                      "sni": {
                                        "description": "Server Name Indicator (`SNI`) to use in the TLS\nhandshake. If unset, the `SNI` is automatically set based on the\ndestination hostname.",
                                        "maxLength": 253,
                                        "minLength": 1,
                                        "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                        "type": "string"
                                      },
                                      "verifySubjectAltNames": {
                                        "description": "Subject Alternative Names (`SAN`)\nto verify in the server certificate.\nIf not present, the destination hostname is automatically used.",
                                        "items": {
                                          "maxLength": 256,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "maxItems": 16,
                                        "minItems": 1,
                                        "type": "array"
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "insecureSkipVerify All and caCertificateRefs may not be set together",
                                        "rule": "has(self.insecureSkipVerify) && self.insecureSkipVerify == 'All' ? !has(self.caCertificateRefs) : true"
                                      },
                                      {
                                        "message": "insecureSkipVerify and verifySubjectAltNames may not be set together",
                                        "rule": "has(self.insecureSkipVerify) ? !has(self.verifySubjectAltNames) : true"
                                      },
                                      {
                                        "message": "certificateSource SPIFFE may not be combined with mtlsCertificateRef, caCertificateRefs, or insecureSkipVerify",
                                        "rule": "!has(self.certificateSource) || self.certificateSource != 'SPIFFE' || (!has(self.mtlsCertificateRef) && !has(self.caCertificateRefs) && !has(self.insecureSkipVerify))"
                                      },
                                      {
                                        "message": "at most one of the fields in [verifySubjectAltNames insecureSkipVerify] may be set",
                                        "rule": "(has(self.verifySubjectAltNames)?1:0)+(has(self.insecureSkipVerify)?1:0) <= 1"
                                      }
                                    ],
                                    "additionalProperties": false
                                  },
                                  "tunnel": {
                                    "description": "Settings for managing tunnel connections to the backend, like `HTTPS_PROXY`",
                                    "properties": {
                                      "backendRef": {
                                        "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                                        "properties": {
                                          "group": {
                                            "default": "",
                                            "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                                            "maxLength": 253,
                                            "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                            "type": "string"
                                          },
                                          "kind": {
                                            "default": "Service",
                                            "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                                            "maxLength": 63,
                                            "minLength": 1,
                                            "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                            "type": "string"
                                          },
                                          "name": {
                                            "description": "Name is the name of the referent.",
                                            "maxLength": 253,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "namespace": {
                                            "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                                            "maxLength": 63,
                                            "minLength": 1,
                                            "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                            "type": "string"
                                          },
                                          "port": {
                                            "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                                            "format": "int32",
                                            "maximum": 65535,
                                            "minimum": 1,
                                            "type": "integer"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "type": "object",
                                        "x-kubernetes-validations": [
                                          {
                                            "message": "Must have port for Service reference",
                                            "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                                          }
                                        ],
                                        "additionalProperties": false
                                      },
                                      "mode": {
                                        "description": "How requests are sent through the proxy.\nDefaults to `Auto`.",
                                        "enum": [
                                          "Auto",
                                          "Connect"
                                        ],
                                        "type": "string"
                                      },
                                      "url": {
                                        "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                                        "maxLength": 1024,
                                        "minLength": 1,
                                        "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                                        "type": "string"
                                      }
                                    },
                                    "type": "object",
                                    "x-kubernetes-validations": [
                                      {
                                        "message": "exactly one of the fields in [backendRef url] must be set",
                                        "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                                      },
                                      {
                                        "message": "url must not include a path for backend tunnel",
                                        "rule": "!has(self.url) || self.url.matches('^https?://[^/?#]+$')"
                                      }
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "type": "object",
                                "x-kubernetes-validations": [
                                  {
                                    "message": "at least one of the fields in [auth http tcp tls tunnel] must be set",
                                    "rule": "[has(self.auth),has(self.http),has(self.tcp),has(self.tls),has(self.tunnel)].filter(x,x==true).size() >= 1"
                                  }
                                ],
                                "additionalProperties": false
                              },
                              "projectId": {
                                "description": "Google Cloud project ID.",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              },
                              "templateId": {
                                "description": "Template ID for Google Model Armor.",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "projectId",
                              "templateId"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "regex": {
                            "description": "Regular expression (regex) matching for prompt guards and data masking.",
                            "properties": {
                              "action": {
                                "description": "The action to take if a regex pattern is matched in a request or response.\nThe action applies to request and response matches alike. Note that\n`Mask` is not applied to streamed responses: matched content in a\nstreamed response is passed through unmodified.\nDefaults to `Mask`.",
                                "enum": [
                                  "Audit",
                                  "Mask",
                                  "Reject"
                                ],
                                "type": "string"
                              },
                              "builtins": {
                                "description": "Built-in regex patterns to match against the request or response.\nMatches and built-ins are additive.",
                                "items": {
                                  "description": "Built-in regex patterns for specific types of strings in prompts.\nFor example, if you specify `CreditCard`, any credit card numbers\nin the request or response are matched.",
                                  "enum": [
                                    "CaSin",
                                    "CreditCard",
                                    "Email",
                                    "PhoneNumber",
                                    "Ssn"
                                  ],
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "matches": {
                                "description": "Regex patterns to match against the request or response.\nMatches and built-ins are additive.",
                                "items": {
                                  "maxLength": 1024,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "response": {
                            "description": "Custom response message to return to the client. If not specified, defaults to\n`The response was rejected due to inappropriate content`.",
                            "properties": {
                              "message": {
                                "description": "Custom response message to return to the client. If not specified, defaults to\n`The request was rejected due to inappropriate content`.",
                                "type": "string"
                              },
                              "statusCode": {
                                "description": "Status code to return to the client. Defaults to 403.",
                                "format": "int32",
                                "maximum": 599,
                                "minimum": 200,
                                "type": "integer"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "webhook": {
                            "description": "Webhook that receives responses for prompt guarding.",
                            "properties": {
                              "action": {
                                "description": "Action controls whether the webhook's verdict is enforced or only observed.\n`Reject` (the default) enforces it; `Audit` records the would-be action\nwithout blocking or masking.",
                                "enum": [
                                  "Audit",
                                  "Reject"
                                ],
                                "type": "string"
                              },
                              "backendRef": {
                                "description": "Webhook server to reach.\n\nSupported types: Service and Backend.",
                                "properties": {
                                  "group": {
                                    "default": "",
                                    "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                                    "maxLength": 253,
                                    "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                    "type": "string"
                                  },
                                  "kind": {
                                    "default": "Service",
                                    "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                    "type": "string"
                                  },
                                  "name": {
                                    "description": "Name is the name of the referent.",
                                    "maxLength": 253,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "namespace": {
                                    "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                    "type": "string"
                                  },
                                  "port": {
                                    "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                                    "format": "int32",
                                    "maximum": 65535,
                                    "minimum": 1,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "type": "object",
                                "x-kubernetes-validations": [
                                  {
                                    "message": "Must have port for Service reference",
                                    "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                                  }
                                ],
                                "additionalProperties": false
                              },
                              "failureMode": {
                                "description": "Behavior when the webhook guardrail is unavailable\nor returns an error. `FailOpen` allows the request to continue.\n`FailClosed` (default) rejects the request.",
                                "enum": [
                                  "FailClosed",
                                  "FailOpen"
                                ],
                                "type": "string"
                              },
                              "forwardHeaderMatches": {
                                "description": "HTTP header matches used to select the headers to forward to the webhook.\nRequest headers are used when forwarding requests and response headers\nare used when forwarding responses.\nBy default, no headers are forwarded.",
                                "items": {
                                  "description": "HTTPHeaderMatch describes how to select a HTTP route by matching HTTP request\nheaders.",
                                  "properties": {
                                    "name": {
                                      "description": "Name of the HTTP header to match, case-insensitive. When names are equivalent, only the first matching entry is used",
                                      "maxLength": 256,
                                      "minLength": 1,
                                      "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                      "type": "string"
                                    },
                                    "type": {
                                      "default": "Exact",
                                      "description": "How to match against the header value: `Exact` (default) or `RegularExpression`. The regex dialect is implementation-specific",
                                      "enum": [
                                        "Exact",
                                        "RegularExpression"
                                      ],
                                      "type": "string"
                                    },
                                    "value": {
                                      "description": "Value of the HTTP header to match",
                                      "maxLength": 4096,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "value"
                                  ],
                                  "type": "object",
                                  "additionalProperties": false
                                },
                                "type": "array"
                              },
                              "headers": {
                                "additionalProperties": {
                                  "description": "A Common Expression Language (CEL) expression.",
                                  "maxLength": 16384,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "description": "CEL-computed headers to include in webhook requests.",
                                "maxProperties": 64,
                                "type": "object"
                              }
                            },
                            "required": [
                              "backendRef"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "type": "object",
                        "x-kubernetes-validations": [
                          {
                            "message": "exactly one of the fields in [regex webhook bedrockGuardrails googleModelArmor] must be set",
                            "rule": "(has(self.regex)?1:0)+(has(self.webhook)?1:0)+(has(self.bedrockGuardrails)?1:0)+(has(self.googleModelArmor)?1:0) == 1"
                          }
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 8,
                      "minItems": 1,
                      "type": "array"
                    },
                    "streaming": {
                      "description": "Apply prompt guards to streaming responses and realtime websocket messages.\nDefaults to disabled to preserve streaming throughput unless explicitly enabled.",
                      "enum": [
                        "Enabled"
                      ],
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "at least one of the fields in [request response] must be set",
                      "rule": "[has(self.request),has(self.response)].filter(x,x==true).size() >= 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "routes": {
                  "additionalProperties": {
                    "description": "How the AI gateway should process incoming requests\nbased on the URL path and the API format expected.",
                    "enum": [
                      "AnthropicTokenCount",
                      "Completions",
                      "Detect",
                      "Embeddings",
                      "GeminiCountTokens",
                      "GenerateContent",
                      "Messages",
                      "Models",
                      "Passthrough",
                      "Realtime",
                      "Rerank",
                      "Responses"
                    ],
                    "type": "string"
                  },
                  "description": "Rules for identifying the type of traffic to handle.\nThe keys are URL path suffixes matched using ends-with comparison, for\nexample `\"/v1/chat/completions\"`.\nThe special `*` wildcard matches any path.\nIf not specified, all traffic defaults to `completions` type.",
                  "type": "object"
                },
                "transformations": {
                  "description": "CEL transformations to compute and set fields in the request body.\nThe expression result overwrites any existing value for that field.\nThis has a higher priority than `overrides` if both are set for the same\nkey.",
                  "items": {
                    "description": "Maps a request JSON field to a CEL expression.\nThe expression is evaluated against the current request body and its result\nis assigned to the configured field.",
                    "properties": {
                      "expression": {
                        "description": "CEL expression used to compute the field value.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "field": {
                        "description": "Name of the field to set.",
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "expression",
                      "field"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 64,
                  "minItems": 1,
                  "type": "array",
                  "x-kubernetes-list-map-keys": [
                    "field"
                  ],
                  "x-kubernetes-list-type": "map"
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "at least one of the fields in [defaults finalTransformations modelAliases overrides prompt promptCaching promptGuard routes transformations] must be set",
                  "rule": "[has(self.defaults),has(self.finalTransformations),has(self.modelAliases),has(self.overrides),has(self.prompt),has(self.promptCaching),has(self.promptGuard),has(self.routes),has(self.transformations)].filter(x,x==true).size() >= 1"
                }
              ],
              "additionalProperties": false
            },
            "auth": {
              "description": "Settings for managing authentication to the backend",
              "properties": {
                "aws": {
                  "description": "Explicit AWS authentication method for the backend.\nWhen omitted, default AWS SDK credential discovery is used.",
                  "properties": {
                    "assumeRole": {
                      "description": "AWS STS AssumeRole settings to use before signing backend requests.\nAmbient AWS credentials are used as the source credentials for STS.",
                      "properties": {
                        "externalId": {
                          "description": "ExternalID is set when the role's trust policy requires sts:ExternalId.",
                          "maxLength": 1224,
                          "minLength": 2,
                          "pattern": "^[\\w+=,.@:/-]+$",
                          "type": "string"
                        },
                        "roleArn": {
                          "description": "AWS IAM role ARN to assume.",
                          "minLength": 1,
                          "pattern": "^arn:aws[a-z-]*:iam::[0-9]{12}:role/.+$",
                          "type": "string"
                        },
                        "sessionName": {
                          "description": "SessionName is a custom session name (RoleSessionName) for CloudTrail and\nCost & Usage Report attribution. If unset, AWS generates a random name.",
                          "pattern": "^[\\w+=,.@-]{2,64}$",
                          "type": "string"
                        },
                        "sessionNameExpression": {
                          "description": "SessionNameExpression is a CEL expression evaluated against each request\nto produce the session name (RoleSessionName), for example `jwt.sub` or\n`request.headers[\"x-team\"]`. If the expression does not produce a valid\nsession name at request time, the request is rejected.",
                          "maxLength": 16384,
                          "minLength": 1,
                          "type": "string"
                        },
                        "tags": {
                          "description": "Session tags passed to STS AssumeRole for cost attribution in the AWS Cost\n& Usage Report, once activated. STS allows at most 50 per role session.",
                          "items": {
                            "description": "AwsSessionTag is an AWS STS session tag passed to AssumeRole for cost\nattribution. Exactly one of value and expression must be set.",
                            "properties": {
                              "expression": {
                                "description": "CEL expression evaluated against each request to produce the tag value,\nfor example `jwt.sub` or `request.headers[\"x-app\"]`. Requests with invalid\ntag values are rejected.",
                                "maxLength": 16384,
                                "minLength": 1,
                                "type": "string"
                              },
                              "key": {
                                "description": "Key is the tag key.",
                                "maxLength": 128,
                                "minLength": 1,
                                "type": "string"
                              },
                              "value": {
                                "description": "Value is a static tag value.",
                                "maxLength": 256,
                                "type": "string"
                              }
                            },
                            "required": [
                              "key"
                            ],
                            "type": "object",
                            "x-kubernetes-validations": [
                              {
                                "message": "exactly one of value or expression must be set",
                                "rule": "has(self.value) != has(self.expression)"
                              }
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 50,
                          "type": "array",
                          "x-kubernetes-list-map-keys": [
                            "key"
                          ],
                          "x-kubernetes-list-type": "map"
                        }
                      },
                      "required": [
                        "roleArn"
                      ],
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "at most one of the fields in [sessionName sessionNameExpression] may be set",
                          "rule": "(has(self.sessionName)?1:0)+(has(self.sessionNameExpression)?1:0) <= 1"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "region": {
                      "description": "AWS SigV4 signing region, for example `us-east-1`. Set this when the\ntarget AWS service is in a different region than the gateway. If unset,\ntyped AWS backends may provide this automatically; otherwise the ambient\nAWS region is used.",
                      "maxLength": 256,
                      "minLength": 1,
                      "type": "string"
                    },
                    "secretRef": {
                      "description": "Credential source for AWS credentials, defaulting to a Kubernetes `Secret`.\nThe default Secret resolver expects `accessKey`, `secretKey`, and optional\n`sessionToken` keys.",
                      "properties": {
                        "group": {
                          "description": "API group of the referenced credential; empty selects the core API group",
                          "type": "string"
                        },
                        "kind": {
                          "description": "Kind of the referenced credential; empty defaults to `Secret`",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name of the referenced credential",
                          "maxLength": 253,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "x-kubernetes-map-type": "atomic",
                      "x-kubernetes-validations": [
                        {
                          "message": "custom credential refs must set both group and kind",
                          "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "serviceName": {
                      "description": "AWS SigV4 signing service name, for example\n`bedrock`, `bedrock-agentcore`, or `execute-api`). If unset, typed AWS\nbackends may provide this automatically.",
                      "maxLength": 256,
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "secretRef and assumeRole are mutually exclusive",
                      "rule": "!(has(self.secretRef) && has(self.assumeRole))"
                    }
                  ],
                  "additionalProperties": false
                },
                "azure": {
                  "description": "Azure authentication method for the backend.",
                  "properties": {
                    "managedIdentity": {
                      "description": "Managed identity authentication settings. Leave this object empty to use\nthe system-assigned identity. To use a user-assigned identity, set one of\n`clientId`, `objectId`, or `resourceId`.",
                      "properties": {
                        "clientId": {
                          "description": "Client ID of the user-assigned managed identity.",
                          "type": "string"
                        },
                        "objectId": {
                          "description": "Object ID of the user-assigned managed identity.",
                          "type": "string"
                        },
                        "resourceId": {
                          "description": "Resource ID of the user-assigned managed identity.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "at most one of the fields in [clientId objectId resourceId] may be set",
                          "rule": "(has(self.clientId)?1:0)+(has(self.objectId)?1:0)+(has(self.resourceId)?1:0) <= 1"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "scopes": {
                      "description": "Scopes requested for the Azure access token. When omitted, the scope is\ninferred from the backend hostname. Managed Identity supports exactly one\nscope.",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 64,
                      "minItems": 1,
                      "type": "array"
                    },
                    "secretRef": {
                      "description": "Credential source for Azure credentials, defaulting to a Kubernetes\n`Secret`. The default Secret resolver expects `clientID`, `tenantID`, and\n`clientSecret` keys.",
                      "properties": {
                        "group": {
                          "description": "API group of the referenced credential; empty selects the core API group",
                          "type": "string"
                        },
                        "kind": {
                          "description": "Kind of the referenced credential; empty defaults to `Secret`",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name of the referenced credential",
                          "maxLength": 253,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "x-kubernetes-map-type": "atomic",
                      "x-kubernetes-validations": [
                        {
                          "message": "custom credential refs must set both group and kind",
                          "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "workloadIdentity": {
                      "description": "Workload identity authentication settings. Uses the federated token and\nAzure env vars projected into the data plane pod. Recommended on AKS with\nWorkload Identity enabled.",
                      "type": "object"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "managedIdentity supports exactly one scope",
                      "rule": "!has(self.managedIdentity) || !has(self.scopes) || self.scopes.size() == 1"
                    },
                    {
                      "message": "at most one of the fields in [secretRef managedIdentity workloadIdentity] may be set",
                      "rule": "(has(self.secretRef)?1:0)+(has(self.managedIdentity)?1:0)+(has(self.workloadIdentity)?1:0) <= 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "credentials": {
                  "description": "Credentials is a list of additional credentials to inject on the\nbackend request. Each entry resolves a Secret key and writes its value\nto the entry's location. `credentials` is independent of the primary\n`key`/`secretRef`/`passthrough` mechanism and may be set on its own or\nalongside it.",
                  "items": {
                    "description": "BackendAuthCredential specifies one additional credential to inject on the\nbackend request.",
                    "properties": {
                      "location": {
                        "description": "Where the credential is inserted on the backend request.",
                        "properties": {
                          "cookie": {
                            "properties": {
                              "name": {
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "header": {
                            "properties": {
                              "name": {
                                "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                                "maxLength": 256,
                                "minLength": 1,
                                "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                "type": "string"
                              },
                              "prefix": {
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "queryParameter": {
                            "properties": {
                              "name": {
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "type": "object",
                        "x-kubernetes-validations": [
                          {
                            "message": "exactly one of the fields in [header queryParameter cookie] must be set",
                            "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0) == 1"
                          }
                        ],
                        "additionalProperties": false
                      },
                      "secretRef": {
                        "description": "SecretRef references a Kubernetes Secret holding the credential value, and\noptionally overrides the key read from it. Defaults to `Authorization`,\nmatching the key convention used by the top-level `secretRef`.",
                        "properties": {
                          "group": {
                            "description": "API group of the referenced credential; empty selects the core API group",
                            "type": "string"
                          },
                          "key": {
                            "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                            "maxLength": 253,
                            "minLength": 1,
                            "type": "string"
                          },
                          "kind": {
                            "description": "Kind of the referenced credential; empty defaults to `Secret`",
                            "type": "string"
                          },
                          "name": {
                            "description": "Name of the referenced credential",
                            "maxLength": 253,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "type": "object",
                        "x-kubernetes-map-type": "atomic",
                        "x-kubernetes-validations": [
                          {
                            "message": "custom credential refs must set both group and kind",
                            "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                          }
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "location",
                      "secretRef"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 8,
                  "minItems": 1,
                  "type": "array",
                  "x-kubernetes-list-type": "atomic"
                },
                "crossAppAccess": {
                  "description": "Cross App Access (Identity Assertion / ID-JAG) authentication.",
                  "properties": {
                    "accessTokenScopes": {
                      "description": "Scopes requested when exchanging the ID-JAG for an access token.\nWhen omitted, defaults to Scopes. Set to an empty list to omit scope.",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 64,
                      "type": "array"
                    },
                    "audience": {
                      "description": "Identifier of the resource authorization server. The issued ID-JAG is bound to this audience.",
                      "maxLength": 256,
                      "minLength": 1,
                      "type": "string"
                    },
                    "cache": {
                      "description": "Response cache configuration.",
                      "properties": {
                        "inMemory": {
                          "properties": {
                            "defaultTtl": {
                              "description": "TTL used when the token endpoint omits expires_in. Default 300s.",
                              "maxLength": 32,
                              "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                              "type": "string",
                              "x-kubernetes-validations": [
                                {
                                  "message": "defaultTtl must be at least 1 second",
                                  "rule": "duration(self) >= duration('1s')"
                                }
                              ]
                            },
                            "maxEntries": {
                              "description": "Default 8192; 0 disables the cache.",
                              "format": "int32",
                              "type": "integer"
                            }
                          },
                          "type": "object",
                          "additionalProperties": false
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "identityProvider": {
                      "description": "User identity provider authorization server, used for the RFC 8693 ID-JAG exchange.",
                      "properties": {
                        "backendRef": {
                          "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                          "properties": {
                            "group": {
                              "default": "",
                              "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                              "maxLength": 253,
                              "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                              "type": "string"
                            },
                            "kind": {
                              "default": "Service",
                              "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                              "maxLength": 63,
                              "minLength": 1,
                              "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                              "type": "string"
                            },
                            "name": {
                              "description": "Name is the name of the referent.",
                              "maxLength": 253,
                              "minLength": 1,
                              "type": "string"
                            },
                            "namespace": {
                              "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                              "maxLength": 63,
                              "minLength": 1,
                              "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                              "type": "string"
                            },
                            "port": {
                              "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                              "format": "int32",
                              "maximum": 65535,
                              "minimum": 1,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object",
                          "x-kubernetes-validations": [
                            {
                              "message": "Must have port for Service reference",
                              "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                            }
                          ],
                          "additionalProperties": false
                        },
                        "clientAuth": {
                          "description": "Client authentication for the token endpoint.",
                          "properties": {
                            "clientId": {
                              "description": "Client ID sent to the token endpoint.",
                              "minLength": 1,
                              "type": "string"
                            },
                            "method": {
                              "description": "Client authentication method. Defaults to ClientSecretBasic.",
                              "enum": [
                                "ClientSecretBasic",
                                "ClientSecretPost",
                                "PrivateKeyJwt"
                              ],
                              "type": "string"
                            },
                            "privateKeyJwt": {
                              "description": "Client assertion settings. Required when method is PrivateKeyJwt.",
                              "properties": {
                                "alg": {
                                  "description": "JWS signing algorithm. Defaults to RS256.",
                                  "enum": [
                                    "ES256",
                                    "ES384",
                                    "PS256",
                                    "RS256",
                                    "RS384",
                                    "RS512"
                                  ],
                                  "type": "string"
                                },
                                "assertionAudience": {
                                  "description": "Audience for the client assertion, typically the token endpoint URL.",
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "certificateHeader": {
                                  "description": "JWS certificate header. Required when certificateRef is set.",
                                  "enum": [
                                    "x5c",
                                    "x5t#S256"
                                  ],
                                  "type": "string"
                                },
                                "certificateRef": {
                                  "description": "PEM-encoded X.509 certificate chain, leaf first, for certificateHeader. The\nleaf public key should match signingKeyRef; a mismatch only logs a warning\nbut the token endpoint will reject the assertions. Required when\ncertificateHeader is set. The key defaults to `certificate`.",
                                  "properties": {
                                    "group": {
                                      "description": "API group of the referenced credential; empty selects the core API group",
                                      "type": "string"
                                    },
                                    "key": {
                                      "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                      "maxLength": 253,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "kind": {
                                      "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                      "type": "string"
                                    },
                                    "name": {
                                      "description": "Name of the referenced credential",
                                      "maxLength": 253,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name"
                                  ],
                                  "type": "object",
                                  "x-kubernetes-map-type": "atomic",
                                  "x-kubernetes-validations": [
                                    {
                                      "message": "custom credential refs must set both group and kind",
                                      "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                    }
                                  ],
                                  "additionalProperties": false
                                },
                                "kid": {
                                  "description": "Optional JWS key ID header.",
                                  "type": "string"
                                },
                                "signingKeyRef": {
                                  "description": "PEM-encoded RSA or EC private key; key defaults to `signingKey`.",
                                  "properties": {
                                    "group": {
                                      "description": "API group of the referenced credential; empty selects the core API group",
                                      "type": "string"
                                    },
                                    "key": {
                                      "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                      "maxLength": 253,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "kind": {
                                      "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                      "type": "string"
                                    },
                                    "name": {
                                      "description": "Name of the referenced credential",
                                      "maxLength": 253,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name"
                                  ],
                                  "type": "object",
                                  "x-kubernetes-map-type": "atomic",
                                  "x-kubernetes-validations": [
                                    {
                                      "message": "custom credential refs must set both group and kind",
                                      "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                    }
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "assertionAudience",
                                "signingKeyRef"
                              ],
                              "type": "object",
                              "x-kubernetes-validations": [
                                {
                                  "message": "certificateRef and certificateHeader must be set together",
                                  "rule": "has(self.certificateRef) == has(self.certificateHeader)"
                                }
                              ],
                              "additionalProperties": false
                            },
                            "secretRef": {
                              "description": "Secret providing the `clientSecret` key by default; override via\n`secretRef.key`. When omitted, client_id is sent without a secret, which\nis only valid with ClientSecretPost.",
                              "properties": {
                                "group": {
                                  "description": "API group of the referenced credential; empty selects the core API group",
                                  "type": "string"
                                },
                                "key": {
                                  "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                  "maxLength": 253,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "kind": {
                                  "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                  "type": "string"
                                },
                                "name": {
                                  "description": "Name of the referenced credential",
                                  "maxLength": 253,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "x-kubernetes-map-type": "atomic",
                              "x-kubernetes-validations": [
                                {
                                  "message": "custom credential refs must set both group and kind",
                                  "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                }
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "clientId"
                          ],
                          "type": "object",
                          "x-kubernetes-validations": [
                            {
                              "message": "privateKeyJwt settings require method PrivateKeyJwt",
                              "rule": "has(self.privateKeyJwt) == (has(self.method) && self.method == 'PrivateKeyJwt')"
                            },
                            {
                              "message": "secretRef is not valid with method PrivateKeyJwt",
                              "rule": "!has(self.secretRef) || !has(self.method) || self.method != 'PrivateKeyJwt'"
                            },
                            {
                              "message": "clientAuth without secretRef requires method ClientSecretPost or PrivateKeyJwt",
                              "rule": "has(self.secretRef) || has(self.privateKeyJwt) || (has(self.method) && self.method == 'ClientSecretPost')"
                            }
                          ],
                          "additionalProperties": false
                        },
                        "path": {
                          "description": "Token endpoint path; defaults to \"/\". Must start with \"/\".",
                          "pattern": "^/",
                          "type": "string"
                        },
                        "url": {
                          "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                          "maxLength": 1024,
                          "minLength": 1,
                          "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "clientAuth"
                      ],
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "path may not be set when url is set",
                          "rule": "has(self.url) ? !has(self.path) : true"
                        },
                        {
                          "message": "exactly one of the fields in [backendRef url] must be set",
                          "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "resourceAuthorizationServer": {
                      "description": "Resource authorization server, used for the RFC 7523 jwt-bearer exchange.",
                      "properties": {
                        "backendRef": {
                          "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                          "properties": {
                            "group": {
                              "default": "",
                              "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                              "maxLength": 253,
                              "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                              "type": "string"
                            },
                            "kind": {
                              "default": "Service",
                              "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                              "maxLength": 63,
                              "minLength": 1,
                              "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                              "type": "string"
                            },
                            "name": {
                              "description": "Name is the name of the referent.",
                              "maxLength": 253,
                              "minLength": 1,
                              "type": "string"
                            },
                            "namespace": {
                              "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                              "maxLength": 63,
                              "minLength": 1,
                              "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                              "type": "string"
                            },
                            "port": {
                              "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                              "format": "int32",
                              "maximum": 65535,
                              "minimum": 1,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object",
                          "x-kubernetes-validations": [
                            {
                              "message": "Must have port for Service reference",
                              "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                            }
                          ],
                          "additionalProperties": false
                        },
                        "clientAuth": {
                          "description": "Client authentication for the token endpoint.",
                          "properties": {
                            "clientId": {
                              "description": "Client ID sent to the token endpoint.",
                              "minLength": 1,
                              "type": "string"
                            },
                            "method": {
                              "description": "Client authentication method. Defaults to ClientSecretBasic.",
                              "enum": [
                                "ClientSecretBasic",
                                "ClientSecretPost",
                                "PrivateKeyJwt"
                              ],
                              "type": "string"
                            },
                            "privateKeyJwt": {
                              "description": "Client assertion settings. Required when method is PrivateKeyJwt.",
                              "properties": {
                                "alg": {
                                  "description": "JWS signing algorithm. Defaults to RS256.",
                                  "enum": [
                                    "ES256",
                                    "ES384",
                                    "PS256",
                                    "RS256",
                                    "RS384",
                                    "RS512"
                                  ],
                                  "type": "string"
                                },
                                "assertionAudience": {
                                  "description": "Audience for the client assertion, typically the token endpoint URL.",
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "certificateHeader": {
                                  "description": "JWS certificate header. Required when certificateRef is set.",
                                  "enum": [
                                    "x5c",
                                    "x5t#S256"
                                  ],
                                  "type": "string"
                                },
                                "certificateRef": {
                                  "description": "PEM-encoded X.509 certificate chain, leaf first, for certificateHeader. The\nleaf public key should match signingKeyRef; a mismatch only logs a warning\nbut the token endpoint will reject the assertions. Required when\ncertificateHeader is set. The key defaults to `certificate`.",
                                  "properties": {
                                    "group": {
                                      "description": "API group of the referenced credential; empty selects the core API group",
                                      "type": "string"
                                    },
                                    "key": {
                                      "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                      "maxLength": 253,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "kind": {
                                      "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                      "type": "string"
                                    },
                                    "name": {
                                      "description": "Name of the referenced credential",
                                      "maxLength": 253,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name"
                                  ],
                                  "type": "object",
                                  "x-kubernetes-map-type": "atomic",
                                  "x-kubernetes-validations": [
                                    {
                                      "message": "custom credential refs must set both group and kind",
                                      "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                    }
                                  ],
                                  "additionalProperties": false
                                },
                                "kid": {
                                  "description": "Optional JWS key ID header.",
                                  "type": "string"
                                },
                                "signingKeyRef": {
                                  "description": "PEM-encoded RSA or EC private key; key defaults to `signingKey`.",
                                  "properties": {
                                    "group": {
                                      "description": "API group of the referenced credential; empty selects the core API group",
                                      "type": "string"
                                    },
                                    "key": {
                                      "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                      "maxLength": 253,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "kind": {
                                      "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                      "type": "string"
                                    },
                                    "name": {
                                      "description": "Name of the referenced credential",
                                      "maxLength": 253,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name"
                                  ],
                                  "type": "object",
                                  "x-kubernetes-map-type": "atomic",
                                  "x-kubernetes-validations": [
                                    {
                                      "message": "custom credential refs must set both group and kind",
                                      "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                    }
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "assertionAudience",
                                "signingKeyRef"
                              ],
                              "type": "object",
                              "x-kubernetes-validations": [
                                {
                                  "message": "certificateRef and certificateHeader must be set together",
                                  "rule": "has(self.certificateRef) == has(self.certificateHeader)"
                                }
                              ],
                              "additionalProperties": false
                            },
                            "secretRef": {
                              "description": "Secret providing the `clientSecret` key by default; override via\n`secretRef.key`. When omitted, client_id is sent without a secret, which\nis only valid with ClientSecretPost.",
                              "properties": {
                                "group": {
                                  "description": "API group of the referenced credential; empty selects the core API group",
                                  "type": "string"
                                },
                                "key": {
                                  "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                  "maxLength": 253,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "kind": {
                                  "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                  "type": "string"
                                },
                                "name": {
                                  "description": "Name of the referenced credential",
                                  "maxLength": 253,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "x-kubernetes-map-type": "atomic",
                              "x-kubernetes-validations": [
                                {
                                  "message": "custom credential refs must set both group and kind",
                                  "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                }
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "clientId"
                          ],
                          "type": "object",
                          "x-kubernetes-validations": [
                            {
                              "message": "privateKeyJwt settings require method PrivateKeyJwt",
                              "rule": "has(self.privateKeyJwt) == (has(self.method) && self.method == 'PrivateKeyJwt')"
                            },
                            {
                              "message": "secretRef is not valid with method PrivateKeyJwt",
                              "rule": "!has(self.secretRef) || !has(self.method) || self.method != 'PrivateKeyJwt'"
                            },
                            {
                              "message": "clientAuth without secretRef requires method ClientSecretPost or PrivateKeyJwt",
                              "rule": "has(self.secretRef) || has(self.privateKeyJwt) || (has(self.method) && self.method == 'ClientSecretPost')"
                            }
                          ],
                          "additionalProperties": false
                        },
                        "path": {
                          "description": "Token endpoint path; defaults to \"/\". Must start with \"/\".",
                          "pattern": "^/",
                          "type": "string"
                        },
                        "url": {
                          "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                          "maxLength": 1024,
                          "minLength": 1,
                          "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "clientAuth"
                      ],
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "path may not be set when url is set",
                          "rule": "has(self.url) ? !has(self.path) : true"
                        },
                        {
                          "message": "exactly one of the fields in [backendRef url] must be set",
                          "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "resources": {
                      "description": "Resources sent to the token endpoint.",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 64,
                      "minItems": 1,
                      "type": "array"
                    },
                    "scopes": {
                      "description": "Scopes requested when obtaining the ID-JAG from the identity provider.",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 64,
                      "minItems": 1,
                      "type": "array"
                    },
                    "subjectToken": {
                      "description": "Subject token sent to the identity provider. Defaults to an OpenID Connect\nID token read from the Authorization Bearer header.",
                      "properties": {
                        "source": {
                          "description": "Where to read the subject token. Defaults to the Authorization Bearer header.",
                          "properties": {
                            "cookie": {
                              "properties": {
                                "name": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            },
                            "expression": {
                              "description": "CEL expression that extracts the credential from the request.",
                              "maxLength": 16384,
                              "minLength": 1,
                              "type": "string"
                            },
                            "header": {
                              "properties": {
                                "name": {
                                  "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                  "type": "string"
                                },
                                "prefix": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            },
                            "queryParameter": {
                              "properties": {
                                "name": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            }
                          },
                          "type": "object",
                          "x-kubernetes-validations": [
                            {
                              "message": "exactly one of the fields in [header queryParameter cookie expression] must be set",
                              "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0)+(has(self.expression)?1:0) == 1"
                            }
                          ],
                          "additionalProperties": false
                        },
                        "tokenType": {
                          "description": "OAuth RFC 8693 subject token type. Defaults to IdToken",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "tokenType IdJag is not supported by crossAppAccess",
                          "rule": "!has(self.tokenType) || (self.tokenType != 'IdJag' && self.tokenType != 'urn:ietf:params:oauth:token-type:id-jag')"
                        }
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "audience",
                    "identityProvider",
                    "resourceAuthorizationServer"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "gcp": {
                  "description": "Google authentication method for the backend.\nWhen omitted, default Google credential discovery is used.",
                  "properties": {
                    "audience": {
                      "description": "Explicit `aud` value for the ID token. Only\nvalid with `IdToken` type. If not set, the `aud` is automatically\nderived from the backend hostname.",
                      "maxLength": 256,
                      "minLength": 1,
                      "type": "string"
                    },
                    "secretRef": {
                      "description": "Credential source for ADC-compatible Google credential JSON, defaulting to\na Kubernetes `Secret`. By default, the value is read from\n`credentials.json`; set `secretRef.key` to override it. When omitted,\nambient credentials are used.",
                      "properties": {
                        "group": {
                          "description": "API group of the referenced credential; empty selects the core API group",
                          "type": "string"
                        },
                        "key": {
                          "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                          "maxLength": 253,
                          "minLength": 1,
                          "type": "string"
                        },
                        "kind": {
                          "description": "Kind of the referenced credential; empty defaults to `Secret`",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name of the referenced credential",
                          "maxLength": 253,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "x-kubernetes-map-type": "atomic",
                      "x-kubernetes-validations": [
                        {
                          "message": "custom credential refs must set both group and kind",
                          "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "type": {
                      "description": "The type of token to generate. To authenticate to GCP services,\ngenerally an `AccessToken` is used. To authenticate to Cloud Run, an\n`IdToken` is used.",
                      "enum": [
                        "AccessToken",
                        "IdToken"
                      ],
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "audience is only valid with IdToken",
                      "rule": "has(self.audience) ? self.type == 'IdToken' : true"
                    }
                  ],
                  "additionalProperties": false
                },
                "jwtSign": {
                  "description": "Signs a short-lived JWT with a private key on each request and sends it\nto the backend, for upstreams that require per-request keypair JWTs\n(e.g. the Snowflake SQL API) rather than a static credential.",
                  "properties": {
                    "alg": {
                      "description": "JWS signing algorithm. Defaults to RS256.",
                      "enum": [
                        "ES256",
                        "ES384",
                        "PS256",
                        "RS256",
                        "RS384",
                        "RS512"
                      ],
                      "type": "string"
                    },
                    "claims": {
                      "additionalProperties": {
                        "x-kubernetes-preserve-unknown-fields": true
                      },
                      "description": "Static claims added to every token (e.g. iss, sub, aud). Values may be\nany JSON value (e.g. a string, number, bool, or array). iat, exp, and\nnbf are reserved for the signer and cannot be configured here; the\ncontroller rejects them at translation time.",
                      "type": "object"
                    },
                    "kid": {
                      "description": "Optional JWS key ID header.",
                      "type": "string"
                    },
                    "location": {
                      "description": "Where the signed token is written on the backend request.\nDefaults to the Authorization header with a \"Bearer \" prefix.",
                      "properties": {
                        "cookie": {
                          "properties": {
                            "name": {
                              "maxLength": 256,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        },
                        "header": {
                          "properties": {
                            "name": {
                              "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                              "maxLength": 256,
                              "minLength": 1,
                              "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                              "type": "string"
                            },
                            "prefix": {
                              "maxLength": 256,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        },
                        "queryParameter": {
                          "properties": {
                            "name": {
                              "maxLength": 256,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        }
                      },
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "exactly one of the fields in [header queryParameter cookie] must be set",
                          "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0) == 1"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "signingKeyRef": {
                      "description": "Secret providing the `signingKey` key with a PEM-encoded RSA or EC private key.",
                      "properties": {
                        "group": {
                          "description": "API group of the referenced credential; empty selects the core API group",
                          "type": "string"
                        },
                        "kind": {
                          "description": "Kind of the referenced credential; empty defaults to `Secret`",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name of the referenced credential",
                          "maxLength": 253,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "x-kubernetes-map-type": "atomic",
                      "x-kubernetes-validations": [
                        {
                          "message": "custom credential refs must set both group and kind",
                          "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "ttl": {
                      "description": "Token lifetime used for exp. Defaults to 300s.",
                      "maxLength": 32,
                      "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                      "type": "string",
                      "x-kubernetes-validations": [
                        {
                          "message": "ttl must be at least 1 second",
                          "rule": "duration(self) >= duration('1s')"
                        }
                      ]
                    }
                  },
                  "required": [
                    "signingKeyRef"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "key": {
                  "description": "Inline key to use as the value of the\n`Authorization` header. This option is the least secure; usage of a\n`Secret` is preferred.",
                  "maxLength": 2048,
                  "type": "string"
                },
                "location": {
                  "description": "Where backend credentials are inserted.\nIf omitted, credentials are written to the `Authorization` header with the `Bearer ` prefix.\nThis applies to `key`, `secretRef`, and `passthrough`. Entries in `credentials` carry their own location.",
                  "properties": {
                    "cookie": {
                      "properties": {
                        "name": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "header": {
                      "properties": {
                        "name": {
                          "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                          "maxLength": 256,
                          "minLength": 1,
                          "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                          "type": "string"
                        },
                        "prefix": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "queryParameter": {
                      "properties": {
                        "name": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "exactly one of the fields in [header queryParameter cookie] must be set",
                      "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0) == 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "oauthTokenExchange": {
                  "description": "OAuth 2.0 token exchange (RFC 8693) / jwt-bearer (RFC 7523) authentication.",
                  "properties": {
                    "actorToken": {
                      "description": "RFC 8693 delegation actor token. TokenExchange grant only.",
                      "properties": {
                        "mayAct": {
                          "description": "may_act claim validation mode. When omitted, may_act is not enforced.",
                          "enum": [
                            "Required"
                          ],
                          "type": "string"
                        },
                        "source": {
                          "description": "Where to read the actor token. Actor tokens have no default source.",
                          "properties": {
                            "cookie": {
                              "properties": {
                                "name": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            },
                            "expression": {
                              "description": "CEL expression that extracts the credential from the request.",
                              "maxLength": 16384,
                              "minLength": 1,
                              "type": "string"
                            },
                            "header": {
                              "properties": {
                                "name": {
                                  "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                  "type": "string"
                                },
                                "prefix": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            },
                            "queryParameter": {
                              "properties": {
                                "name": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            }
                          },
                          "type": "object",
                          "x-kubernetes-validations": [
                            {
                              "message": "exactly one of the fields in [header queryParameter cookie expression] must be set",
                              "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0)+(has(self.expression)?1:0) == 1"
                            }
                          ],
                          "additionalProperties": false
                        },
                        "tokenType": {
                          "description": "OAuth token type. Empty defaults to AccessToken. Custom absolute URI values\nare supported for actor tokens.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "source"
                      ],
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "mayAct Required requires tokenType Jwt",
                          "rule": "!has(self.mayAct) || self.mayAct != 'Required' || (has(self.tokenType) && self.tokenType == 'Jwt')"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "additionalParams": {
                      "additionalProperties": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "description": "Extra form params; values are CEL expressions over the incoming request.",
                      "maxProperties": 64,
                      "type": "object"
                    },
                    "audiences": {
                      "description": "Audiences sent to the token endpoint.",
                      "items": {
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxItems": 64,
                      "minItems": 1,
                      "type": "array"
                    },
                    "backendRef": {
                      "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                      "properties": {
                        "group": {
                          "default": "",
                          "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                          "maxLength": 253,
                          "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                          "type": "string"
                        },
                        "kind": {
                          "default": "Service",
                          "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name is the name of the referent.",
                          "maxLength": 253,
                          "minLength": 1,
                          "type": "string"
                        },
                        "namespace": {
                          "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                          "type": "string"
                        },
                        "port": {
                          "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                          "format": "int32",
                          "maximum": 65535,
                          "minimum": 1,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "Must have port for Service reference",
                          "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "cache": {
                      "description": "Response cache configuration.",
                      "properties": {
                        "inMemory": {
                          "properties": {
                            "defaultTtl": {
                              "description": "TTL used when the token endpoint omits expires_in. Default 300s.",
                              "maxLength": 32,
                              "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                              "type": "string",
                              "x-kubernetes-validations": [
                                {
                                  "message": "defaultTtl must be at least 1 second",
                                  "rule": "duration(self) >= duration('1s')"
                                }
                              ]
                            },
                            "maxEntries": {
                              "description": "Default 8192; 0 disables the cache.",
                              "format": "int32",
                              "type": "integer"
                            }
                          },
                          "type": "object",
                          "additionalProperties": false
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "clientAuth": {
                      "description": "Client authentication for the token endpoint. When unset, none is sent.",
                      "properties": {
                        "clientId": {
                          "description": "Client ID sent to the token endpoint.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "method": {
                          "description": "Client authentication method. Defaults to ClientSecretBasic.",
                          "enum": [
                            "ClientSecretBasic",
                            "ClientSecretPost",
                            "PrivateKeyJwt"
                          ],
                          "type": "string"
                        },
                        "privateKeyJwt": {
                          "description": "Client assertion settings. Required when method is PrivateKeyJwt.",
                          "properties": {
                            "alg": {
                              "description": "JWS signing algorithm. Defaults to RS256.",
                              "enum": [
                                "ES256",
                                "ES384",
                                "PS256",
                                "RS256",
                                "RS384",
                                "RS512"
                              ],
                              "type": "string"
                            },
                            "assertionAudience": {
                              "description": "Audience for the client assertion, typically the token endpoint URL.",
                              "minLength": 1,
                              "type": "string"
                            },
                            "certificateHeader": {
                              "description": "JWS certificate header. Required when certificateRef is set.",
                              "enum": [
                                "x5c",
                                "x5t#S256"
                              ],
                              "type": "string"
                            },
                            "certificateRef": {
                              "description": "PEM-encoded X.509 certificate chain, leaf first, for certificateHeader. The\nleaf public key should match signingKeyRef; a mismatch only logs a warning\nbut the token endpoint will reject the assertions. Required when\ncertificateHeader is set. The key defaults to `certificate`.",
                              "properties": {
                                "group": {
                                  "description": "API group of the referenced credential; empty selects the core API group",
                                  "type": "string"
                                },
                                "key": {
                                  "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                  "maxLength": 253,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "kind": {
                                  "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                  "type": "string"
                                },
                                "name": {
                                  "description": "Name of the referenced credential",
                                  "maxLength": 253,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "x-kubernetes-map-type": "atomic",
                              "x-kubernetes-validations": [
                                {
                                  "message": "custom credential refs must set both group and kind",
                                  "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                }
                              ],
                              "additionalProperties": false
                            },
                            "kid": {
                              "description": "Optional JWS key ID header.",
                              "type": "string"
                            },
                            "signingKeyRef": {
                              "description": "PEM-encoded RSA or EC private key; key defaults to `signingKey`.",
                              "properties": {
                                "group": {
                                  "description": "API group of the referenced credential; empty selects the core API group",
                                  "type": "string"
                                },
                                "key": {
                                  "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                                  "maxLength": 253,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "kind": {
                                  "description": "Kind of the referenced credential; empty defaults to `Secret`",
                                  "type": "string"
                                },
                                "name": {
                                  "description": "Name of the referenced credential",
                                  "maxLength": 253,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "x-kubernetes-map-type": "atomic",
                              "x-kubernetes-validations": [
                                {
                                  "message": "custom credential refs must set both group and kind",
                                  "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                                }
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "assertionAudience",
                            "signingKeyRef"
                          ],
                          "type": "object",
                          "x-kubernetes-validations": [
                            {
                              "message": "certificateRef and certificateHeader must be set together",
                              "rule": "has(self.certificateRef) == has(self.certificateHeader)"
                            }
                          ],
                          "additionalProperties": false
                        },
                        "secretRef": {
                          "description": "Secret providing the `clientSecret` key by default; override via\n`secretRef.key`. When omitted, client_id is sent without a secret, which\nis only valid with ClientSecretPost.",
                          "properties": {
                            "group": {
                              "description": "API group of the referenced credential; empty selects the core API group",
                              "type": "string"
                            },
                            "key": {
                              "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                              "maxLength": 253,
                              "minLength": 1,
                              "type": "string"
                            },
                            "kind": {
                              "description": "Kind of the referenced credential; empty defaults to `Secret`",
                              "type": "string"
                            },
                            "name": {
                              "description": "Name of the referenced credential",
                              "maxLength": 253,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object",
                          "x-kubernetes-map-type": "atomic",
                          "x-kubernetes-validations": [
                            {
                              "message": "custom credential refs must set both group and kind",
                              "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                            }
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "clientId"
                      ],
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "privateKeyJwt settings require method PrivateKeyJwt",
                          "rule": "has(self.privateKeyJwt) == (has(self.method) && self.method == 'PrivateKeyJwt')"
                        },
                        {
                          "message": "secretRef is not valid with method PrivateKeyJwt",
                          "rule": "!has(self.secretRef) || !has(self.method) || self.method != 'PrivateKeyJwt'"
                        },
                        {
                          "message": "clientAuth without secretRef requires method ClientSecretPost or PrivateKeyJwt",
                          "rule": "has(self.secretRef) || has(self.privateKeyJwt) || (has(self.method) && self.method == 'ClientSecretPost')"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "grantType": {
                      "description": "RFC followed by the request. Defaults to TokenExchange (RFC 8693).",
                      "enum": [
                        "JwtBearer",
                        "TokenExchange"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "description": "Where the exchanged token is written to the backend request.\nDefaults to Authorization: Bearer.",
                      "properties": {
                        "cookie": {
                          "properties": {
                            "name": {
                              "maxLength": 256,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        },
                        "header": {
                          "properties": {
                            "name": {
                              "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                              "maxLength": 256,
                              "minLength": 1,
                              "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                              "type": "string"
                            },
                            "prefix": {
                              "maxLength": 256,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        },
                        "queryParameter": {
                          "properties": {
                            "name": {
                              "maxLength": 256,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        }
                      },
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "exactly one of the fields in [header queryParameter cookie] must be set",
                          "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0) == 1"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "path": {
                      "description": "Token endpoint path; defaults to \"/\". Must start with \"/\".",
                      "pattern": "^/",
                      "type": "string"
                    },
                    "requestedTokenType": {
                      "description": "RFC 8693 requested_token_type. Unlike subject/actor token types, only the\nbuilt-in values may be requested; custom URIs are not supported here.",
                      "enum": [
                        "AccessToken",
                        "Jwt",
                        "IdToken",
                        "IdJag"
                      ],
                      "type": "string"
                    },
                    "resources": {
                      "description": "Resources sent to the token endpoint.",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 64,
                      "minItems": 1,
                      "type": "array"
                    },
                    "scopes": {
                      "description": "Scopes sent to the token endpoint.",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 64,
                      "minItems": 1,
                      "type": "array"
                    },
                    "subjectToken": {
                      "description": "Subject token / assertion source and type. Defaults to Authorization Bearer, AccessToken.\nThe token type may be a built-in value or a custom absolute URI for providers\nthat support custom token exchange profiles.",
                      "properties": {
                        "source": {
                          "description": "Where to read the token. CEL `expression` variant is permitted.",
                          "properties": {
                            "cookie": {
                              "properties": {
                                "name": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            },
                            "expression": {
                              "description": "CEL expression that extracts the credential from the request.",
                              "maxLength": 16384,
                              "minLength": 1,
                              "type": "string"
                            },
                            "header": {
                              "properties": {
                                "name": {
                                  "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                  "type": "string"
                                },
                                "prefix": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            },
                            "queryParameter": {
                              "properties": {
                                "name": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            }
                          },
                          "type": "object",
                          "x-kubernetes-validations": [
                            {
                              "message": "exactly one of the fields in [header queryParameter cookie expression] must be set",
                              "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0)+(has(self.expression)?1:0) == 1"
                            }
                          ],
                          "additionalProperties": false
                        },
                        "tokenType": {
                          "description": "OAuth token type. Empty defaults to AccessToken. Custom absolute URI values\nare supported for subject tokens.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "url": {
                      "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                      "maxLength": 1024,
                      "minLength": 1,
                      "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "actorToken is only valid with TokenExchange grantType",
                      "rule": "!(has(self.actorToken) && has(self.grantType) && self.grantType == 'JwtBearer')"
                    },
                    {
                      "message": "requestedTokenType is only valid with TokenExchange grantType",
                      "rule": "!(has(self.requestedTokenType) && has(self.grantType) && self.grantType == 'JwtBearer')"
                    },
                    {
                      "message": "requestedTokenType IdJag is only supported by crossAppAccess",
                      "rule": "!has(self.requestedTokenType) || self.requestedTokenType != 'IdJag'"
                    },
                    {
                      "message": "path may not be set when url is set",
                      "rule": "has(self.url) ? !has(self.path) : true"
                    },
                    {
                      "message": "exactly one of the fields in [backendRef url] must be set",
                      "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "passthrough": {
                  "description": "Reuses a client token already validated by another policy. Those policies\nmay strip client credentials; passthrough adds the original token back to\nthe backend request. Without client auth policies, this has no effect.",
                  "type": "object"
                },
                "secretRef": {
                  "description": "Credential source for the authorization value, defaulting to a Kubernetes\n`Secret`. By default, the value is read from the `Authorization` key; set\n`secretRef.key` to override it. A `Bearer ` prefix is stripped only from\nthe default `Authorization` key.",
                  "properties": {
                    "group": {
                      "description": "API group of the referenced credential; empty selects the core API group",
                      "type": "string"
                    },
                    "key": {
                      "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                      "maxLength": 253,
                      "minLength": 1,
                      "type": "string"
                    },
                    "kind": {
                      "description": "Kind of the referenced credential; empty defaults to `Secret`",
                      "type": "string"
                    },
                    "name": {
                      "description": "Name of the referenced credential",
                      "maxLength": 253,
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object",
                  "x-kubernetes-map-type": "atomic",
                  "x-kubernetes-validations": [
                    {
                      "message": "custom credential refs must set both group and kind",
                      "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                    }
                  ],
                  "additionalProperties": false
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "must specify credentials, or at most one of key/secretRef/passthrough/aws/azure/gcp/oauthTokenExchange/crossAppAccess/jwtSign (credentials may be combined with a primary auth kind)",
                  "rule": "has(self.credentials) || has(self.key) || has(self.secretRef) || has(self.passthrough) || has(self.aws) || has(self.azure) || has(self.gcp) || has(self.oauthTokenExchange) || has(self.crossAppAccess) || has(self.jwtSign)"
                },
                {
                  "message": "location may only be set for key, secretRef, or passthrough auth",
                  "rule": "has(self.location) ? has(self.key) || has(self.secretRef) || has(self.passthrough) : true"
                },
                {
                  "message": "at most one of the fields in [key secretRef passthrough aws azure gcp oauthTokenExchange crossAppAccess jwtSign] may be set",
                  "rule": "(has(self.key)?1:0)+(has(self.secretRef)?1:0)+(has(self.passthrough)?1:0)+(has(self.aws)?1:0)+(has(self.azure)?1:0)+(has(self.gcp)?1:0)+(has(self.oauthTokenExchange)?1:0)+(has(self.crossAppAccess)?1:0)+(has(self.jwtSign)?1:0) <= 1"
                }
              ],
              "additionalProperties": false
            },
            "authorization": {
              "description": "Authorization rules that clients must satisfy after this backend is selected.\nUnlike traffic authorization, this policy is evaluated against the request\nassociated with the selected destination backend.",
              "properties": {
                "action": {
                  "description": "The effect of this rule when it matches.\nIf unspecified, defaults to `Allow`.\n`Require` rules are cumulative: all require rules must match.",
                  "enum": [
                    "Allow",
                    "Deny",
                    "Require"
                  ],
                  "type": "string"
                },
                "policy": {
                  "description": "The authorization rule to evaluate.\n\n* `Allow`: any matching allow rule allows the request.\n* `Require`: every require rule must match for the request to be allowed.\n* `Deny`: any matching deny rule denies the request.\n\n`Deny` is not recommended because expression failures fail to deny; prefer\n`Allow` or `Require`. If used, design expressions defensively against evaluation errors.\n\nIf at least one `Allow` rule is configured, requests are denied unless at\nleast one allow rule matches.",
                  "properties": {
                    "matchExpressions": {
                      "description": "CEL expressions that must all evaluate to true for the rule to match.",
                      "items": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxItems": 256,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "matchExpressions"
                  ],
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "required": [
                "policy"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "extAuth": {
              "description": "External authentication configuration for requests\nsent to this backend.",
              "properties": {
                "backendRef": {
                  "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                  "properties": {
                    "group": {
                      "default": "",
                      "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                      "maxLength": 253,
                      "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                      "type": "string"
                    },
                    "kind": {
                      "default": "Service",
                      "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                      "type": "string"
                    },
                    "name": {
                      "description": "Name is the name of the referent.",
                      "maxLength": 253,
                      "minLength": 1,
                      "type": "string"
                    },
                    "namespace": {
                      "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    },
                    "port": {
                      "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                      "format": "int32",
                      "maximum": 65535,
                      "minimum": 1,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "Must have port for Service reference",
                      "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                    }
                  ],
                  "additionalProperties": false
                },
                "cache": {
                  "description": "Caches authorization results.\n\nWARNING: the safety of this feature depends on the cache key accurately\ncapturing every request property that the authorization service uses to\nmake a decision. For example, if the service returns different results\nbased on both path and authorization header, both must be included in\n`key`; otherwise, one request may incorrectly reuse another request's\nauthorization result.\n\nIf any key expression fails to evaluate or produces an unsupported value,\nthe request is still sent to the authorization service, but its result is\nnot read from or written to the cache.",
                  "properties": {
                    "key": {
                      "description": "Ordered list of CEL expressions evaluated against the request\nto construct the cache key.",
                      "items": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array"
                    },
                    "maxEntries": {
                      "description": "Maximum number of authorization results to keep in\nthe cache. If unset, this defaults to 10000.",
                      "format": "int32",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "ttl": {
                      "description": "Duration string, such as `5m`, or a CEL expression that\nreturns the duration that cached authorization results may be reused, or a\ntimestamp when the cached authorization result expires. The expression is\nevaluated after the authorization response has been applied to the request.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "key",
                    "ttl"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "failureMode": {
                  "description": "Behavior when the external authorization service is\nunavailable or returns an error. \"FailOpen\" allows the request to continue.\n\"FailClosed\" (default) denies the request.",
                  "enum": [
                    "FailClosed",
                    "FailOpen"
                  ],
                  "type": "string"
                },
                "forwardBody": {
                  "description": "Whether to include the HTTP body in the authorization request.\nIf enabled, the request body will be buffered.",
                  "properties": {
                    "maxSize": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "Largest body, in bytes, that will be buffered\nand sent to the authorization server. If the body size is larger than\n`maxSize`, then the request will be rejected with a response.",
                      "maxLength": 32,
                      "minLength": 1,
                      "pattern": "^[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)(([KMGTPE]i)|[numkMGTPE]|[eE](\\+?0*([0-9]|1[0-8])|-0*[0-9]))?$",
                      "x-kubernetes-int-or-string": true,
                      "x-kubernetes-validations": [
                        {
                          "message": "value must be at least 1 byte and fit within uint32",
                          "rule": "(self >= 1 && self <= 4294967295) || self.size() > 0"
                        }
                      ]
                    }
                  },
                  "required": [
                    "maxSize"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "grpc": {
                  "description": "Uses the gRPC External Authorization\n[protocol](https://www.envoyproxy.io/docs/envoy/latest/api-v3/service/auth/v3/external_auth.proto) should be used.",
                  "properties": {
                    "contextExtensions": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "Additional arbitrary key-value pairs to\nsend to the authorization server in the `context_extensions` field.",
                      "maxProperties": 64,
                      "type": "object"
                    },
                    "requestMetadata": {
                      "additionalProperties": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "description": "Metadata to send to the authorization\nserver. This maps to the `metadata_context.filter_metadata` field of the\nrequest, and allows dynamic CEL expressions. If unset, by default the\n`envoy.filters.http.jwt_authn` key is set if the JWT policy is used as\nwell, for compatibility.",
                      "maxProperties": 64,
                      "type": "object"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "http": {
                  "description": "Uses HTTP to connect to\nthe authorization server. The authorization server must return a `200`\nstatus code, otherwise the request is considered an authorization\nfailure.",
                  "properties": {
                    "addRequestHeaders": {
                      "additionalProperties": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "description": "Additional headers to add to the\nrequest to the authorization server. While `allowedRequestHeaders` just\npasses the original headers through, `addRequestHeaders` allows defining\ncustom headers based on CEL expressions.",
                      "maxProperties": 64,
                      "type": "object"
                    },
                    "allowedRequestHeaders": {
                      "description": "Additional headers from the client request that\nwill be sent to the authorization server.\n\nIf unset, the following headers are sent by default: `Authorization`.",
                      "items": {
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxItems": 64,
                      "type": "array"
                    },
                    "allowedResponseHeaders": {
                      "description": "Headers from the authorization response that\nwill be copied into the request to the backend.",
                      "items": {
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxItems": 64,
                      "type": "array"
                    },
                    "body": {
                      "description": "Body is a CEL expression that produces the HTTP authorization request body.\nStrings and bytes are used directly; other values are JSON-encoded.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "path": {
                      "description": "Path to send to the authorization server. If\nunset, this defaults to the original request path.\nThis is a CEL expression, which allows customizing the path based on the\nincoming request. For example, to add a prefix, use\n`\"/prefix/\" + request.path`.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "redirect": {
                      "description": "Optional expression that determines a path to\nredirect to on authorization failure. This is useful to redirect to a\nsign-in page.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "responseMetadata": {
                      "additionalProperties": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "description": "Metadata fields to construct\nfrom the authorization response. These will be included under the\n`extauthz` variable in future CEL expressions. Setting this is useful\nfor things like logging usernames, without needing to include them as\nheaders to the backend, as `allowedResponseHeaders` would.",
                      "maxProperties": 64,
                      "type": "object"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "url": {
                  "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                  "maxLength": 1024,
                  "minLength": 1,
                  "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                  "type": "string"
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "exactly one of backendRef or url must be set",
                  "rule": "[has(self.backendRef),has(self.url)].filter(x,x==true).size() == 1"
                },
                {
                  "message": "forwardBody cannot be used with http.body",
                  "rule": "!(has(self.forwardBody) && has(self.http) && has(self.http.body))"
                },
                {
                  "message": "url path is only valid with http",
                  "rule": "!has(self.url) || !self.url.matches('^https?://[^/?#]+/') || has(self.http)"
                },
                {
                  "message": "http.path may not be set when url includes a path",
                  "rule": "!has(self.url) || !self.url.matches('^https?://[^/?#]+/') || !has(self.http) || !has(self.http.path)"
                }
              ],
              "additionalProperties": false
            },
            "health": {
              "description": "Settings for passive and active health checking.",
              "properties": {
                "eviction": {
                  "description": "Settings for evicting unhealthy backends.",
                  "properties": {
                    "consecutiveFailures": {
                      "description": "Number of consecutive unhealthy responses required before the backend is evicted.\nFor example, a value of 5 means the backend must receive 5 unhealthy responses in a row before being evicted.\nWhen both consecutiveFailures and healthThreshold are set, the backend is evicted when either condition is met.\nWhen neither is set, a single unhealthy response can trigger eviction.",
                      "format": "int32",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "duration": {
                      "description": "Base time a backend should be evicted after being marked unhealthy.\nSubsequent evictions use multiplicative backoff (duration * times_evicted).\nIf all endpoints are evicted, the load balancer falls back to returning evicted endpoints\nrather than failing entirely.\nIf unset, defaults to `3s`.",
                      "maxLength": 32,
                      "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                      "type": "string",
                      "x-kubernetes-validations": [
                        {
                          "message": "duration must be at least 1 second",
                          "rule": "duration(self) >= duration('1s')"
                        }
                      ]
                    },
                    "healthThreshold": {
                      "description": "EWMA health score threshold, from 0 to 100. When set, a backend is evicted\nonly if its computed health drops below this value after an unhealthy\nresponse (e.g. 50 evicts when EWMA health falls below 50%). Unlike\nconsecutiveFailures, this sliding-window average lets a single success delay\neviction. If both are set, either condition evicts; if neither, a single\nunhealthy response evicts.",
                      "format": "int32",
                      "maximum": 100,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "restoreHealth": {
                      "description": "Health score from 0 to 100 assigned to a backend when it returns from eviction.\nFor gradual recovery, set below 100; for full recovery immediately, set 100.\nIf unset, the backend resumes with the health it had when evicted.",
                      "format": "int32",
                      "maximum": 100,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "unhealthyCondition": {
                  "description": "CEL expression that determines whether a response indicates an unhealthy backend.\nWhen the expression evaluates to true, the backend is considered unhealthy and may be evicted.\n\nFor example, to evict on 5xx responses: `response.code >= 500`.\n\nWhen unset, any 5xx response, or a connection failure, is treated as unhealthy.\nThis default lowers the backend's health score but does not trigger eviction on its own.",
                  "maxLength": 16384,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "http": {
              "description": "Settings for managing HTTP requests to the backend",
              "properties": {
                "requestTimeout": {
                  "description": "Deadline for receiving a response from the backend.",
                  "maxLength": 32,
                  "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                  "type": "string",
                  "x-kubernetes-validations": [
                    {
                      "message": "requestTimeout must be at least 1ms",
                      "rule": "duration(self) >= duration('1ms')"
                    }
                  ]
                },
                "version": {
                  "description": "HTTP protocol version for backend connections. If unset, it is inferred:\n`Service` appProtocol, `HTTP2` for gRPC, the original protocol for\nplaintext HTTP, or `HTTP1` for HTTPS because clients often upgrade HTTPS\nto HTTP/2 even when the backend does not support it.",
                  "enum": [
                    "HTTP1",
                    "HTTP2"
                  ],
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "mcp": {
              "description": "Settings for MCP workloads. This is only applicable when\nconnecting to a `Backend` of type `mcp`.",
              "properties": {
                "authentication": {
                  "description": "MCP backend-specific authentication rules.\n\nThis field is deprecated; prefer to use traffic policy `jwtAuthentication.mcp`, which ensures authentication runs before\nother policies such as transformation and rate limiting.",
                  "properties": {
                    "audiences": {
                      "description": "Allowed audiences that are allowed\naccess. This corresponds to the `aud` claim\n([RFC 7519 \u00a74.1.3](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3)).\nIf unset, any audience is allowed.",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 64,
                      "minItems": 1,
                      "type": "array"
                    },
                    "clientId": {
                      "description": "Client ID to use for short-circuiting Dynamic Client Registration.\nIf set, the gateway will not proxy registration requests to the IDP and instead return this client ID.",
                      "type": "string"
                    },
                    "clientSecretRef": {
                      "description": "Reference to a Kubernetes Secret holding the OAuth client secret of the app\nregistration identified by `clientId` (for example Entra ID confidential clients,\nwhich require the secret at the token endpoint). The gateway injects it into the\ntoken requests it proxies to the provider. Defaults to the `clientSecret` key;\noverride via `clientSecretRef.key`.",
                      "properties": {
                        "group": {
                          "description": "API group of the referenced credential; empty selects the core API group",
                          "type": "string"
                        },
                        "key": {
                          "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                          "maxLength": 253,
                          "minLength": 1,
                          "type": "string"
                        },
                        "kind": {
                          "description": "Kind of the referenced credential; empty defaults to `Secret`",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name of the referenced credential",
                          "maxLength": 253,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "x-kubernetes-map-type": "atomic",
                      "x-kubernetes-validations": [
                        {
                          "message": "custom credential refs must set both group and kind",
                          "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "issuer": {
                      "description": "IdP that issued the JWT. This corresponds to the\n`iss` claim ([RFC 7519 \u00a74.1.1](https://tools.ietf.org/html/rfc7519#section-4.1.1)).",
                      "maxLength": 256,
                      "minLength": 1,
                      "type": "string"
                    },
                    "jwks": {
                      "description": "Remote JSON Web Key used to validate the signature of\nthe JWT.",
                      "properties": {
                        "backendRef": {
                          "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                          "properties": {
                            "group": {
                              "default": "",
                              "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                              "maxLength": 253,
                              "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                              "type": "string"
                            },
                            "kind": {
                              "default": "Service",
                              "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                              "maxLength": 63,
                              "minLength": 1,
                              "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                              "type": "string"
                            },
                            "name": {
                              "description": "Name is the name of the referent.",
                              "maxLength": 253,
                              "minLength": 1,
                              "type": "string"
                            },
                            "namespace": {
                              "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                              "maxLength": 63,
                              "minLength": 1,
                              "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                              "type": "string"
                            },
                            "port": {
                              "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                              "format": "int32",
                              "maximum": 65535,
                              "minimum": 1,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object",
                          "x-kubernetes-validations": [
                            {
                              "message": "Must have port for Service reference",
                              "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                            }
                          ],
                          "additionalProperties": false
                        },
                        "cacheDuration": {
                          "description": "How long a fetched `jwks` document is used before it is re-fetched from the IdP.\nDefaults to `5m`.",
                          "maxLength": 32,
                          "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                          "type": "string",
                          "x-kubernetes-validations": [
                            {
                              "message": "cacheDuration must be at least 5m.",
                              "rule": "duration(self) >= duration('5m')"
                            }
                          ]
                        },
                        "jwksPath": {
                          "description": "Path to the IdP `jwks` endpoint, relative to the root, commonly\n`\".well-known/jwks.json\"`.",
                          "maxLength": 1024,
                          "minLength": 1,
                          "type": "string"
                        },
                        "url": {
                          "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                          "maxLength": 1024,
                          "minLength": 1,
                          "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "jwksPath is required when backendRef is set",
                          "rule": "has(self.backendRef) ? has(self.jwksPath) : true"
                        },
                        {
                          "message": "jwksPath may not be set when url is set",
                          "rule": "has(self.url) ? !has(self.jwksPath) : true"
                        },
                        {
                          "message": "exactly one of the fields in [backendRef url] must be set",
                          "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "mode": {
                      "description": "Validation mode for JWT authentication. Defaults to `Strict`.",
                      "enum": [
                        "Optional",
                        "Permissive",
                        "Strict"
                      ],
                      "type": "string"
                    },
                    "provider": {
                      "description": "Identity provider to use for authentication.",
                      "enum": [
                        "Auth0",
                        "Authentik",
                        "Descope",
                        "Entra",
                        "Keycloak",
                        "Okta"
                      ],
                      "type": "string"
                    },
                    "resourceMetadata": {
                      "additionalProperties": {
                        "x-kubernetes-preserve-unknown-fields": true
                      },
                      "description": "Metadata to use for MCP resources.",
                      "type": "object"
                    },
                    "validation": {
                      "description": "Additional JWT claim presence requirements. Defaults to requiring `exp`.\nIssuer validation always requires `iss`; a non-empty audiences list also\nrequires `aud`, regardless of these options. An empty `requiredClaims`\nlist removes only the additional presence requirements. Expiration is\nstill checked whenever `exp` is present.",
                      "properties": {
                        "requiredClaims": {
                          "description": "Additional claims that must be present in the token payload.\nRecognized values: `exp`, `nbf`, `aud`, `sub`.\nDefaults to `[\"exp\"]` when omitted. An empty list adds no requirements\nbeyond `iss`, which is always required, and `aud`, which is required\nwhen a non-empty audiences list is configured. Expiration is still\nchecked whenever `exp` is present.",
                          "items": {
                            "description": "JWTClaim is a JWT claim whose presence can be required during validation.",
                            "enum": [
                              "aud",
                              "exp",
                              "nbf",
                              "sub"
                            ],
                            "type": "string"
                          },
                          "maxItems": 4,
                          "type": "array",
                          "x-kubernetes-list-type": "atomic"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "jwks"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "authorization": {
                  "description": "MCP backend authorization. Unlike authorization at the HTTP level, which rejects\nunauthorized requests with a `403` error, this policy works at the\n`MCPBackend` level.\n\nList operations, such as `list_tools`, will have each item evaluated.\nItems that do not meet the rule will be filtered.\n\nGet or call operations, such as `call_tool`, will evaluate the specific\nitem and reject requests that do not meet the rule.",
                  "properties": {
                    "action": {
                      "description": "The effect of this rule when it matches.\nIf unspecified, defaults to `Allow`.\n`Require` rules are cumulative: all require rules must match.",
                      "enum": [
                        "Allow",
                        "Deny",
                        "Require"
                      ],
                      "type": "string"
                    },
                    "policy": {
                      "description": "The authorization rule to evaluate.\n\n* `Allow`: any matching allow rule allows the request.\n* `Require`: every require rule must match for the request to be allowed.\n* `Deny`: any matching deny rule denies the request.\n\n`Deny` is not recommended because expression failures fail to deny; prefer\n`Allow` or `Require`. If used, design expressions defensively against evaluation errors.\n\nIf at least one `Allow` rule is configured, requests are denied unless at\nleast one allow rule matches.",
                      "properties": {
                        "matchExpressions": {
                          "description": "CEL expressions that must all evaluate to true for the rule to match.",
                          "items": {
                            "description": "A Common Expression Language (CEL) expression.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          },
                          "maxItems": 256,
                          "minItems": 1,
                          "type": "array"
                        }
                      },
                      "required": [
                        "matchExpressions"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "policy"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "guardrails": {
                  "description": "`guardrails` routes selected JSON-RPC methods through a remote policy server.",
                  "properties": {
                    "processors": {
                      "description": "`processors` is the ordered list of policy processors applied to matched\nmethods. Processors run in the order listed; the first to reject a request\nshort-circuits the chain.",
                      "items": {
                        "description": "MCPGuardrailsProcessor selects a single policy processor. Exactly one variant must be set.",
                        "properties": {
                          "methods": {
                            "additionalProperties": {
                              "description": "MCPMethodPhase controls when an MCP method is run through the guardrails pipeline.",
                              "enum": [
                                "Full",
                                "Off",
                                "Request",
                                "Response"
                              ],
                              "type": "string"
                            },
                            "description": "`methods` is the allowlist of JSON-RPC methods (e.g. `tools/call`,\n`tools/list`) routed through this processor, keyed by method name with the\nphase it runs in. Keys may be exact, a prefix wildcard (`tools/*`), a suffix\nwildcard (`*/list`), or `*` for all methods; the most specific match wins.\nMethods matching no key, including unknown ones, bypass this processor.",
                            "maxProperties": 64,
                            "minProperties": 1,
                            "type": "object",
                            "x-kubernetes-validations": [
                              {
                                "message": "method wildcards must be '*', a prefix like 'tools/*', or a suffix like '*/list'",
                                "rule": "self.all(k, !k.contains('*') || (k.indexOf('*') == k.lastIndexOf('*') && (k.indexOf('*') == 0 || k.indexOf('*') == size(k) - 1)))"
                              }
                            ]
                          },
                          "remote": {
                            "description": "`remote` configures a gRPC policy server.",
                            "properties": {
                              "allowedRequestHeaders": {
                                "description": "`allowedRequestHeaders` lists the incoming request headers forwarded to\nthe policy server in `McpRequest.headers`. If empty, all headers and\npseudo-headers (`:authority`, `:method`, ...) are forwarded. Matching is\ncase-insensitive.",
                                "items": {
                                  "description": "HTTP header name.",
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                  "type": "string",
                                  "x-kubernetes-validations": [
                                    {
                                      "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                      "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                                    }
                                  ]
                                },
                                "maxItems": 64,
                                "type": "array",
                                "x-kubernetes-list-type": "set"
                              },
                              "backendRef": {
                                "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                                "properties": {
                                  "group": {
                                    "default": "",
                                    "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                                    "maxLength": 253,
                                    "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                    "type": "string"
                                  },
                                  "kind": {
                                    "default": "Service",
                                    "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                    "type": "string"
                                  },
                                  "name": {
                                    "description": "Name is the name of the referent.",
                                    "maxLength": 253,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "namespace": {
                                    "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                    "type": "string"
                                  },
                                  "port": {
                                    "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                                    "format": "int32",
                                    "maximum": 65535,
                                    "minimum": 1,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "type": "object",
                                "x-kubernetes-validations": [
                                  {
                                    "message": "Must have port for Service reference",
                                    "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                                  }
                                ],
                                "additionalProperties": false
                              },
                              "disallowedRequestHeaders": {
                                "description": "`disallowedRequestHeaders` lists header names never forwarded to the\npolicy server, even if listed in `allowedRequestHeaders`. Matching is\ncase-insensitive.",
                                "items": {
                                  "description": "HTTP header name.",
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                  "type": "string",
                                  "x-kubernetes-validations": [
                                    {
                                      "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                      "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                                    }
                                  ]
                                },
                                "maxItems": 64,
                                "type": "array",
                                "x-kubernetes-list-type": "set"
                              },
                              "failureMode": {
                                "description": "`failureMode` controls behavior when the policy server is unreachable\nor returns an error. `FailOpen` allows the request; `FailClosed`\n(default) denies it.",
                                "enum": [
                                  "FailClosed",
                                  "FailOpen"
                                ],
                                "type": "string"
                              },
                              "metadata": {
                                "additionalProperties": {
                                  "description": "A Common Expression Language (CEL) expression.",
                                  "maxLength": 16384,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "description": "`metadata` is static or CEL-evaluated context surfaced to the policy\nserver as fields of the `metadata_context` google.protobuf.Struct,\nkeyed by config key. Values are CEL expressions.",
                                "maxProperties": 64,
                                "type": "object"
                              },
                              "url": {
                                "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                                "maxLength": 1024,
                                "minLength": 1,
                                "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "x-kubernetes-validations": [
                              {
                                "message": "url must not include a path",
                                "rule": "!has(self.url) || self.url.matches('^https?://[^/?#]+$')"
                              },
                              {
                                "message": "exactly one of the fields in [backendRef url] must be set",
                                "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                              }
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "methods"
                        ],
                        "type": "object",
                        "x-kubernetes-validations": [
                          {
                            "message": "exactly one of the fields in [remote] must be set",
                            "rule": "(has(self.remote)?1:0) == 1"
                          }
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "processors"
                  ],
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "at least one of the fields in [authentication authorization guardrails] must be set",
                  "rule": "[has(self.authentication),has(self.authorization),has(self.guardrails)].filter(x,x==true).size() >= 1"
                }
              ],
              "additionalProperties": false
            },
            "sessionAffinity": {
              "description": "Configures best-effort session affinity using an existing request attribute.\nFor AI backends, this applies across the backend's provider groups and must not\nbe configured on an individual provider.",
              "properties": {
                "source": {
                  "description": "CEL expression evaluated against request state. It must return a string or bytes value.\nFor example, `request.headers[\"x-session-id\"]` or `string(source.address)`.",
                  "maxLength": 16384,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "source"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "tcp": {
              "description": "Settings for managing TCP connections to the backend",
              "properties": {
                "connectTimeout": {
                  "description": "Deadline for establishing a connection to\nthe destination.",
                  "maxLength": 32,
                  "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                  "type": "string",
                  "x-kubernetes-validations": [
                    {
                      "message": "connectTimeout must be at least 100ms",
                      "rule": "duration(self) >= duration('100ms')"
                    }
                  ]
                },
                "keepalive": {
                  "description": "Settings for enabling TCP keepalives on the\nconnection.",
                  "properties": {
                    "interval": {
                      "description": "Time between keepalive probes.\nIf unset, this defaults to 180s.",
                      "maxLength": 32,
                      "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                      "type": "string",
                      "x-kubernetes-validations": [
                        {
                          "message": "interval must be at least 1 second",
                          "rule": "duration(self) >= duration('1s')"
                        }
                      ]
                    },
                    "retries": {
                      "description": "Maximum number of keepalive probes to send before dropping the connection.\nIf unset, this defaults to 9.",
                      "format": "int32",
                      "maximum": 64,
                      "minimum": 1,
                      "type": "integer"
                    },
                    "time": {
                      "description": "Time a connection needs to be idle before keepalive probes start being sent.\nIf unset, this defaults to 180s.",
                      "maxLength": 32,
                      "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                      "type": "string",
                      "x-kubernetes-validations": [
                        {
                          "message": "time must be at least 1 second",
                          "rule": "duration(self) >= duration('1s')"
                        }
                      ]
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "tls": {
              "description": "Settings for managing TLS connections to the backend\n\nWhen set, TLS is originated to the backend using the system trusted CA\ncertificates, and SNI is inferred from the destination.",
              "properties": {
                "alpnProtocols": {
                  "description": "Application-Layer Protocol Negotiation (`ALPN`)\nvalue to use in the TLS handshake.\n\nIf not present, defaults to `[\"h2\", \"http/1.1\"]`.",
                  "items": {
                    "maxLength": 64,
                    "minLength": 1,
                    "type": "string"
                  },
                  "maxItems": 16,
                  "minItems": 1,
                  "type": "array"
                },
                "caCertificateRefs": {
                  "description": "CA certificate source to use to verify the server certificate. Omitted kind\nand `ConfigMap` select a ConfigMap; `Secret` selects a Secret. The bundle is\nread from the `ca.crt` key unless `key` names a different one. If unset, the\nsystem's trusted certificates are used.",
                  "items": {
                    "description": "LocalCACertificateRef references a same-namespace CA certificate source.\nAn omitted kind defaults to ConfigMap, and an omitted key to `ca.crt`.",
                    "properties": {
                      "key": {
                        "description": "Key within the referenced source holding the PEM-encoded CA bundle.\nOmitted defaults to `ca.crt`.",
                        "maxLength": 253,
                        "minLength": 1,
                        "pattern": "^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$",
                        "type": "string"
                      },
                      "kind": {
                        "description": "Kind of the referenced CA certificate source. Omitted defaults to ConfigMap.",
                        "enum": [
                          "ConfigMap",
                          "Secret"
                        ],
                        "type": "string"
                      },
                      "name": {
                        "description": "Name of the referenced CA certificate source.",
                        "maxLength": 253,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object",
                    "x-kubernetes-map-type": "atomic",
                    "additionalProperties": false
                  },
                  "maxItems": 1,
                  "type": "array",
                  "x-kubernetes-list-type": "atomic"
                },
                "certificateSource": {
                  "description": "Source for the gateway's client identity and trust roots (`Inline` default, or `SPIFFE`).",
                  "enum": [
                    "Inline",
                    "SPIFFE"
                  ],
                  "type": "string"
                },
                "insecureSkipVerify": {
                  "description": "Originates TLS but skips verification of the backend's certificate\nWARNING: insecure; only use if the risks are understood\n\nModes:\n* `All` disables all TLS verification\n* `Hostname` trusts the CA certificate but ignores hostname/SAN mismatches.\n  Still insecure; prefer `verifySubjectAltNames` where possible.",
                  "enum": [
                    "All",
                    "Hostname"
                  ],
                  "type": "string"
                },
                "keyExchangeGroups": {
                  "description": "Ordered list of key exchange groups for a TLS connection.\nFor example: `X25519_MLKEM768,X25519`.",
                  "items": {
                    "enum": [
                      "P-256",
                      "P-384",
                      "X25519",
                      "X25519_MLKEM768"
                    ],
                    "type": "string"
                  },
                  "type": "array"
                },
                "mtlsCertificateRef": {
                  "description": "Enables mutual TLS to the backend using `tls.key` and `tls.crt` from the\nreferenced credential source (defaulting to a Kubernetes `Secret`). An\noptional `ca.cert`, if present, verifies the server certificate, but\n`caCertificateRefs` takes priority. If unspecified, no client certificate\nis used.",
                  "items": {
                    "description": "References a same-namespace credential\nSet only `name` for a Kubernetes Secret",
                    "properties": {
                      "group": {
                        "description": "API group of the referenced credential; empty selects the core API group",
                        "type": "string"
                      },
                      "kind": {
                        "description": "Kind of the referenced credential; empty defaults to `Secret`",
                        "type": "string"
                      },
                      "name": {
                        "description": "Name of the referenced credential",
                        "maxLength": 253,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object",
                    "x-kubernetes-map-type": "atomic",
                    "x-kubernetes-validations": [
                      {
                        "message": "custom credential refs must set both group and kind",
                        "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                      }
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 1,
                  "type": "array",
                  "x-kubernetes-list-type": "atomic"
                },
                "sni": {
                  "description": "Server Name Indicator (`SNI`) to use in the TLS\nhandshake. If unset, the `SNI` is automatically set based on the\ndestination hostname.",
                  "maxLength": 253,
                  "minLength": 1,
                  "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                  "type": "string"
                },
                "verifySubjectAltNames": {
                  "description": "Subject Alternative Names (`SAN`)\nto verify in the server certificate.\nIf not present, the destination hostname is automatically used.",
                  "items": {
                    "maxLength": 256,
                    "minLength": 1,
                    "type": "string"
                  },
                  "maxItems": 16,
                  "minItems": 1,
                  "type": "array"
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "insecureSkipVerify All and caCertificateRefs may not be set together",
                  "rule": "has(self.insecureSkipVerify) && self.insecureSkipVerify == 'All' ? !has(self.caCertificateRefs) : true"
                },
                {
                  "message": "insecureSkipVerify and verifySubjectAltNames may not be set together",
                  "rule": "has(self.insecureSkipVerify) ? !has(self.verifySubjectAltNames) : true"
                },
                {
                  "message": "certificateSource SPIFFE may not be combined with mtlsCertificateRef, caCertificateRefs, or insecureSkipVerify",
                  "rule": "!has(self.certificateSource) || self.certificateSource != 'SPIFFE' || (!has(self.mtlsCertificateRef) && !has(self.caCertificateRefs) && !has(self.insecureSkipVerify))"
                },
                {
                  "message": "at most one of the fields in [verifySubjectAltNames insecureSkipVerify] may be set",
                  "rule": "(has(self.verifySubjectAltNames)?1:0)+(has(self.insecureSkipVerify)?1:0) <= 1"
                }
              ],
              "additionalProperties": false
            },
            "transformation": {
              "description": "Mutates and transforms requests and responses sent to and from the backend.",
              "properties": {
                "request": {
                  "description": "Request transformation settings.",
                  "properties": {
                    "add": {
                      "description": "Headers to add to the request and what each value\nshould be set to. If there is already a header with these values then\nappend the value as an extra entry.",
                      "items": {
                        "properties": {
                          "name": {
                            "description": "The name of the header to add.",
                            "maxLength": 256,
                            "minLength": 1,
                            "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                            "type": "string",
                            "x-kubernetes-validations": [
                              {
                                "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                              }
                            ]
                          },
                          "value": {
                            "description": "CEL expression that generates the output value for\nthe header.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    },
                    "body": {
                      "description": "HTTP body transformation.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "metadata": {
                      "additionalProperties": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "description": "Stores CEL-evaluated values under the `metadata` CEL variable\nfor subsequent policy evaluations. `metadata` is evaluated before header\nor body transformations.",
                      "maxProperties": 16,
                      "minProperties": 1,
                      "type": "object"
                    },
                    "remove": {
                      "description": "Header names to remove from the request or\nresponse.",
                      "items": {
                        "description": "HTTP header name.",
                        "maxLength": 256,
                        "minLength": 1,
                        "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                        "type": "string",
                        "x-kubernetes-validations": [
                          {
                            "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                            "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                          }
                        ]
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-type": "set"
                    },
                    "set": {
                      "description": "Headers to set and the values to use.",
                      "items": {
                        "properties": {
                          "name": {
                            "description": "The name of the header to add.",
                            "maxLength": 256,
                            "minLength": 1,
                            "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                            "type": "string",
                            "x-kubernetes-validations": [
                              {
                                "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                              }
                            ]
                          },
                          "value": {
                            "description": "CEL expression that generates the output value for\nthe header.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "at least one of the fields in [add body metadata remove set] must be set",
                      "rule": "[has(self.add),has(self.body),has(self.metadata),has(self.remove),has(self.set)].filter(x,x==true).size() >= 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "response": {
                  "description": "Response transformation settings.",
                  "properties": {
                    "add": {
                      "description": "Headers to add to the request and what each value\nshould be set to. If there is already a header with these values then\nappend the value as an extra entry.",
                      "items": {
                        "properties": {
                          "name": {
                            "description": "The name of the header to add.",
                            "maxLength": 256,
                            "minLength": 1,
                            "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                            "type": "string",
                            "x-kubernetes-validations": [
                              {
                                "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                              }
                            ]
                          },
                          "value": {
                            "description": "CEL expression that generates the output value for\nthe header.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    },
                    "body": {
                      "description": "HTTP body transformation.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "metadata": {
                      "additionalProperties": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "description": "Stores CEL-evaluated values under the `metadata` CEL variable\nfor subsequent policy evaluations. `metadata` is evaluated before header\nor body transformations.",
                      "maxProperties": 16,
                      "minProperties": 1,
                      "type": "object"
                    },
                    "remove": {
                      "description": "Header names to remove from the request or\nresponse.",
                      "items": {
                        "description": "HTTP header name.",
                        "maxLength": 256,
                        "minLength": 1,
                        "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                        "type": "string",
                        "x-kubernetes-validations": [
                          {
                            "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                            "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                          }
                        ]
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-type": "set"
                    },
                    "set": {
                      "description": "Headers to set and the values to use.",
                      "items": {
                        "properties": {
                          "name": {
                            "description": "The name of the header to add.",
                            "maxLength": 256,
                            "minLength": 1,
                            "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                            "type": "string",
                            "x-kubernetes-validations": [
                              {
                                "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                              }
                            ]
                          },
                          "value": {
                            "description": "CEL expression that generates the output value for\nthe header.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "at least one of the fields in [add body metadata remove set] must be set",
                      "rule": "[has(self.add),has(self.body),has(self.metadata),has(self.remove),has(self.set)].filter(x,x==true).size() >= 1"
                    }
                  ],
                  "additionalProperties": false
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "at least one of the fields in [request response] must be set",
                  "rule": "[has(self.request),has(self.response)].filter(x,x==true).size() >= 1"
                }
              ],
              "additionalProperties": false
            },
            "tunnel": {
              "description": "Settings for managing tunnel connections to the backend, like `HTTPS_PROXY`",
              "properties": {
                "backendRef": {
                  "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                  "properties": {
                    "group": {
                      "default": "",
                      "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                      "maxLength": 253,
                      "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                      "type": "string"
                    },
                    "kind": {
                      "default": "Service",
                      "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                      "type": "string"
                    },
                    "name": {
                      "description": "Name is the name of the referent.",
                      "maxLength": 253,
                      "minLength": 1,
                      "type": "string"
                    },
                    "namespace": {
                      "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    },
                    "port": {
                      "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                      "format": "int32",
                      "maximum": 65535,
                      "minimum": 1,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "Must have port for Service reference",
                      "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                    }
                  ],
                  "additionalProperties": false
                },
                "mode": {
                  "description": "How requests are sent through the proxy.\nDefaults to `Auto`.",
                  "enum": [
                    "Auto",
                    "Connect"
                  ],
                  "type": "string"
                },
                "url": {
                  "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                  "maxLength": 1024,
                  "minLength": 1,
                  "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                  "type": "string"
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "exactly one of the fields in [backendRef url] must be set",
                  "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                },
                {
                  "message": "url must not include a path for backend tunnel",
                  "rule": "!has(self.url) || self.url.matches('^https?://[^/?#]+$')"
                }
              ],
              "additionalProperties": false
            }
          },
          "type": "object",
          "x-kubernetes-validations": [
            {
              "message": "at least one of the fields in [ai auth authorization extAuth health http mcp sessionAffinity tcp tls transformation tunnel] must be set",
              "rule": "[has(self.ai),has(self.auth),has(self.authorization),has(self.extAuth),has(self.health),has(self.http),has(self.mcp),has(self.sessionAffinity),has(self.tcp),has(self.tls),has(self.transformation),has(self.tunnel)].filter(x,x==true).size() >= 1"
            }
          ],
          "additionalProperties": false
        },
        "frontend": {
          "description": "Settings for how to handle incoming traffic.\n\nA frontend policy can only target a `Gateway`. `Listener` and\n`ListenerSet` are not valid targets.\n\nWhen multiple policies are selected for a given request, they are merged on a field-level basis, but not a deep\nmerge. For example, policy A sets `tcp` and `tls`, and policy B sets\n`tls`; the effective policy would be `tcp` from policy A, and `tls` from\npolicy B.",
          "properties": {
            "accessLog": {
              "description": "Access logging configuration.",
              "properties": {
                "attributes": {
                  "description": "Customizations to the key-value pairs that are\nlogged.",
                  "properties": {
                    "add": {
                      "description": "Additional key-value pairs to add to each entry.\nThe value is a CEL expression. If the CEL expression fails to evaluate,\nthe pair will be excluded.",
                      "items": {
                        "properties": {
                          "expression": {
                            "description": "A Common Expression Language (CEL) expression.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          },
                          "name": {
                            "maxLength": 256,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "expression",
                          "name"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "remove": {
                      "description": "Default fields to remove. For example,\n`http.method`.",
                      "items": {
                        "maxLength": 64,
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxItems": 32,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "at least one of the fields in [add remove] must be set",
                      "rule": "[has(self.add),has(self.remove)].filter(x,x==true).size() >= 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "filter": {
                  "description": "CEL expression used to filter logs. A log\nwill only be emitted if the expression evaluates to `true`.",
                  "maxLength": 16384,
                  "minLength": 1,
                  "type": "string"
                },
                "otlp": {
                  "description": "OTLP access log export to an\nOpenTelemetry-compatible backend.",
                  "properties": {
                    "attributes": {
                      "description": "Customizations to the key-value pairs exported over OTLP.\nIf unset, the parent access log attributes are used.",
                      "properties": {
                        "add": {
                          "description": "Additional key-value pairs to add to each entry.\nThe value is a CEL expression. If the CEL expression fails to evaluate,\nthe pair will be excluded.",
                          "items": {
                            "properties": {
                              "expression": {
                                "description": "A Common Expression Language (CEL) expression.",
                                "maxLength": 16384,
                                "minLength": 1,
                                "type": "string"
                              },
                              "name": {
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "expression",
                              "name"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "type": "array"
                        },
                        "remove": {
                          "description": "Default fields to remove. For example,\n`http.method`.",
                          "items": {
                            "maxLength": 64,
                            "minLength": 1,
                            "type": "string"
                          },
                          "maxItems": 32,
                          "minItems": 1,
                          "type": "array"
                        }
                      },
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "at least one of the fields in [add remove] must be set",
                          "rule": "[has(self.add),has(self.remove)].filter(x,x==true).size() >= 1"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "backendRef": {
                      "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                      "properties": {
                        "group": {
                          "default": "",
                          "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                          "maxLength": 253,
                          "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                          "type": "string"
                        },
                        "kind": {
                          "default": "Service",
                          "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name is the name of the referent.",
                          "maxLength": 253,
                          "minLength": 1,
                          "type": "string"
                        },
                        "namespace": {
                          "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                          "type": "string"
                        },
                        "port": {
                          "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                          "format": "int32",
                          "maximum": 65535,
                          "minimum": 1,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "Must have port for Service reference",
                          "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "filter": {
                      "description": "CEL expression used to filter OTLP logs. A log\nwill only be exported if the expression evaluates to `true`.\nIf unset, the parent access log filter is used.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "path": {
                      "description": "OTLP/HTTP path to use. This is only applicable\nwhen `protocol` is `HTTP`. If unset, this defaults to `/v1/logs`.",
                      "maxLength": 1024,
                      "minLength": 1,
                      "type": "string"
                    },
                    "protocol": {
                      "description": "OTLP protocol variant to use. Defaults to `GRPC`.",
                      "enum": [
                        "GRPC",
                        "HTTP"
                      ],
                      "type": "string"
                    },
                    "url": {
                      "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                      "maxLength": 1024,
                      "minLength": 1,
                      "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "path is only valid with protocol HTTP",
                      "rule": "!has(self.path) || (has(self.protocol) && self.protocol == 'HTTP')"
                    },
                    {
                      "message": "path must start with /",
                      "rule": "!has(self.path) || self.path.startsWith('/')"
                    },
                    {
                      "message": "url path is only valid with protocol HTTP",
                      "rule": "!has(self.url) || !self.url.matches('^https?://[^/?#]+/') || (has(self.protocol) && self.protocol == 'HTTP')"
                    },
                    {
                      "message": "exactly one of the fields in [backendRef url] must be set",
                      "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "preset": {
                  "description": "Preset selects the built-in field set for standard output access logs.\nWhen unset, legacy human-oriented fields are used.\n`Otel` selects the OTel-aligned built-in HTTP field set.",
                  "enum": [
                    "Otel"
                  ],
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "connect": {
              "description": "Settings for downstream HTTP CONNECT handling.\n\nIf unset, CONNECT requests are rejected with Method Not Allowed.",
              "properties": {
                "mode": {
                  "description": "Whether downstream CONNECT requests are accepted.",
                  "enum": [
                    "Deny",
                    "Route",
                    "Tunnel"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "mode"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "http": {
              "description": "Settings for managing incoming HTTP requests.",
              "properties": {
                "http1HeaderCase": {
                  "description": "Controls HTTP/1 request header name casing when encoding responses on the same connection.\nThis only applies to `HTTP/1`. If a request is HTTP/2 in either the incoming or outgoing request, this will be ignored.\nHTTP/2 requests are always lower case.\n\nModifying the headers from other policies may result in the original case being lost.",
                  "enum": [
                    "Lowercase",
                    "Preserve"
                  ],
                  "type": "string"
                },
                "http1IdleTimeout": {
                  "description": "Timeout before an unused connection is\nclosed.\nIf unset, this defaults to 10 minutes.",
                  "maxLength": 32,
                  "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                  "type": "string",
                  "x-kubernetes-validations": [
                    {
                      "message": "http1IdleTimeout must be at least 1 second",
                      "rule": "duration(self) >= duration('1s')"
                    }
                  ]
                },
                "http1MaxHeaders": {
                  "description": "Maximum number of headers allowed\nin `HTTP/1.1` requests.\nIf unset, this defaults to 100.",
                  "format": "int32",
                  "maximum": 4096,
                  "minimum": 1,
                  "type": "integer"
                },
                "http2ConnectionWindowSize": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "string"
                    }
                  ],
                  "description": "Initial window size for\nconnection-level flow control for received data.",
                  "maxLength": 32,
                  "minLength": 1,
                  "pattern": "^[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)(([KMGTPE]i)|[numkMGTPE]|[eE](\\+?0*([0-9]|1[0-8])|-0*[0-9]))?$",
                  "x-kubernetes-int-or-string": true,
                  "x-kubernetes-validations": [
                    {
                      "message": "value must be at least 1 byte and fit within uint32",
                      "rule": "(self >= 1 && self <= 4294967295) || self.size() > 0"
                    }
                  ]
                },
                "http2FrameSize": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "string"
                    }
                  ],
                  "description": "Maximum frame size to use.\nIf unset, this defaults to `16kb`.",
                  "maxLength": 32,
                  "minLength": 1,
                  "pattern": "^[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)(([KMGTPE]i)|[numkMGTPE]|[eE](\\+?0*([0-9]|1[0-8])|-0*[0-9]))?$",
                  "x-kubernetes-int-or-string": true,
                  "x-kubernetes-validations": [
                    {
                      "message": "http2FrameSize must be at least 16384 bytes",
                      "rule": "!quantity(string(self)).isLessThan(quantity('16384'))"
                    },
                    {
                      "message": "http2FrameSize must be at most 1677215 bytes",
                      "rule": "!quantity(string(self)).isGreaterThan(quantity('1677215'))"
                    },
                    {
                      "message": "value must be at least 1 byte and fit within uint32",
                      "rule": "(self >= 1 && self <= 4294967295) || self.size() > 0"
                    }
                  ]
                },
                "http2KeepaliveInterval": {
                  "description": "Interval between `HTTP/2` keepalive pings.\nIf unset, keepalive pings are not sent.",
                  "maxLength": 32,
                  "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                  "type": "string",
                  "x-kubernetes-validations": [
                    {
                      "message": "http2KeepaliveInterval must be at least 1 second",
                      "rule": "duration(self) >= duration('1s')"
                    }
                  ]
                },
                "http2KeepaliveTimeout": {
                  "description": "Time to wait for a response to an `HTTP/2` keepalive ping before the connection is closed.\nOnly applies when `http2KeepaliveInterval` is set.",
                  "maxLength": 32,
                  "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                  "type": "string",
                  "x-kubernetes-validations": [
                    {
                      "message": "http2KeepaliveTimeout must be at least 1 second",
                      "rule": "duration(self) >= duration('1s')"
                    }
                  ]
                },
                "http2MaxHeaderSize": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "string"
                    }
                  ],
                  "description": "Maximum aggregate size of decoded HTTP/2\nrequest headers.\nIf unset, this defaults to `16Ki`.",
                  "maxLength": 32,
                  "minLength": 1,
                  "pattern": "^[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)(([KMGTPE]i)|[numkMGTPE]|[eE](\\+?0*([0-9]|1[0-8])|-0*[0-9]))?$",
                  "x-kubernetes-int-or-string": true,
                  "x-kubernetes-validations": [
                    {
                      "message": "value must be at least 1 byte and fit within uint32",
                      "rule": "(self >= 1 && self <= 4294967295) || self.size() > 0"
                    }
                  ]
                },
                "http2WindowSize": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "string"
                    }
                  ],
                  "description": "Initial window size for stream-level flow\ncontrol for received data.",
                  "maxLength": 32,
                  "minLength": 1,
                  "pattern": "^[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)(([KMGTPE]i)|[numkMGTPE]|[eE](\\+?0*([0-9]|1[0-8])|-0*[0-9]))?$",
                  "x-kubernetes-int-or-string": true,
                  "x-kubernetes-validations": [
                    {
                      "message": "value must be at least 1 byte and fit within uint32",
                      "rule": "(self >= 1 && self <= 4294967295) || self.size() > 0"
                    }
                  ]
                },
                "maxBufferSize": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "string"
                    }
                  ],
                  "description": "Maximum HTTP body size that will be buffered\ninto memory.\nBodies will only be buffered for policies which require buffering.\nIf unset, this defaults to `2mb`.",
                  "maxLength": 32,
                  "minLength": 1,
                  "pattern": "^[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)(([KMGTPE]i)|[numkMGTPE]|[eE](\\+?0*([0-9]|1[0-8])|-0*[0-9]))?$",
                  "x-kubernetes-int-or-string": true,
                  "x-kubernetes-validations": [
                    {
                      "message": "value must be at least 1 byte and fit within uint32",
                      "rule": "(self >= 1 && self <= 4294967295) || self.size() > 0"
                    }
                  ]
                },
                "maxConcurrentRequests": {
                  "description": "Maximum number of in-flight HTTP requests across this gateway/port.\nThis includes HTTP/1 requests and HTTP/2 streams. Requests over the limit\nare rejected immediately with a 503 response. Unset means unlimited.",
                  "format": "int32",
                  "minimum": 1,
                  "type": "integer"
                },
                "maxConnectionDuration": {
                  "description": "Maximum time a connection is allowed to remain open.\nAfter this duration, the connection is gracefully closed after the current in-flight request completes.\nUseful for ensuring even traffic distribution behind load balancers during scaling events.",
                  "maxLength": 32,
                  "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                  "type": "string",
                  "x-kubernetes-validations": [
                    {
                      "message": "maxConnectionDuration must be at least 1 second",
                      "rule": "duration(self) >= duration('1s')"
                    }
                  ]
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "at least one of the fields in [http1HeaderCase http1IdleTimeout http1MaxHeaders http2ConnectionWindowSize http2FrameSize http2KeepaliveInterval http2KeepaliveTimeout http2MaxHeaderSize http2WindowSize maxBufferSize maxConcurrentRequests maxConnectionDuration] must be set",
                  "rule": "[has(self.http1HeaderCase),has(self.http1IdleTimeout),has(self.http1MaxHeaders),has(self.http2ConnectionWindowSize),has(self.http2FrameSize),has(self.http2KeepaliveInterval),has(self.http2KeepaliveTimeout),has(self.http2MaxHeaderSize),has(self.http2WindowSize),has(self.maxBufferSize),has(self.maxConcurrentRequests),has(self.maxConnectionDuration)].filter(x,x==true).size() >= 1"
                }
              ],
              "additionalProperties": false
            },
            "metrics": {
              "description": "Custom Prometheus metric label configuration.\nCEL expressions are evaluated per-request and added as labels to all\nPrometheus metrics exposed by agentgateway.",
              "properties": {
                "attributes": {
                  "description": "Customizations to the labels that are\nadded to Prometheus metrics.",
                  "properties": {
                    "add": {
                      "description": "Additional key-value pairs to add as custom labels\nto all Prometheus metrics. The value is a CEL expression evaluated\nper-request. If the CEL expression fails to evaluate, the label value\nis set to \"unknown\".\n\nWARNING: High-cardinality labels (e.g., per-user IDs) can significantly\nincrease Prometheus storage and memory usage. Prefer low-cardinality\ndimensions like team or environment.",
                      "items": {
                        "properties": {
                          "expression": {
                            "description": "A Common Expression Language (CEL) expression.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          },
                          "name": {
                            "maxLength": 256,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "expression",
                          "name"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "at least one of the fields in [add] must be set",
                      "rule": "[has(self.add)].filter(x,x==true).size() >= 1"
                    }
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "attributes"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "networkAuthorization": {
              "description": "CEL authorization on downstream network connections.\n\nThis runs before protocol handling and is intended for L4 access control,\nfor example using `source.address` with `cidr(...).containsIP(...)`.",
              "properties": {
                "action": {
                  "description": "The effect of this rule when it matches.\nIf unspecified, defaults to `Allow`.\n`Require` rules are cumulative: all require rules must match.",
                  "enum": [
                    "Allow",
                    "Deny",
                    "Require"
                  ],
                  "type": "string"
                },
                "policy": {
                  "description": "The authorization rule to evaluate.\n\n* `Allow`: any matching allow rule allows the request.\n* `Require`: every require rule must match for the request to be allowed.\n* `Deny`: any matching deny rule denies the request.\n\n`Deny` is not recommended because expression failures fail to deny; prefer\n`Allow` or `Require`. If used, design expressions defensively against evaluation errors.\n\nIf at least one `Allow` rule is configured, requests are denied unless at\nleast one allow rule matches.",
                  "properties": {
                    "matchExpressions": {
                      "description": "CEL expressions that must all evaluate to true for the rule to match.",
                      "items": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxItems": 256,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "matchExpressions"
                  ],
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "required": [
                "policy"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "proxyProtocol": {
              "description": "Settings for downstream PROXY protocol handling.\n\nIf configured, incoming connections may require a PROXY header before\nnormal protocol handling. This can also be configured to allow both\nPROXY and non-PROXY traffic on the same listener.",
              "properties": {
                "mode": {
                  "description": "Whether PROXY headers are required or optional.\n\nIf unset, this defaults to `Strict`.",
                  "enum": [
                    "Optional",
                    "Strict"
                  ],
                  "type": "string"
                },
                "version": {
                  "description": "PROXY protocol version to accept.\n\nIf unset, this defaults to `V2`.",
                  "enum": [
                    "All",
                    "V1",
                    "V2"
                  ],
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "tcp": {
              "description": "Settings for managing incoming TCP connections.",
              "properties": {
                "keepalive": {
                  "description": "Settings for enabling TCP keepalives on the connection.",
                  "properties": {
                    "interval": {
                      "description": "Time between keepalive probes.\nIf unset, this defaults to 180s.",
                      "maxLength": 32,
                      "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                      "type": "string",
                      "x-kubernetes-validations": [
                        {
                          "message": "interval must be at least 1 second",
                          "rule": "duration(self) >= duration('1s')"
                        }
                      ]
                    },
                    "retries": {
                      "description": "Maximum number of keepalive probes to send before dropping the connection.\nIf unset, this defaults to 9.",
                      "format": "int32",
                      "maximum": 64,
                      "minimum": 1,
                      "type": "integer"
                    },
                    "time": {
                      "description": "Time a connection needs to be idle before keepalive probes start being sent.\nIf unset, this defaults to 180s.",
                      "maxLength": 32,
                      "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                      "type": "string",
                      "x-kubernetes-validations": [
                        {
                          "message": "time must be at least 1 second",
                          "rule": "duration(self) >= duration('1s')"
                        }
                      ]
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "maxConnections": {
                  "description": "Maximum number of active downstream connections on this gateway/port.\nConnections over the limit are closed immediately. Unset means unlimited.",
                  "format": "int32",
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "at least one of the fields in [keepalive maxConnections] must be set",
                  "rule": "[has(self.keepalive),has(self.maxConnections)].filter(x,x==true).size() >= 1"
                }
              ],
              "additionalProperties": false
            },
            "tls": {
              "description": "Settings for managing incoming TLS connections.",
              "properties": {
                "alpnProtocols": {
                  "description": "Application-Layer Protocol Negotiation (`ALPN`)\nvalue to use in the TLS handshake.\n\nIf not present, defaults to `[\"h2\", \"http/1.1\"]`.",
                  "items": {
                    "maxLength": 64,
                    "minLength": 1,
                    "type": "string"
                  },
                  "maxItems": 16,
                  "minItems": 1,
                  "type": "array"
                },
                "cipherSuites": {
                  "description": "Cipher suites for a TLS listener.\nThe value is a comma-separated list of cipher suites, for example\n`TLS13_AES_256_GCM_SHA384,TLS13_AES_128_GCM_SHA256`.\nUse this in the TLS options field of a TLS listener.",
                  "items": {
                    "enum": [
                      "TLS13_AES_128_GCM_SHA256",
                      "TLS13_AES_256_GCM_SHA384",
                      "TLS13_CHACHA20_POLY1305_SHA256",
                      "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
                      "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
                      "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
                      "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
                      "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
                      "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256"
                    ],
                    "type": "string"
                  },
                  "type": "array"
                },
                "handshakeTimeout": {
                  "description": "Deadline for a TLS handshake to\ncomplete. If unset, this defaults to `15s`.",
                  "maxLength": 32,
                  "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                  "type": "string",
                  "x-kubernetes-validations": [
                    {
                      "message": "handshakeTimeout must be at least 100ms",
                      "rule": "duration(self) >= duration('100ms')"
                    }
                  ]
                },
                "keyExchangeGroups": {
                  "description": "Ordered list of key exchange groups for a TLS listener.\nFor example: `X25519_MLKEM768,X25519`.",
                  "items": {
                    "enum": [
                      "P-256",
                      "P-384",
                      "X25519",
                      "X25519_MLKEM768"
                    ],
                    "type": "string"
                  },
                  "type": "array"
                },
                "maxProtocolVersion": {
                  "description": "Maximum TLS version to support.",
                  "enum": [
                    "1.2",
                    "1.3"
                  ],
                  "type": "string"
                },
                "minProtocolVersion": {
                  "description": "Minimum TLS version to support.",
                  "enum": [
                    "1.2",
                    "1.3"
                  ],
                  "type": "string"
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "at least one of the fields in [alpnProtocols cipherSuites handshakeTimeout keyExchangeGroups maxProtocolVersion minProtocolVersion] must be set",
                  "rule": "[has(self.alpnProtocols),has(self.cipherSuites),has(self.handshakeTimeout),has(self.keyExchangeGroups),has(self.maxProtocolVersion),has(self.minProtocolVersion)].filter(x,x==true).size() >= 1"
                }
              ],
              "additionalProperties": false
            },
            "tracing": {
              "description": "OpenTelemetry tracing settings.",
              "properties": {
                "attributes": {
                  "description": "Customizations to the key-value pairs that are\nincluded in the trace.",
                  "properties": {
                    "add": {
                      "description": "Additional key-value pairs to add to each entry.\nThe value is a CEL expression. If the CEL expression fails to evaluate,\nthe pair will be excluded.",
                      "items": {
                        "properties": {
                          "expression": {
                            "description": "A Common Expression Language (CEL) expression.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          },
                          "name": {
                            "maxLength": 256,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "expression",
                          "name"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "remove": {
                      "description": "Default fields to remove. For example,\n`http.method`.",
                      "items": {
                        "maxLength": 64,
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxItems": 32,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "at least one of the fields in [add remove] must be set",
                      "rule": "[has(self.add),has(self.remove)].filter(x,x==true).size() >= 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "backendRef": {
                  "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                  "properties": {
                    "group": {
                      "default": "",
                      "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                      "maxLength": 253,
                      "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                      "type": "string"
                    },
                    "kind": {
                      "default": "Service",
                      "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                      "type": "string"
                    },
                    "name": {
                      "description": "Name is the name of the referent.",
                      "maxLength": 253,
                      "minLength": 1,
                      "type": "string"
                    },
                    "namespace": {
                      "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    },
                    "port": {
                      "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                      "format": "int32",
                      "maximum": 65535,
                      "minimum": 1,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "Must have port for Service reference",
                      "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                    }
                  ],
                  "additionalProperties": false
                },
                "clientSampling": {
                  "description": "Expression that determines the amount of client\nsampling. Client sampling determines whether to initiate a new trace\nspan if the incoming request does have a trace already. This only\napplies when that trace is sampled (`-01`); use `parentNotSampled` for\nrequests whose trace is not. This should\nevaluate to a float between `0.0` and `1.0`, or a boolean (`true` or\n`false`). If unspecified, client sampling is `100%` enabled.",
                  "maxLength": 16384,
                  "minLength": 1,
                  "type": "string"
                },
                "filter": {
                  "description": "Expression that determines whether a sampled span is exported.\nThis uses keep semantics: spans are exported only when the expression\nevaluates to `true`. If unspecified, all sampled spans are exported.",
                  "maxLength": 16384,
                  "minLength": 1,
                  "type": "string"
                },
                "parentNotSampled": {
                  "description": "Expression that determines whether to trace a request that arrives with\na `traceparent` whose sampled flag is unset (`-00`), meaning the client\nasked for it not to be traced. When this is `true` the request is traced\nanyway, and `-01` is sent upstream so downstream services trace it too.\nThis should evaluate to a float between `0.0` and `1.0`, or a boolean\n(`true` or `false`). If unspecified, the client's choice is honored and\nthe request is not traced.\n\nOnly one of `randomSampling`, `clientSampling` and `parentNotSampled`\napplies to any given request; the incoming `traceparent` decides which.",
                  "maxLength": 16384,
                  "minLength": 1,
                  "type": "string"
                },
                "path": {
                  "description": "OTLP path to use. This is only applicable when\n`protocol` is `HTTP`. If unset, this defaults to `/v1/traces`.",
                  "maxLength": 1024,
                  "minLength": 1,
                  "type": "string"
                },
                "protocol": {
                  "description": "OTLP protocol variant to use. Defaults to `GRPC`.",
                  "enum": [
                    "GRPC",
                    "HTTP"
                  ],
                  "type": "string"
                },
                "randomSampling": {
                  "description": "Expression that determines the amount of random\nsampling. Random sampling will initiate a new trace span if the incoming\nrequest does not have a trace initiated already. This should evaluate to\na float between `0.0` and `1.0`, or a boolean (`true` or `false`). If\nunspecified, random sampling is disabled.",
                  "maxLength": 16384,
                  "minLength": 1,
                  "type": "string"
                },
                "resources": {
                  "description": "Entity producing telemetry and resources\nresources to be included in the trace.",
                  "items": {
                    "properties": {
                      "expression": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "name": {
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "expression",
                      "name"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                },
                "url": {
                  "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                  "maxLength": 1024,
                  "minLength": 1,
                  "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                  "type": "string"
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "path is only valid with protocol HTTP",
                  "rule": "!has(self.path) || (has(self.protocol) && self.protocol == 'HTTP')"
                },
                {
                  "message": "path must start with /",
                  "rule": "!has(self.path) || self.path.startsWith('/')"
                },
                {
                  "message": "url path is only valid with protocol HTTP",
                  "rule": "!has(self.url) || !self.url.matches('^https?://[^/?#]+/') || (has(self.protocol) && self.protocol == 'HTTP')"
                },
                {
                  "message": "exactly one of the fields in [backendRef url] must be set",
                  "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                }
              ],
              "additionalProperties": false
            }
          },
          "type": "object",
          "x-kubernetes-validations": [
            {
              "message": "at least one of the fields in [accessLog connect http metrics networkAuthorization proxyProtocol tcp tls tracing] must be set",
              "rule": "[has(self.accessLog),has(self.connect),has(self.http),has(self.metrics),has(self.networkAuthorization),has(self.proxyProtocol),has(self.tcp),has(self.tls),has(self.tracing)].filter(x,x==true).size() >= 1"
            }
          ],
          "additionalProperties": false
        },
        "strategy": {
          "description": "Policy merge and conflict resolution strategy.\n\nStrategy settings apply to the policy object as a whole. Individual strategy fields may\nonly be valid for specific policy kinds; for example, inheritance is only valid when this\npolicy contains traffic settings.",
          "properties": {
            "inheritance": {
              "description": "Controls whether less-specific traffic policies prevent more-specific traffic policies\nfrom contributing to the effective policy.\n\nThis field is only valid on traffic policies. Frontend and backend policy merging does not use\ninheritance.\n\nWhen unset or set to `Default`, traffic policy fields are merged by specificity, with more-specific\nattachment points such as routes and route rules able to override fields from less-specific\nattachment points such as gateways and listeners.\nIn other words, this policy provides `Default`s that can be overridden. For example, you may provide a `Default`\ntimeout policy for the entire Gateway that is overridden by specific routes.\n\nWhen set to `Override`, this policy blocks traffic policies at more-specific attachment points from\nbeing included in the effective policy. This is useful when a gateway-level policy must remain\nauthoritative for all routes below it.",
              "enum": [
                "Default",
                "Override"
              ],
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "targetRefs": {
          "description": "Target resources to attach the\npolicy to.",
          "items": {
            "description": "Selects one same-namespace object by `group`, `kind`, `name`, and,\noptionally, `sectionName` or `port`.\nThe object must be in the same namespace as the policy.",
            "properties": {
              "group": {
                "description": "The API group of the target resource.\nFor Kubernetes Gateway API resources, the group is `gateway.networking.k8s.io`.",
                "maxLength": 253,
                "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                "type": "string"
              },
              "kind": {
                "description": "The API kind of the target resource, such as `Gateway` or `HTTPRoute`.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                "type": "string"
              },
              "name": {
                "description": "The name of the target resource.",
                "maxLength": 253,
                "minLength": 1,
                "type": "string"
              },
              "port": {
                "description": "The port of the target resource this policy applies to.\nAt most one of `sectionName` or `port` may be set.\nOnly valid on frontend policies targeting a `Gateway`.",
                "format": "int32",
                "maximum": 65535,
                "minimum": 1,
                "type": "integer"
              },
              "sectionName": {
                "description": "The named section of the target resource.",
                "maxLength": 253,
                "minLength": 1,
                "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                "type": "string"
              }
            },
            "required": [
              "group",
              "kind",
              "name"
            ],
            "type": "object",
            "x-kubernetes-validations": [
              {
                "message": "at most one of the fields in [sectionName port] may be set",
                "rule": "(has(self.sectionName)?1:0)+(has(self.port)?1:0) <= 1"
              }
            ],
            "additionalProperties": false
          },
          "maxItems": 16,
          "minItems": 1,
          "type": "array",
          "x-kubernetes-list-type": "atomic",
          "x-kubernetes-validations": [
            {
              "message": "targetRefs may only reference Gateway, HTTPRoute, GRPCRoute, ListenerSet, Service, AgentgatewayBackend, or InferencePool resources",
              "rule": "self.all(r, (r.kind == 'Service' && r.group == '') || (r.kind == 'AgentgatewayBackend' && r.group == 'agentgateway.dev') || (r.kind in ['Gateway', 'HTTPRoute', 'GRPCRoute'] && r.group == 'gateway.networking.k8s.io') || (r.kind == 'ListenerSet' && r.group == 'gateway.networking.k8s.io') || (r.kind == 'InferencePool' && r.group == 'inference.networking.k8s.io'))"
            },
            {
              "message": "Only one Kind of targetRef can be set on one policy",
              "rule": "self.all(l1, !self.exists(l2, l1.kind != l2.kind))"
            }
          ]
        },
        "targetSelectors": {
          "description": "Target selectors used to select resources to attach the policy to.",
          "items": {
            "description": "Selects same-namespace objects by `group`, `kind`, `matchLabels`, and,\noptionally, `sectionName`.\nEach selected object must be in the same namespace as the policy and match\nthe specified labels.\nPrefer `targetRefs` when reconciliation latency is important, especially\nwhen many policies target the same resource.",
            "properties": {
              "group": {
                "description": "The API group of the target resource.\nFor Kubernetes Gateway API resources, the group is `gateway.networking.k8s.io`.",
                "maxLength": 253,
                "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                "type": "string"
              },
              "kind": {
                "description": "The API kind of the target resource, such as `Gateway` or `HTTPRoute`.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                "type": "string"
              },
              "matchLabels": {
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Labels that must be present on each selected target resource.",
                "type": "object"
              },
              "port": {
                "description": "The port of each selected target resource this policy applies to.\nAt most one of `sectionName` or `port` may be set.\nOnly valid on frontend policies targeting a `Gateway`.",
                "format": "int32",
                "maximum": 65535,
                "minimum": 1,
                "type": "integer"
              },
              "sectionName": {
                "description": "The named section of each selected target resource.",
                "maxLength": 253,
                "minLength": 1,
                "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                "type": "string"
              }
            },
            "required": [
              "group",
              "kind",
              "matchLabels"
            ],
            "type": "object",
            "x-kubernetes-validations": [
              {
                "message": "at most one of the fields in [sectionName port] may be set",
                "rule": "(has(self.sectionName)?1:0)+(has(self.port)?1:0) <= 1"
              }
            ],
            "additionalProperties": false
          },
          "maxItems": 16,
          "minItems": 1,
          "type": "array",
          "x-kubernetes-validations": [
            {
              "message": "targetRefs may only reference Gateway, HTTPRoute, GRPCRoute, ListenerSet, Service, AgentgatewayBackend, or InferencePool resources",
              "rule": "self.all(r, (r.kind == 'Service' && r.group == '') || (r.kind == 'AgentgatewayBackend' && r.group == 'agentgateway.dev') || (r.kind in ['Gateway', 'HTTPRoute', 'GRPCRoute'] && r.group == 'gateway.networking.k8s.io') || (r.kind == 'ListenerSet' && r.group == 'gateway.networking.k8s.io') || (r.kind == 'InferencePool' && r.group == 'inference.networking.k8s.io'))"
            },
            {
              "message": "Only one Kind of targetRef can be set on one policy",
              "rule": "self.all(l1, !self.exists(l2, l1.kind != l2.kind))"
            }
          ]
        },
        "traffic": {
          "description": "Settings for how to process traffic.\n\nA traffic policy can target a `Gateway` (optionally, with a\n`sectionName` indicating the listener), `ListenerSet`, or `Route`\n(optionally, with a `sectionName` indicating the route rule).\n\nWhen multiple policies are selected for a given request, they are merged on a field-level basis, but not a deep\nmerge. Precedence is given to more precise policies: `Gateway` <\n`Listener` < `Route` < `Route Rule`. For example, policy A sets\n`timeouts` and `retries`, and policy B sets `retries`; the effective\npolicy would be `timeouts` from policy A, and `retries` from policy B.",
          "properties": {
            "apiKeyAuthentication": {
              "description": "Authenticates users based on a configured API\nkey.",
              "properties": {
                "configMapSelector": {
                  "description": "Selects multiple Kubernetes `ConfigMap` resources\ncontaining API keys. It is ConfigMap-only; use `secretRef` or\n`secretSelector` for Secret-backed credentials. If the same key is\ndefined in multiple ConfigMaps, the behavior is undefined.\n\nBecause ConfigMaps are not confidential, every entry sourced from a\nConfigMap must use `keyHash`; a raw `key` value is rejected.\n\nEach entry in the `ConfigMap` data represents one API key. The key is\nan arbitrary identifier. The value must be a JSON object with\n`keyHash`, plus optional `metadata`. `keyHash` contains a hashed API\nkey in `sha256:<hex>` format. `metadata` contains arbitrary JSON\nmetadata associated with the key, which may be used by other\npolicies. For example, you may write an authorization policy allowing\n`apiKey.group == 'sales'`.\n\nExample:\n\n\tapiVersion: v1\n\tkind: ConfigMap\n\tmetadata:\n\t  name: api-key\n\tdata:\n\t  client1: |\n\t    {\n\t      \"keyHash\": \"sha256:efa299afb8c12a36e47a790cbbf929caa06d13285950410463fb759af17d0dad\",\n\t      \"metadata\": {\n\t        \"group\": \"sales\"\n\t      }\n\t    }",
                  "properties": {
                    "matchLabels": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "Labels that must be present on each selected ConfigMap.",
                      "type": "object"
                    }
                  },
                  "required": [
                    "matchLabels"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "location": {
                  "description": "Where API keys are read from.\nIf omitted, credentials are read from the `Authorization` header with the `Bearer ` prefix.",
                  "properties": {
                    "cookie": {
                      "properties": {
                        "name": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "expression": {
                      "description": "CEL expression that extracts the credential from the request.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "header": {
                      "properties": {
                        "name": {
                          "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                          "maxLength": 256,
                          "minLength": 1,
                          "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                          "type": "string"
                        },
                        "prefix": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "queryParameter": {
                      "properties": {
                        "name": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "exactly one of the fields in [header queryParameter cookie expression] must be set",
                      "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0)+(has(self.expression)?1:0) == 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "mode": {
                  "description": "Validation mode for API key authentication. Defaults to `Strict`.",
                  "enum": [
                    "Optional",
                    "Permissive",
                    "Strict"
                  ],
                  "type": "string"
                },
                "secretRef": {
                  "description": "Credential source, defaulting to a Kubernetes\n`Secret`, storing a set of API keys. If many keys are needed,\n`secretSelector` or `configMapSelector` can be used instead.\nNote that ConfigMap-backed API keys only support `keyHash`.\n\nEach entry in the credential data represents one API key. The key is an\narbitrary identifier. The value can either be:\n* A string representing the API key.\n* A JSON object with `key` or `keyHash`, plus optional `metadata`.\n  `key` contains the API key. `keyHash` contains a hashed API key in\n  `sha256:<hex>` format. `metadata` contains arbitrary JSON metadata\n  associated with the key, which may be used by other policies. For\n  example, you may write an authorization policy allowing\n  `apiKey.group == 'sales'`.\n\nExample:\n\n\tapiVersion: v1\n\tkind: Secret\n\tmetadata:\n\t  name: api-key\n\tstringData:\n\t  client1: |\n\t    {\n\t      \"key\": \"k-123\",\n\t      \"metadata\": {\n\t        \"group\": \"sales\",\n\t        \"created_at\": \"2024-10-01T12:00:00Z\"\n\t      }\n\t    }\n\t  client2: \"k-456\"\n\t  client3: |\n\t    {\n\t      \"keyHash\": \"sha256:efa299afb8c12a36e47a790cbbf929caa06d13285950410463fb759af17d0dad\",\n\t      \"metadata\": {\n\t        \"group\": \"engineering\"\n\t      }\n\t    }",
                  "properties": {
                    "group": {
                      "description": "API group of the referenced credential; empty selects the core API group",
                      "type": "string"
                    },
                    "kind": {
                      "description": "Kind of the referenced credential; empty defaults to `Secret`",
                      "type": "string"
                    },
                    "name": {
                      "description": "Name of the referenced credential",
                      "maxLength": 253,
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object",
                  "x-kubernetes-map-type": "atomic",
                  "x-kubernetes-validations": [
                    {
                      "message": "custom credential refs must set both group and kind",
                      "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                    }
                  ],
                  "additionalProperties": false
                },
                "secretSelector": {
                  "description": "Selects multiple Kubernetes `Secret` resources\ncontaining API keys. It is Secret-only; use `secretRef` for other\ncredential kinds. If the same key is defined in multiple secrets, the\nbehavior is undefined.\n\nEach entry in the `Secret` data represents one API key. The key is an\narbitrary identifier. The value can either be:\n* A string representing the API key.\n* A JSON object with `key` or `keyHash`, plus optional `metadata`.\n  `key` contains the API key. `keyHash` contains a hashed API key in\n  `sha256:<hex>` format. `metadata` contains arbitrary JSON metadata\n  associated with the key, which may be used by other policies. For\n  example, you may write an authorization policy allowing\n  `apiKey.group == 'sales'`.\n\nExample:\n\n\tapiVersion: v1\n\tkind: Secret\n\tmetadata:\n\t  name: api-key\n\tstringData:\n\t  client1: |\n\t    {\n\t      \"key\": \"k-123\",\n\t      \"metadata\": {\n\t        \"group\": \"sales\",\n\t        \"created_at\": \"2024-10-01T12:00:00Z\"\n\t      }\n\t    }\n\t  client2: \"k-456\"",
                  "properties": {
                    "matchLabels": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "Labels that must be present on each selected Secret.",
                      "type": "object"
                    }
                  },
                  "required": [
                    "matchLabels"
                  ],
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "exactly one of the fields in [secretRef secretSelector configMapSelector] must be set",
                  "rule": "(has(self.secretRef)?1:0)+(has(self.secretSelector)?1:0)+(has(self.configMapSelector)?1:0) == 1"
                }
              ],
              "additionalProperties": false
            },
            "authorization": {
              "description": "Access rules based on roles and\npermissions.\nIf multiple authorization rules are applied across different policies, at the same or different attachment points,\nall rules are merged.",
              "properties": {
                "action": {
                  "description": "The effect of this rule when it matches.\nIf unspecified, defaults to `Allow`.\n`Require` rules are cumulative: all require rules must match.",
                  "enum": [
                    "Allow",
                    "Deny",
                    "Require"
                  ],
                  "type": "string"
                },
                "policy": {
                  "description": "The authorization rule to evaluate.\n\n* `Allow`: any matching allow rule allows the request.\n* `Require`: every require rule must match for the request to be allowed.\n* `Deny`: any matching deny rule denies the request.\n\n`Deny` is not recommended because expression failures fail to deny; prefer\n`Allow` or `Require`. If used, design expressions defensively against evaluation errors.\n\nIf at least one `Allow` rule is configured, requests are denied unless at\nleast one allow rule matches.",
                  "properties": {
                    "matchExpressions": {
                      "description": "CEL expressions that must all evaluate to true for the rule to match.",
                      "items": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxItems": 256,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "matchExpressions"
                  ],
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "required": [
                "policy"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "basicAuthentication": {
              "description": "Authenticates users based on the `Basic`\nauthentication scheme (RFC 7617), where a username and password are\nencoded in the request.",
              "properties": {
                "location": {
                  "description": "Where Basic credentials are read from.\nIf omitted, credentials are read from the `Authorization` header with the `Basic ` prefix.",
                  "properties": {
                    "cookie": {
                      "properties": {
                        "name": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "expression": {
                      "description": "CEL expression that extracts the credential from the request.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "header": {
                      "properties": {
                        "name": {
                          "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                          "maxLength": 256,
                          "minLength": 1,
                          "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                          "type": "string"
                        },
                        "prefix": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "queryParameter": {
                      "properties": {
                        "name": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "exactly one of the fields in [header queryParameter cookie expression] must be set",
                      "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0)+(has(self.expression)?1:0) == 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "mode": {
                  "description": "Validation mode for basic authentication. Defaults to `Strict`.",
                  "enum": [
                    "Optional",
                    "Strict"
                  ],
                  "type": "string"
                },
                "realm": {
                  "description": "`realm` value to return in the `WWW-Authenticate`\nheader for failed authentication requests. If unset, `Restricted` will\nbe used.",
                  "type": "string"
                },
                "secretRef": {
                  "description": "Credential source, defaulting to a Kubernetes\n`Secret`, storing the `.htaccess` file. When using the default Secret\nresolver, the `Secret` must have a key named `.htaccess` by default;\noverride via `secretRef.key`. The value should contain the complete\n`.htaccess` file.\n\nNote: passwords should be the hash of the password, not the raw password. Use the `htpasswd` or similar commands\nto generate a hash. MD5, bcrypt, crypt, and SHA-1 are supported.\n\nExample:\n\n\tapiVersion: v1\n\tkind: Secret\n\tmetadata:\n\t  name: basic-auth\n\tstringData:\n\t  .htaccess: |\n\t    alice:$apr1$3zSE0Abt$IuETi4l5yO87MuOrbSE4V.\n\t    bob:$apr1$Ukb5LgRD$EPY2lIfY.A54jzLELNIId/",
                  "properties": {
                    "group": {
                      "description": "API group of the referenced credential; empty selects the core API group",
                      "type": "string"
                    },
                    "key": {
                      "description": "Key in the referenced Secret. If omitted, a location-specific default is used",
                      "maxLength": 253,
                      "minLength": 1,
                      "type": "string"
                    },
                    "kind": {
                      "description": "Kind of the referenced credential; empty defaults to `Secret`",
                      "type": "string"
                    },
                    "name": {
                      "description": "Name of the referenced credential",
                      "maxLength": 253,
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object",
                  "x-kubernetes-map-type": "atomic",
                  "x-kubernetes-validations": [
                    {
                      "message": "custom credential refs must set both group and kind",
                      "rule": "(!has(self.group) || size(self.group) == 0) ? (!has(self.kind) || size(self.kind) == 0 || self.kind == 'Secret') : (has(self.kind) && size(self.kind) > 0)"
                    }
                  ],
                  "additionalProperties": false
                },
                "users": {
                  "description": "Inline list of username and password pairs that will\nbe accepted. Each entry represents one line of the `htpasswd` format:\nhttps://httpd.apache.org/docs/2.4/programs/htpasswd.html.\n\nNote: passwords should be the hash of the password, not the raw password. Use the `htpasswd` or similar commands\nto generate a hash. MD5, bcrypt, crypt, and SHA-1 are supported.\n\nExample:\n\n\tusers:\n\t- \"user1:$apr1$ivPt0D4C$DmRhnewfHRSrb3DQC.WHC.\"\n\t- \"user2:$2y$05$r3J4d3VepzFkedkd/q1vI.pBYIpSqjfN0qOARV3ScUHysatnS0cL2\"",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 256,
                  "minItems": 1,
                  "type": "array"
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "exactly one of the fields in [users secretRef] must be set",
                  "rule": "(has(self.users)?1:0)+(has(self.secretRef)?1:0) == 1"
                }
              ],
              "additionalProperties": false
            },
            "buffer": {
              "description": "Buffers request and response bodies. Buffered bodies are accumulated in memory\nby the proxy until completion before being forwarded. This changes the proxies default behavior, which streams bodies.\n\nWarning: large bodies can lead to excessive memory usage in the proxy. Utilize with care, or with strict limits.",
              "properties": {
                "request": {
                  "description": "Request body buffering settings.",
                  "properties": {
                    "failureMode": {
                      "description": "Behavior when the request or response body exceeds the buffer limit.\nIf unset, defaults to FailClosed, returning 413 for oversized requests and 502 for oversized responses.",
                      "enum": [
                        "FailClosed",
                        "FailOpen"
                      ],
                      "type": "string"
                    },
                    "maxBytes": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "Maximum number of bytes to buffer from the request or response body.\nIf unset, defaults to the global proxy setting, which defaults to 2Mi.",
                      "maxLength": 32,
                      "minLength": 1,
                      "pattern": "^[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)(([KMGTPE]i)|[numkMGTPE]|[eE](\\+?0*([0-9]|1[0-8])|-0*[0-9]))?$",
                      "x-kubernetes-int-or-string": true,
                      "x-kubernetes-validations": [
                        {
                          "message": "value must be at least 1 byte and fit within uint32",
                          "rule": "(self >= 1 && self <= 4294967295) || self.size() > 0"
                        }
                      ]
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "response": {
                  "description": "Response body buffering settings.",
                  "properties": {
                    "failureMode": {
                      "description": "Behavior when the request or response body exceeds the buffer limit.\nIf unset, defaults to FailClosed, returning 413 for oversized requests and 502 for oversized responses.",
                      "enum": [
                        "FailClosed",
                        "FailOpen"
                      ],
                      "type": "string"
                    },
                    "maxBytes": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "Maximum number of bytes to buffer from the request or response body.\nIf unset, defaults to the global proxy setting, which defaults to 2Mi.",
                      "maxLength": 32,
                      "minLength": 1,
                      "pattern": "^[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)(([KMGTPE]i)|[numkMGTPE]|[eE](\\+?0*([0-9]|1[0-8])|-0*[0-9]))?$",
                      "x-kubernetes-int-or-string": true,
                      "x-kubernetes-validations": [
                        {
                          "message": "value must be at least 1 byte and fit within uint32",
                          "rule": "(self >= 1 && self <= 4294967295) || self.size() > 0"
                        }
                      ]
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "at least one of the fields in [request response] must be set",
                  "rule": "[has(self.request),has(self.response)].filter(x,x==true).size() >= 1"
                }
              ],
              "additionalProperties": false
            },
            "cors": {
              "description": "CORS configuration for the policy.",
              "properties": {
                "allowCredentials": {
                  "description": "AllowCredentials indicates whether the actual cross-origin request allows\nto include credentials.\n\nWhen set to true, the gateway will include the `Access-Control-Allow-Credentials`\nresponse header with value true (case-sensitive).\n\nWhen set to false or omitted the gateway will omit the header\n`Access-Control-Allow-Credentials` entirely (this is the standard CORS\nbehavior).\n\nSupport: Extended",
                  "type": "boolean"
                },
                "allowHeaders": {
                  "description": "Request headers allowed when accessing the resource, or `*` for all. Sets `Access-Control-Allow-Headers`. Support: Extended",
                  "items": {
                    "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                    "maxLength": 256,
                    "minLength": 1,
                    "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                    "type": "string"
                  },
                  "maxItems": 64,
                  "type": "array",
                  "x-kubernetes-list-type": "set",
                  "x-kubernetes-validations": [
                    {
                      "message": "AllowHeaders cannot contain '*' alongside other methods",
                      "rule": "!('*' in self && self.size() > 1)"
                    }
                  ]
                },
                "allowMethods": {
                  "description": "HTTP methods allowed for the resource, or `*` for all. CORS-safelisted methods (`GET`, `HEAD`, `POST`) are always allowed. Sets `Access-Control-Allow-Methods`. Support: Extended",
                  "items": {
                    "enum": [
                      "GET",
                      "HEAD",
                      "POST",
                      "PUT",
                      "DELETE",
                      "CONNECT",
                      "OPTIONS",
                      "TRACE",
                      "PATCH",
                      "*"
                    ],
                    "type": "string"
                  },
                  "maxItems": 9,
                  "type": "array",
                  "x-kubernetes-list-type": "set",
                  "x-kubernetes-validations": [
                    {
                      "message": "AllowMethods cannot contain '*' alongside other methods",
                      "rule": "!('*' in self && self.size() > 1)"
                    }
                  ]
                },
                "allowOrigins": {
                  "description": "Origins allowed to share the response, each as `<scheme>://<host>(:<port>)`; the host may use the `*` wildcard, and a bare `*` allows all origins. Sets `Access-Control-Allow-Origin`. When credentials are allowed, a specific origin is echoed instead of `*`. Support: Extended",
                  "items": {
                    "description": "The CORSOrigin MUST NOT be a relative URI, and it MUST follow the URI syntax and\nencoding rules specified in RFC3986.  The CORSOrigin MUST include both a\nscheme (\"http\" or \"https\") and a scheme-specific-part, or it should be a single '*' character.\nURIs that include an authority MUST include a fully qualified domain name or\nIP address as the host.",
                    "maxLength": 253,
                    "minLength": 1,
                    "pattern": "(^\\*$)|(^(http(s)?):\\/\\/(((\\*\\.)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9-]+|\\*)(:([0-9]{1,5}))?)$)",
                    "type": "string"
                  },
                  "maxItems": 64,
                  "type": "array",
                  "x-kubernetes-list-type": "set",
                  "x-kubernetes-validations": [
                    {
                      "message": "AllowOrigins cannot contain '*' alongside other origins",
                      "rule": "!('*' in self && self.size() > 1)"
                    }
                  ]
                },
                "exposeHeaders": {
                  "description": "Response headers exposed to client scripts, or `*` for all. Sets `Access-Control-Expose-Headers`. Support: Extended",
                  "items": {
                    "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                    "maxLength": 256,
                    "minLength": 1,
                    "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                    "type": "string"
                  },
                  "maxItems": 64,
                  "type": "array",
                  "x-kubernetes-list-type": "set"
                },
                "maxAge": {
                  "default": 5,
                  "description": "MaxAge indicates the duration (in seconds) for the client to cache the\nresults of a \"preflight\" request.\n\nThe information provided by the `Access-Control-Allow-Methods` and\n`Access-Control-Allow-Headers` response headers can be cached by the\nclient until the time specified by `Access-Control-Max-Age` elapses.\n\nThe default value of `Access-Control-Max-Age` response header is 5\n(seconds).\n\nWhen the `MaxAge` field is unspecified, the gateway sets the response\nheader \"Access-Control-Max-Age: 5\" by default.",
                  "format": "int32",
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "type": "object",
              "x-kubernetes-preserve-unknown-fields": true,
              "additionalProperties": false
            },
            "csrf": {
              "description": "Cross-Site Request Forgery (CSRF) policy for this traffic policy.\n\nThe CSRF policy has the following behavior:\n* Safe methods (`GET`, `HEAD`, `OPTIONS`) are automatically allowed.\n* Requests without `Sec-Fetch-Site` or `Origin` headers are assumed to\n  be same-origin or non-browser requests and are allowed.\n* Otherwise, the `Sec-Fetch-Site` header is checked, with a fallback to\n  comparing the `Origin` header to the `Host` header.",
              "properties": {
                "additionalOrigins": {
                  "description": "Additional source origins that will be\nallowed in addition to the destination origin. The `Origin` consists of\na scheme and a host, with an optional port, and takes the form\n`<scheme>://<host>(:<port>)`.",
                  "items": {
                    "maxLength": 256,
                    "minLength": 1,
                    "type": "string"
                  },
                  "maxItems": 16,
                  "minItems": 1,
                  "type": "array"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "delay": {
              "description": "Injects artificial latency before forwarding requests, for\nfault-injection testing.",
              "properties": {
                "duration": {
                  "description": "Latency to inject before forwarding the request to the backend. Either a duration string such\nas `2s`, or a CEL expression evaluated against the request that returns a duration (e.g.\n`duration(\"500ms\")`) or a number interpreted as milliseconds (e.g. `random() < 0.1 ? 500 : 0`\nfor probabilistic delay, or `int(random() * 500)` for jitter). A non-positive result injects\nno delay.\n\nThe injected delay counts against the request timeout.",
                  "maxLength": 16384,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "duration"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "directResponse": {
              "description": "Sends a direct response to the\nclient.",
              "properties": {
                "body": {
                  "description": "Content to return in the HTTP response body.\nThe maximum length of the body is restricted to prevent excessively large responses.\nIf this field is omitted, no body is included in the response.",
                  "maxLength": 4096,
                  "minLength": 1,
                  "type": "string"
                },
                "bodyExpression": {
                  "description": "CEL expression that produces the HTTP response body.\nStrings and bytes are written directly; other values are serialized as JSON.\nIf this field is omitted, no expression body is included in the response.",
                  "maxLength": 16384,
                  "minLength": 1,
                  "type": "string"
                },
                "conditional": {
                  "description": "Conditional policy execution. Set this or the top-level directResponse fields.\nThe first matching policy will be executed.\nA single policy may be provided without a condition set; if so, it must be the last policy and will be the fallback\nin case no conditions are met.",
                  "items": {
                    "properties": {
                      "condition": {
                        "description": "CEL expression that must evaluate to true for this policy to execute.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "policy": {
                        "description": "Policy to apply when the condition matches.",
                        "properties": {
                          "body": {
                            "description": "Content to return in the HTTP response body.\nThe maximum length of the body is restricted to prevent excessively large responses.\nIf this field is omitted, no body is included in the response.",
                            "maxLength": 4096,
                            "minLength": 1,
                            "type": "string"
                          },
                          "bodyExpression": {
                            "description": "CEL expression that produces the HTTP response body.\nStrings and bytes are written directly; other values are serialized as JSON.\nIf this field is omitted, no expression body is included in the response.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          },
                          "headers": {
                            "description": "Response headers to set on the direct response.",
                            "items": {
                              "properties": {
                                "name": {
                                  "description": "The name of the header to set.",
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                  "type": "string"
                                },
                                "value": {
                                  "description": "CEL expression that generates the output value for\nthe header.",
                                  "maxLength": 16384,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name",
                                "value"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            },
                            "maxItems": 16,
                            "minItems": 1,
                            "type": "array",
                            "x-kubernetes-list-map-keys": [
                              "name"
                            ],
                            "x-kubernetes-list-type": "map"
                          },
                          "status": {
                            "description": "HTTP status code to return.",
                            "format": "int32",
                            "maximum": 599,
                            "minimum": 200,
                            "type": "integer"
                          }
                        },
                        "type": "object",
                        "x-kubernetes-validations": [
                          {
                            "message": "status is required",
                            "rule": "has(self.status)"
                          },
                          {
                            "message": "body and bodyExpression may not both be set",
                            "rule": "!(has(self.body) && has(self.bodyExpression))"
                          }
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "policy"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 16,
                  "minItems": 1,
                  "type": "array",
                  "x-kubernetes-validations": [
                    {
                      "message": "conditional entries without condition must be last",
                      "rule": "self.filter(e, !has(e.condition)).size() <= 1 && (!self.exists(e, !has(e.condition)) || !has(self[size(self) - 1].condition))"
                    }
                  ]
                },
                "headers": {
                  "description": "Response headers to set on the direct response.",
                  "items": {
                    "properties": {
                      "name": {
                        "description": "The name of the header to set.",
                        "maxLength": 256,
                        "minLength": 1,
                        "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                        "type": "string"
                      },
                      "value": {
                        "description": "CEL expression that generates the output value for\nthe header.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "value"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 16,
                  "minItems": 1,
                  "type": "array",
                  "x-kubernetes-list-map-keys": [
                    "name"
                  ],
                  "x-kubernetes-list-type": "map"
                },
                "status": {
                  "description": "HTTP status code to return.",
                  "format": "int32",
                  "maximum": 599,
                  "minimum": 200,
                  "type": "integer"
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "body and bodyExpression may not both be set",
                  "rule": "!(has(self.body) && has(self.bodyExpression))"
                },
                {
                  "message": "conditional cannot be set with any other field",
                  "rule": "has(self.conditional) ? [has(self.body),has(self.bodyExpression),has(self.headers),has(self.status)].filter(x,x==true).size() == 0 : true"
                },
                {
                  "message": "status: Required value",
                  "rule": "has(self.conditional) ? true : has(self.status)"
                }
              ],
              "additionalProperties": false
            },
            "extAuth": {
              "description": "External authentication configuration for the policy.\nThis selects the external server to send requests to for authentication.\n\nAn extAuth policy can be conditionally set by nesting configuration under the `conditional` field.",
              "properties": {
                "backendRef": {
                  "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                  "properties": {
                    "group": {
                      "default": "",
                      "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                      "maxLength": 253,
                      "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                      "type": "string"
                    },
                    "kind": {
                      "default": "Service",
                      "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                      "type": "string"
                    },
                    "name": {
                      "description": "Name is the name of the referent.",
                      "maxLength": 253,
                      "minLength": 1,
                      "type": "string"
                    },
                    "namespace": {
                      "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    },
                    "port": {
                      "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                      "format": "int32",
                      "maximum": 65535,
                      "minimum": 1,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "Must have port for Service reference",
                      "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                    }
                  ],
                  "additionalProperties": false
                },
                "cache": {
                  "description": "Caches authorization results.\n\nWARNING: the safety of this feature depends on the cache key accurately\ncapturing every request property that the authorization service uses to\nmake a decision. For example, if the service returns different results\nbased on both path and authorization header, both must be included in\n`key`; otherwise, one request may incorrectly reuse another request's\nauthorization result.\n\nIf any key expression fails to evaluate or produces an unsupported value,\nthe request is still sent to the authorization service, but its result is\nnot read from or written to the cache.",
                  "properties": {
                    "key": {
                      "description": "Ordered list of CEL expressions evaluated against the request\nto construct the cache key.",
                      "items": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array"
                    },
                    "maxEntries": {
                      "description": "Maximum number of authorization results to keep in\nthe cache. If unset, this defaults to 10000.",
                      "format": "int32",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "ttl": {
                      "description": "Duration string, such as `5m`, or a CEL expression that\nreturns the duration that cached authorization results may be reused, or a\ntimestamp when the cached authorization result expires. The expression is\nevaluated after the authorization response has been applied to the request.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "key",
                    "ttl"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "conditional": {
                  "description": "Conditional policy execution. Set this or the top-level extAuth fields.\nThe first matching policy will be executed.\nA single policy may be provided without a condition set; if so, it must be the last policy and will be the fallback\nin case no conditions are met.",
                  "items": {
                    "properties": {
                      "condition": {
                        "description": "CEL expression that must evaluate to true for this policy to execute.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "policy": {
                        "description": "Policy to apply when the condition matches.",
                        "properties": {
                          "backendRef": {
                            "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                            "properties": {
                              "group": {
                                "default": "",
                                "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                                "maxLength": 253,
                                "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                "type": "string"
                              },
                              "kind": {
                                "default": "Service",
                                "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                "type": "string"
                              },
                              "name": {
                                "description": "Name is the name of the referent.",
                                "maxLength": 253,
                                "minLength": 1,
                                "type": "string"
                              },
                              "namespace": {
                                "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                "type": "string"
                              },
                              "port": {
                                "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                                "format": "int32",
                                "maximum": 65535,
                                "minimum": 1,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object",
                            "x-kubernetes-validations": [
                              {
                                "message": "Must have port for Service reference",
                                "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                              }
                            ],
                            "additionalProperties": false
                          },
                          "cache": {
                            "description": "Caches authorization results.\n\nWARNING: the safety of this feature depends on the cache key accurately\ncapturing every request property that the authorization service uses to\nmake a decision. For example, if the service returns different results\nbased on both path and authorization header, both must be included in\n`key`; otherwise, one request may incorrectly reuse another request's\nauthorization result.\n\nIf any key expression fails to evaluate or produces an unsupported value,\nthe request is still sent to the authorization service, but its result is\nnot read from or written to the cache.",
                            "properties": {
                              "key": {
                                "description": "Ordered list of CEL expressions evaluated against the request\nto construct the cache key.",
                                "items": {
                                  "description": "A Common Expression Language (CEL) expression.",
                                  "maxLength": 16384,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "maxItems": 16,
                                "minItems": 1,
                                "type": "array"
                              },
                              "maxEntries": {
                                "description": "Maximum number of authorization results to keep in\nthe cache. If unset, this defaults to 10000.",
                                "format": "int32",
                                "minimum": 1,
                                "type": "integer"
                              },
                              "ttl": {
                                "description": "Duration string, such as `5m`, or a CEL expression that\nreturns the duration that cached authorization results may be reused, or a\ntimestamp when the cached authorization result expires. The expression is\nevaluated after the authorization response has been applied to the request.",
                                "maxLength": 16384,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "key",
                              "ttl"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "failureMode": {
                            "description": "Behavior when the external authorization service is\nunavailable or returns an error. \"FailOpen\" allows the request to continue.\n\"FailClosed\" (default) denies the request.",
                            "enum": [
                              "FailClosed",
                              "FailOpen"
                            ],
                            "type": "string"
                          },
                          "forwardBody": {
                            "description": "Whether to include the HTTP body in the authorization request.\nIf enabled, the request body will be buffered.",
                            "properties": {
                              "maxSize": {
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ],
                                "description": "Largest body, in bytes, that will be buffered\nand sent to the authorization server. If the body size is larger than\n`maxSize`, then the request will be rejected with a response.",
                                "maxLength": 32,
                                "minLength": 1,
                                "pattern": "^[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)(([KMGTPE]i)|[numkMGTPE]|[eE](\\+?0*([0-9]|1[0-8])|-0*[0-9]))?$",
                                "x-kubernetes-int-or-string": true,
                                "x-kubernetes-validations": [
                                  {
                                    "message": "value must be at least 1 byte and fit within uint32",
                                    "rule": "(self >= 1 && self <= 4294967295) || self.size() > 0"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "maxSize"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "grpc": {
                            "description": "Uses the gRPC External Authorization\n[protocol](https://www.envoyproxy.io/docs/envoy/latest/api-v3/service/auth/v3/external_auth.proto) should be used.",
                            "properties": {
                              "contextExtensions": {
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "description": "Additional arbitrary key-value pairs to\nsend to the authorization server in the `context_extensions` field.",
                                "maxProperties": 64,
                                "type": "object"
                              },
                              "requestMetadata": {
                                "additionalProperties": {
                                  "description": "A Common Expression Language (CEL) expression.",
                                  "maxLength": 16384,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "description": "Metadata to send to the authorization\nserver. This maps to the `metadata_context.filter_metadata` field of the\nrequest, and allows dynamic CEL expressions. If unset, by default the\n`envoy.filters.http.jwt_authn` key is set if the JWT policy is used as\nwell, for compatibility.",
                                "maxProperties": 64,
                                "type": "object"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "http": {
                            "description": "Uses HTTP to connect to\nthe authorization server. The authorization server must return a `200`\nstatus code, otherwise the request is considered an authorization\nfailure.",
                            "properties": {
                              "addRequestHeaders": {
                                "additionalProperties": {
                                  "description": "A Common Expression Language (CEL) expression.",
                                  "maxLength": 16384,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "description": "Additional headers to add to the\nrequest to the authorization server. While `allowedRequestHeaders` just\npasses the original headers through, `addRequestHeaders` allows defining\ncustom headers based on CEL expressions.",
                                "maxProperties": 64,
                                "type": "object"
                              },
                              "allowedRequestHeaders": {
                                "description": "Additional headers from the client request that\nwill be sent to the authorization server.\n\nIf unset, the following headers are sent by default: `Authorization`.",
                                "items": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "maxItems": 64,
                                "type": "array"
                              },
                              "allowedResponseHeaders": {
                                "description": "Headers from the authorization response that\nwill be copied into the request to the backend.",
                                "items": {
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "maxItems": 64,
                                "type": "array"
                              },
                              "body": {
                                "description": "Body is a CEL expression that produces the HTTP authorization request body.\nStrings and bytes are used directly; other values are JSON-encoded.",
                                "maxLength": 16384,
                                "minLength": 1,
                                "type": "string"
                              },
                              "path": {
                                "description": "Path to send to the authorization server. If\nunset, this defaults to the original request path.\nThis is a CEL expression, which allows customizing the path based on the\nincoming request. For example, to add a prefix, use\n`\"/prefix/\" + request.path`.",
                                "maxLength": 16384,
                                "minLength": 1,
                                "type": "string"
                              },
                              "redirect": {
                                "description": "Optional expression that determines a path to\nredirect to on authorization failure. This is useful to redirect to a\nsign-in page.",
                                "maxLength": 16384,
                                "minLength": 1,
                                "type": "string"
                              },
                              "responseMetadata": {
                                "additionalProperties": {
                                  "description": "A Common Expression Language (CEL) expression.",
                                  "maxLength": 16384,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "description": "Metadata fields to construct\nfrom the authorization response. These will be included under the\n`extauthz` variable in future CEL expressions. Setting this is useful\nfor things like logging usernames, without needing to include them as\nheaders to the backend, as `allowedResponseHeaders` would.",
                                "maxProperties": 64,
                                "type": "object"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "url": {
                            "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                            "maxLength": 1024,
                            "minLength": 1,
                            "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "x-kubernetes-validations": [
                          {
                            "message": "exactly one of backendRef or url is required",
                            "rule": "[has(self.backendRef),has(self.url)].filter(x,x==true).size() == 1"
                          },
                          {
                            "message": "exactly one of the fields in [grpc http] must be set",
                            "rule": "[has(self.grpc),has(self.http)].filter(x,x==true).size() == 1"
                          },
                          {
                            "message": "forwardBody cannot be used with http.body",
                            "rule": "!(has(self.forwardBody) && has(self.http) && has(self.http.body))"
                          },
                          {
                            "message": "url path is only valid with http",
                            "rule": "!has(self.url) || !self.url.matches('^https?://[^/?#]+/') || has(self.http)"
                          },
                          {
                            "message": "http.path may not be set when url includes a path",
                            "rule": "!has(self.url) || !self.url.matches('^https?://[^/?#]+/') || !has(self.http) || !has(self.http.path)"
                          }
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "policy"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 16,
                  "minItems": 1,
                  "type": "array",
                  "x-kubernetes-validations": [
                    {
                      "message": "conditional entries without condition must be last",
                      "rule": "self.filter(e, !has(e.condition)).size() <= 1 && (!self.exists(e, !has(e.condition)) || !has(self[size(self) - 1].condition))"
                    }
                  ]
                },
                "failureMode": {
                  "description": "Behavior when the external authorization service is\nunavailable or returns an error. \"FailOpen\" allows the request to continue.\n\"FailClosed\" (default) denies the request.",
                  "enum": [
                    "FailClosed",
                    "FailOpen"
                  ],
                  "type": "string"
                },
                "forwardBody": {
                  "description": "Whether to include the HTTP body in the authorization request.\nIf enabled, the request body will be buffered.",
                  "properties": {
                    "maxSize": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "Largest body, in bytes, that will be buffered\nand sent to the authorization server. If the body size is larger than\n`maxSize`, then the request will be rejected with a response.",
                      "maxLength": 32,
                      "minLength": 1,
                      "pattern": "^[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)(([KMGTPE]i)|[numkMGTPE]|[eE](\\+?0*([0-9]|1[0-8])|-0*[0-9]))?$",
                      "x-kubernetes-int-or-string": true,
                      "x-kubernetes-validations": [
                        {
                          "message": "value must be at least 1 byte and fit within uint32",
                          "rule": "(self >= 1 && self <= 4294967295) || self.size() > 0"
                        }
                      ]
                    }
                  },
                  "required": [
                    "maxSize"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "grpc": {
                  "description": "Uses the gRPC External Authorization\n[protocol](https://www.envoyproxy.io/docs/envoy/latest/api-v3/service/auth/v3/external_auth.proto) should be used.",
                  "properties": {
                    "contextExtensions": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "Additional arbitrary key-value pairs to\nsend to the authorization server in the `context_extensions` field.",
                      "maxProperties": 64,
                      "type": "object"
                    },
                    "requestMetadata": {
                      "additionalProperties": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "description": "Metadata to send to the authorization\nserver. This maps to the `metadata_context.filter_metadata` field of the\nrequest, and allows dynamic CEL expressions. If unset, by default the\n`envoy.filters.http.jwt_authn` key is set if the JWT policy is used as\nwell, for compatibility.",
                      "maxProperties": 64,
                      "type": "object"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "http": {
                  "description": "Uses HTTP to connect to\nthe authorization server. The authorization server must return a `200`\nstatus code, otherwise the request is considered an authorization\nfailure.",
                  "properties": {
                    "addRequestHeaders": {
                      "additionalProperties": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "description": "Additional headers to add to the\nrequest to the authorization server. While `allowedRequestHeaders` just\npasses the original headers through, `addRequestHeaders` allows defining\ncustom headers based on CEL expressions.",
                      "maxProperties": 64,
                      "type": "object"
                    },
                    "allowedRequestHeaders": {
                      "description": "Additional headers from the client request that\nwill be sent to the authorization server.\n\nIf unset, the following headers are sent by default: `Authorization`.",
                      "items": {
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxItems": 64,
                      "type": "array"
                    },
                    "allowedResponseHeaders": {
                      "description": "Headers from the authorization response that\nwill be copied into the request to the backend.",
                      "items": {
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxItems": 64,
                      "type": "array"
                    },
                    "body": {
                      "description": "Body is a CEL expression that produces the HTTP authorization request body.\nStrings and bytes are used directly; other values are JSON-encoded.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "path": {
                      "description": "Path to send to the authorization server. If\nunset, this defaults to the original request path.\nThis is a CEL expression, which allows customizing the path based on the\nincoming request. For example, to add a prefix, use\n`\"/prefix/\" + request.path`.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "redirect": {
                      "description": "Optional expression that determines a path to\nredirect to on authorization failure. This is useful to redirect to a\nsign-in page.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "responseMetadata": {
                      "additionalProperties": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "description": "Metadata fields to construct\nfrom the authorization response. These will be included under the\n`extauthz` variable in future CEL expressions. Setting this is useful\nfor things like logging usernames, without needing to include them as\nheaders to the backend, as `allowedResponseHeaders` would.",
                      "maxProperties": 64,
                      "type": "object"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "url": {
                  "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                  "maxLength": 1024,
                  "minLength": 1,
                  "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                  "type": "string"
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "exactly one of backendRef or url must be set unless conditional is set",
                  "rule": "has(self.conditional) ? (!has(self.backendRef) && !has(self.url)) : [has(self.backendRef),has(self.url)].filter(x,x==true).size() == 1"
                },
                {
                  "message": "exactly one of the fields in [grpc http] must be set",
                  "rule": "has(self.conditional) || [has(self.grpc),has(self.http)].filter(x,x==true).size() == 1"
                },
                {
                  "message": "forwardBody cannot be used with http.body",
                  "rule": "!(has(self.forwardBody) && has(self.http) && has(self.http.body))"
                },
                {
                  "message": "url path is only valid with http",
                  "rule": "!has(self.url) || !self.url.matches('^https?://[^/?#]+/') || has(self.http)"
                },
                {
                  "message": "http.path may not be set when url includes a path",
                  "rule": "!has(self.url) || !self.url.matches('^https?://[^/?#]+/') || !has(self.http) || !has(self.http.path)"
                },
                {
                  "message": "conditional cannot be set with any other field",
                  "rule": "has(self.conditional) ? [has(self.backendRef),has(self.cache),has(self.failureMode),has(self.forwardBody),has(self.grpc),has(self.http),has(self.url)].filter(x,x==true).size() == 0 : true"
                }
              ],
              "additionalProperties": false
            },
            "extProc": {
              "description": "External processing configuration for the policy.",
              "properties": {
                "backendRef": {
                  "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                  "properties": {
                    "group": {
                      "default": "",
                      "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                      "maxLength": 253,
                      "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                      "type": "string"
                    },
                    "kind": {
                      "default": "Service",
                      "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                      "type": "string"
                    },
                    "name": {
                      "description": "Name is the name of the referent.",
                      "maxLength": 253,
                      "minLength": 1,
                      "type": "string"
                    },
                    "namespace": {
                      "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    },
                    "port": {
                      "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                      "format": "int32",
                      "maximum": 65535,
                      "minimum": 1,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "Must have port for Service reference",
                      "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                    }
                  ],
                  "additionalProperties": false
                },
                "conditional": {
                  "description": "Conditional policy execution. Set this or the top-level extProc fields.\nThe first matching policy will be executed.\nA single policy may be provided without a condition set; if so, it must be the last policy and will be the fallback\nin case no conditions are met.",
                  "items": {
                    "properties": {
                      "condition": {
                        "description": "CEL expression that must evaluate to true for this policy to execute.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "policy": {
                        "description": "Policy to apply when the condition matches.",
                        "properties": {
                          "backendRef": {
                            "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                            "properties": {
                              "group": {
                                "default": "",
                                "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                                "maxLength": 253,
                                "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                "type": "string"
                              },
                              "kind": {
                                "default": "Service",
                                "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                "type": "string"
                              },
                              "name": {
                                "description": "Name is the name of the referent.",
                                "maxLength": 253,
                                "minLength": 1,
                                "type": "string"
                              },
                              "namespace": {
                                "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                "type": "string"
                              },
                              "port": {
                                "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                                "format": "int32",
                                "maximum": 65535,
                                "minimum": 1,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "type": "object",
                            "x-kubernetes-validations": [
                              {
                                "message": "Must have port for Service reference",
                                "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                              }
                            ],
                            "additionalProperties": false
                          },
                          "failureMode": {
                            "description": "Behavior when the external processor is unavailable or returns an error.\n\"FailOpen\" allows the request to continue, as long as the request body has not\nbeen sent (or started streaming) to the ext_proc. Once the request body has\nstarted streaming to the ext_proc, the request will fail closed on error.\n\"FailClosed\" (default) rejects the request on any failure.",
                            "enum": [
                              "FailClosed",
                              "FailOpen"
                            ],
                            "type": "string"
                          },
                          "metadataContext": {
                            "additionalProperties": {
                              "additionalProperties": {
                                "description": "A Common Expression Language (CEL) expression.",
                                "maxLength": 16384,
                                "minLength": 1,
                                "type": "string"
                              },
                              "description": "NamespacedMetadataContext holds the CEL expressions for a single metadata\nnamespace, keyed by the metadata key within that namespace.",
                              "type": "object"
                            },
                            "description": "Metadata to send to the external processor in the\n`metadata_context.filter_metadata` field of the ProcessingRequest.\nKeyed by metadata namespace, then by key within that namespace; values are\nCEL expressions evaluated per request.",
                            "maxProperties": 64,
                            "type": "object"
                          },
                          "processingOptions": {
                            "description": "How request and response phases are sent to ext_proc.",
                            "properties": {
                              "allowModeOverride": {
                                "description": "Allows ext_proc `mode_override` values from matching header responses to update\nsubsequent request/response processing phases for this exchange. Defaults to `false`.",
                                "type": "boolean"
                              },
                              "requestBodyMode": {
                                "description": "How request bodies are sent to the external processor.\nDefaults to `FullDuplexStreamed`.",
                                "enum": [
                                  "Buffered",
                                  "BufferedPartial",
                                  "FullDuplexStreamed",
                                  "None"
                                ],
                                "type": "string"
                              },
                              "requestHeaderMode": {
                                "description": "Whether request headers are sent to the external processor.\nDefaults to `Send`.",
                                "enum": [
                                  "Send",
                                  "Skip"
                                ],
                                "type": "string"
                              },
                              "requestTrailerMode": {
                                "description": "Whether request trailers are sent to the external processor.\nDefaults to `Send`.",
                                "enum": [
                                  "Send",
                                  "Skip"
                                ],
                                "type": "string"
                              },
                              "responseBodyMode": {
                                "description": "How response bodies are sent to the external processor.\nDefaults to `FullDuplexStreamed`.",
                                "enum": [
                                  "Buffered",
                                  "BufferedPartial",
                                  "FullDuplexStreamed",
                                  "None"
                                ],
                                "type": "string"
                              },
                              "responseHeaderMode": {
                                "description": "Whether response headers are sent to the external processor.\nDefaults to `Send`.",
                                "enum": [
                                  "Send",
                                  "Skip"
                                ],
                                "type": "string"
                              },
                              "responseTrailerMode": {
                                "description": "Whether response trailers are sent to the external processor.\nDefaults to `Send`.",
                                "enum": [
                                  "Send",
                                  "Skip"
                                ],
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "requestAttributes": {
                            "additionalProperties": {
                              "description": "A Common Expression Language (CEL) expression.",
                              "maxLength": 16384,
                              "minLength": 1,
                              "type": "string"
                            },
                            "description": "Request attributes to send to the external processor in the request\n`attributes` field of the ProcessingRequest. Values are CEL expressions\nevaluated per request.",
                            "maxProperties": 64,
                            "type": "object"
                          },
                          "responseAttributes": {
                            "additionalProperties": {
                              "description": "A Common Expression Language (CEL) expression.",
                              "maxLength": 16384,
                              "minLength": 1,
                              "type": "string"
                            },
                            "description": "Response attributes to send to the external processor in the response\n`attributes` field of the ProcessingRequest. Values are CEL expressions\nevaluated per response.",
                            "maxProperties": 64,
                            "type": "object"
                          },
                          "url": {
                            "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                            "maxLength": 1024,
                            "minLength": 1,
                            "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "x-kubernetes-validations": [
                          {
                            "message": "exactly one of backendRef or url is required",
                            "rule": "[has(self.backendRef),has(self.url)].filter(x,x==true).size() == 1"
                          },
                          {
                            "message": "url must not include a path",
                            "rule": "!has(self.url) || self.url.matches('^https?://[^/?#]+$')"
                          }
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "policy"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 16,
                  "minItems": 1,
                  "type": "array",
                  "x-kubernetes-validations": [
                    {
                      "message": "conditional entries without condition must be last",
                      "rule": "self.filter(e, !has(e.condition)).size() <= 1 && (!self.exists(e, !has(e.condition)) || !has(self[size(self) - 1].condition))"
                    }
                  ]
                },
                "failureMode": {
                  "description": "Behavior when the external processor is unavailable or returns an error.\n\"FailOpen\" allows the request to continue, as long as the request body has not\nbeen sent (or started streaming) to the ext_proc. Once the request body has\nstarted streaming to the ext_proc, the request will fail closed on error.\n\"FailClosed\" (default) rejects the request on any failure.",
                  "enum": [
                    "FailClosed",
                    "FailOpen"
                  ],
                  "type": "string"
                },
                "metadataContext": {
                  "additionalProperties": {
                    "additionalProperties": {
                      "description": "A Common Expression Language (CEL) expression.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "description": "NamespacedMetadataContext holds the CEL expressions for a single metadata\nnamespace, keyed by the metadata key within that namespace.",
                    "type": "object"
                  },
                  "description": "Metadata to send to the external processor in the\n`metadata_context.filter_metadata` field of the ProcessingRequest.\nKeyed by metadata namespace, then by key within that namespace; values are\nCEL expressions evaluated per request.",
                  "maxProperties": 64,
                  "type": "object"
                },
                "processingOptions": {
                  "description": "How request and response phases are sent to ext_proc.",
                  "properties": {
                    "allowModeOverride": {
                      "description": "Allows ext_proc `mode_override` values from matching header responses to update\nsubsequent request/response processing phases for this exchange. Defaults to `false`.",
                      "type": "boolean"
                    },
                    "requestBodyMode": {
                      "description": "How request bodies are sent to the external processor.\nDefaults to `FullDuplexStreamed`.",
                      "enum": [
                        "Buffered",
                        "BufferedPartial",
                        "FullDuplexStreamed",
                        "None"
                      ],
                      "type": "string"
                    },
                    "requestHeaderMode": {
                      "description": "Whether request headers are sent to the external processor.\nDefaults to `Send`.",
                      "enum": [
                        "Send",
                        "Skip"
                      ],
                      "type": "string"
                    },
                    "requestTrailerMode": {
                      "description": "Whether request trailers are sent to the external processor.\nDefaults to `Send`.",
                      "enum": [
                        "Send",
                        "Skip"
                      ],
                      "type": "string"
                    },
                    "responseBodyMode": {
                      "description": "How response bodies are sent to the external processor.\nDefaults to `FullDuplexStreamed`.",
                      "enum": [
                        "Buffered",
                        "BufferedPartial",
                        "FullDuplexStreamed",
                        "None"
                      ],
                      "type": "string"
                    },
                    "responseHeaderMode": {
                      "description": "Whether response headers are sent to the external processor.\nDefaults to `Send`.",
                      "enum": [
                        "Send",
                        "Skip"
                      ],
                      "type": "string"
                    },
                    "responseTrailerMode": {
                      "description": "Whether response trailers are sent to the external processor.\nDefaults to `Send`.",
                      "enum": [
                        "Send",
                        "Skip"
                      ],
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "requestAttributes": {
                  "additionalProperties": {
                    "description": "A Common Expression Language (CEL) expression.",
                    "maxLength": 16384,
                    "minLength": 1,
                    "type": "string"
                  },
                  "description": "Request attributes to send to the external processor in the request\n`attributes` field of the ProcessingRequest. Values are CEL expressions\nevaluated per request.",
                  "maxProperties": 64,
                  "type": "object"
                },
                "responseAttributes": {
                  "additionalProperties": {
                    "description": "A Common Expression Language (CEL) expression.",
                    "maxLength": 16384,
                    "minLength": 1,
                    "type": "string"
                  },
                  "description": "Response attributes to send to the external processor in the response\n`attributes` field of the ProcessingRequest. Values are CEL expressions\nevaluated per response.",
                  "maxProperties": 64,
                  "type": "object"
                },
                "url": {
                  "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                  "maxLength": 1024,
                  "minLength": 1,
                  "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                  "type": "string"
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "exactly one of backendRef or url must be set unless conditional is set",
                  "rule": "has(self.conditional) ? (!has(self.backendRef) && !has(self.url)) : [has(self.backendRef),has(self.url)].filter(x,x==true).size() == 1"
                },
                {
                  "message": "url must not include a path",
                  "rule": "!has(self.url) || self.url.matches('^https?://[^/?#]+$')"
                },
                {
                  "message": "conditional cannot be set with any other field",
                  "rule": "has(self.conditional) ? [has(self.backendRef),has(self.failureMode),has(self.metadataContext),has(self.processingOptions),has(self.requestAttributes),has(self.responseAttributes),has(self.url)].filter(x,x==true).size() == 0 : true"
                }
              ],
              "additionalProperties": false
            },
            "headerModifiers": {
              "description": "Request and response header modification policy.",
              "properties": {
                "request": {
                  "description": "Header changes to apply before forwarding a request.",
                  "properties": {
                    "add": {
                      "description": "Add adds the given header(s) (name, value) to the request\nbefore the action. It appends to any existing values associated\nwith the header name.\n\nInput:\n  GET /foo HTTP/1.1\n  my-header: foo\n\nConfig:\n  add:\n  - name: \"my-header\"\n    value: \"bar,baz\"\n\nOutput:\n  GET /foo HTTP/1.1\n  my-header: foo,bar,baz",
                      "items": {
                        "description": "HTTPHeader represents an HTTP Header name and value as defined by RFC 7230.",
                        "properties": {
                          "name": {
                            "description": "Name of the HTTP header, case-insensitive",
                            "maxLength": 256,
                            "minLength": 1,
                            "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                            "type": "string"
                          },
                          "value": {
                            "description": "Value for the HTTP header",
                            "maxLength": 4096,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    },
                    "remove": {
                      "description": "Remove the given header(s) from the HTTP request before the action. The\nvalue of Remove is a list of HTTP header names. Note that the header\nnames are case-insensitive (see\nhttps://datatracker.ietf.org/doc/html/rfc2616#section-4.2).\n\nInput:\n  GET /foo HTTP/1.1\n  my-header1: foo\n  my-header2: bar\n  my-header3: baz\n\nConfig:\n  remove: [\"my-header1\", \"my-header3\"]\n\nOutput:\n  GET /foo HTTP/1.1\n  my-header2: bar",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 16,
                      "type": "array",
                      "x-kubernetes-list-type": "set"
                    },
                    "set": {
                      "description": "Set overwrites the request with the given header (name, value)\nbefore the action.\n\nInput:\n  GET /foo HTTP/1.1\n  my-header: foo\n\nConfig:\n  set:\n  - name: \"my-header\"\n    value: \"bar\"\n\nOutput:\n  GET /foo HTTP/1.1\n  my-header: bar",
                      "items": {
                        "description": "HTTPHeader represents an HTTP Header name and value as defined by RFC 7230.",
                        "properties": {
                          "name": {
                            "description": "Name of the HTTP header, case-insensitive",
                            "maxLength": 256,
                            "minLength": 1,
                            "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                            "type": "string"
                          },
                          "value": {
                            "description": "Value for the HTTP header",
                            "maxLength": 4096,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "response": {
                  "description": "Header changes to apply before returning a response.",
                  "properties": {
                    "add": {
                      "description": "Add adds the given header(s) (name, value) to the request\nbefore the action. It appends to any existing values associated\nwith the header name.\n\nInput:\n  GET /foo HTTP/1.1\n  my-header: foo\n\nConfig:\n  add:\n  - name: \"my-header\"\n    value: \"bar,baz\"\n\nOutput:\n  GET /foo HTTP/1.1\n  my-header: foo,bar,baz",
                      "items": {
                        "description": "HTTPHeader represents an HTTP Header name and value as defined by RFC 7230.",
                        "properties": {
                          "name": {
                            "description": "Name of the HTTP header, case-insensitive",
                            "maxLength": 256,
                            "minLength": 1,
                            "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                            "type": "string"
                          },
                          "value": {
                            "description": "Value for the HTTP header",
                            "maxLength": 4096,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    },
                    "remove": {
                      "description": "Remove the given header(s) from the HTTP request before the action. The\nvalue of Remove is a list of HTTP header names. Note that the header\nnames are case-insensitive (see\nhttps://datatracker.ietf.org/doc/html/rfc2616#section-4.2).\n\nInput:\n  GET /foo HTTP/1.1\n  my-header1: foo\n  my-header2: bar\n  my-header3: baz\n\nConfig:\n  remove: [\"my-header1\", \"my-header3\"]\n\nOutput:\n  GET /foo HTTP/1.1\n  my-header2: bar",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 16,
                      "type": "array",
                      "x-kubernetes-list-type": "set"
                    },
                    "set": {
                      "description": "Set overwrites the request with the given header (name, value)\nbefore the action.\n\nInput:\n  GET /foo HTTP/1.1\n  my-header: foo\n\nConfig:\n  set:\n  - name: \"my-header\"\n    value: \"bar\"\n\nOutput:\n  GET /foo HTTP/1.1\n  my-header: bar",
                      "items": {
                        "description": "HTTPHeader represents an HTTP Header name and value as defined by RFC 7230.",
                        "properties": {
                          "name": {
                            "description": "Name of the HTTP header, case-insensitive",
                            "maxLength": 256,
                            "minLength": 1,
                            "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                            "type": "string"
                          },
                          "value": {
                            "description": "Value for the HTTP header",
                            "maxLength": 4096,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "at least one of the fields in [request response] must be set",
                  "rule": "[has(self.request),has(self.response)].filter(x,x==true).size() >= 1"
                }
              ],
              "additionalProperties": false
            },
            "hostRewrite": {
              "description": "How to rewrite the `Host` header for requests.\n\nIf the `HTTPRoute` `urlRewrite` filter already specifies a host rewrite,\nthis setting is ignored.",
              "properties": {
                "mode": {
                  "description": "Hostname rewrite mode.\n\nThe following may be specified:\n* `Auto`: automatically set the `Host` header based on the destination.\n* `None`: do not rewrite the `Host` header. The original `Host` header\n  will be passed through.\n\nThis setting defaults to `Auto` when connecting to hostname-based\n`Backend` types, and `None` otherwise, for `Service` or IP-based\nbackends.",
                  "enum": [
                    "Auto",
                    "None"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "mode"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "jwtAuthentication": {
              "description": "Authenticates users based on JWT tokens.",
              "properties": {
                "location": {
                  "description": "Where JWT credentials are read from.\nIf omitted, credentials are read from the `Authorization` header with the `Bearer ` prefix.",
                  "properties": {
                    "cookie": {
                      "properties": {
                        "name": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "expression": {
                      "description": "CEL expression that extracts the credential from the request.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "header": {
                      "properties": {
                        "name": {
                          "description": "Name of an HTTP header. HTTP/2 pseudo-headers (names beginning with `:`) are not supported",
                          "maxLength": 256,
                          "minLength": 1,
                          "pattern": "^[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                          "type": "string"
                        },
                        "prefix": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "queryParameter": {
                      "properties": {
                        "name": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "exactly one of the fields in [header queryParameter cookie expression] must be set",
                      "rule": "(has(self.header)?1:0)+(has(self.queryParameter)?1:0)+(has(self.cookie)?1:0)+(has(self.expression)?1:0) == 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "mcp": {
                  "description": "Enables MCP OAuth metadata endpoint handling\nand MCP-specific authentication behavior on top of standard JWT validation.\nWhen set, the gateway will serve the MCP OAuth metadata discovery endpoints.",
                  "properties": {
                    "clientId": {
                      "description": "Client ID to use for short-circuiting Dynamic Client Registration.\nIf set, the gateway will not proxy registration requests to the IDP and instead return this client ID.",
                      "type": "string"
                    },
                    "provider": {
                      "description": "Identity provider to use for MCP authentication flows.",
                      "enum": [
                        "Auth0",
                        "Authentik",
                        "Descope",
                        "Entra",
                        "Keycloak",
                        "Okta"
                      ],
                      "type": "string"
                    },
                    "resourceMetadata": {
                      "additionalProperties": {
                        "x-kubernetes-preserve-unknown-fields": true
                      },
                      "description": "Metadata to use for MCP resources,\nserved at the MCP OAuth metadata endpoints.",
                      "type": "object"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "mode": {
                  "description": "Validation mode for JWT authentication. Defaults to `Strict`.",
                  "enum": [
                    "Optional",
                    "Permissive",
                    "Strict"
                  ],
                  "type": "string"
                },
                "preserveToken": {
                  "description": "Keeps a successfully validated JWT in its original location. By default, the gateway removes\nthe JWT after validation. When the token only needs to be forwarded to the selected backend,\nprefer `backendAuth.passthrough` so it is not exposed to other policies in the request path.",
                  "type": "boolean"
                },
                "providers": {
                  "items": {
                    "properties": {
                      "audiences": {
                        "description": "Allowed audiences that are allowed\naccess. This corresponds to the `aud` claim\n([RFC 7519 \u00a74.1.3](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3)).\nIf unset, any audience is allowed.",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 64,
                        "minItems": 1,
                        "type": "array"
                      },
                      "issuer": {
                        "description": "IdP that issued the JWT. This corresponds to the\n`iss` claim ([RFC 7519 \u00a74.1.1](https://tools.ietf.org/html/rfc7519#section-4.1.1)).",
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      },
                      "jwks": {
                        "description": "JSON Web Key Set used to validate the signature of the\nJWT.",
                        "properties": {
                          "inline": {
                            "description": "Inline JSON Web Key Set used to validate the\nsignature of the JWT.",
                            "maxLength": 65536,
                            "minLength": 2,
                            "type": "string"
                          },
                          "remote": {
                            "description": "How to reach the JSON Web Key Set from a remote\naddress.",
                            "properties": {
                              "backendRef": {
                                "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                                "properties": {
                                  "group": {
                                    "default": "",
                                    "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                                    "maxLength": 253,
                                    "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                    "type": "string"
                                  },
                                  "kind": {
                                    "default": "Service",
                                    "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                    "type": "string"
                                  },
                                  "name": {
                                    "description": "Name is the name of the referent.",
                                    "maxLength": 253,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "namespace": {
                                    "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                    "type": "string"
                                  },
                                  "port": {
                                    "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                                    "format": "int32",
                                    "maximum": 65535,
                                    "minimum": 1,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "type": "object",
                                "x-kubernetes-validations": [
                                  {
                                    "message": "Must have port for Service reference",
                                    "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                                  }
                                ],
                                "additionalProperties": false
                              },
                              "cacheDuration": {
                                "description": "How long a fetched `jwks` document is used before it is re-fetched from the IdP.\nDefaults to `5m`.",
                                "maxLength": 32,
                                "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                                "type": "string",
                                "x-kubernetes-validations": [
                                  {
                                    "message": "cacheDuration must be at least 5m.",
                                    "rule": "duration(self) >= duration('5m')"
                                  }
                                ]
                              },
                              "jwksPath": {
                                "description": "Path to the IdP `jwks` endpoint, relative to the root, commonly\n`\".well-known/jwks.json\"`.",
                                "maxLength": 1024,
                                "minLength": 1,
                                "type": "string"
                              },
                              "url": {
                                "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                                "maxLength": 1024,
                                "minLength": 1,
                                "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "x-kubernetes-validations": [
                              {
                                "message": "jwksPath is required when backendRef is set",
                                "rule": "has(self.backendRef) ? has(self.jwksPath) : true"
                              },
                              {
                                "message": "jwksPath may not be set when url is set",
                                "rule": "has(self.url) ? !has(self.jwksPath) : true"
                              },
                              {
                                "message": "exactly one of the fields in [backendRef url] must be set",
                                "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                              }
                            ],
                            "additionalProperties": false
                          }
                        },
                        "type": "object",
                        "x-kubernetes-validations": [
                          {
                            "message": "exactly one of the fields in [remote inline] must be set",
                            "rule": "(has(self.remote)?1:0)+(has(self.inline)?1:0) == 1"
                          }
                        ],
                        "additionalProperties": false
                      },
                      "validation": {
                        "description": "Additional JWT claim presence requirements. Defaults to requiring `exp`.\nIssuer validation always requires `iss`; a non-empty audiences list also\nrequires `aud`, regardless of these options. An empty `requiredClaims`\nlist removes only the additional presence requirements. Expiration is\nstill checked whenever `exp` is present.",
                        "properties": {
                          "requiredClaims": {
                            "description": "Additional claims that must be present in the token payload.\nRecognized values: `exp`, `nbf`, `aud`, `sub`.\nDefaults to `[\"exp\"]` when omitted. An empty list adds no requirements\nbeyond `iss`, which is always required, and `aud`, which is required\nwhen a non-empty audiences list is configured. Expiration is still\nchecked whenever `exp` is present.",
                            "items": {
                              "description": "JWTClaim is a JWT claim whose presence can be required during validation.",
                              "enum": [
                                "aud",
                                "exp",
                                "nbf",
                                "sub"
                              ],
                              "type": "string"
                            },
                            "maxItems": 4,
                            "type": "array",
                            "x-kubernetes-list-type": "atomic"
                          }
                        },
                        "type": "object",
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "issuer",
                      "jwks"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 64,
                  "minItems": 1,
                  "type": "array"
                }
              },
              "required": [
                "providers"
              ],
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "jwtAuthentication.mcp requires exactly one provider",
                  "rule": "!has(self.mcp) || size(self.providers) == 1"
                },
                {
                  "message": "jwtAuthentication.mcp requires mode Strict",
                  "rule": "!has(self.mcp) || !has(self.mode) || self.mode == 'Strict'"
                }
              ],
              "additionalProperties": false
            },
            "phase": {
              "description": "The phase to apply the traffic policy to. If the phase is `PreRouting`,\nthe `targetRef` must be a `Gateway` or a `Listener`. `PreRouting` is\ntypically used only when a policy needs to influence the routing\ndecision.\n\nEven when using `PostRouting` mode, the policy can target the\n`Gateway` or `Listener`. This is a helper for applying the policy to all\nroutes under that `Gateway` or `Listener`, and follows the merging logic\ndescribed above.\n\nNote: `PreRouting` and `PostRouting` rules do not merge together. These\nare independent execution phases. That is, all `PreRouting` rules will\nmerge and execute, then all `PostRouting` rules will merge and execute.\n\nIf unset, this defaults to `PostRouting`.",
              "enum": [
                "PostRouting",
                "PreRouting"
              ],
              "type": "string"
            },
            "rateLimit": {
              "description": "Rate limiting configuration for the policy.\nThis limits the rate at which requests are processed.",
              "properties": {
                "conditional": {
                  "description": "Conditional policy execution. Set this or the top-level rateLimit fields.\nThe first matching policy will be executed.\nA single policy may be provided without a condition set; if so, it must be the last policy and will be the fallback\nin case no conditions are met.",
                  "items": {
                    "properties": {
                      "condition": {
                        "description": "CEL expression that must evaluate to true for this policy to execute.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "policy": {
                        "description": "Policy to apply when the condition matches.",
                        "properties": {
                          "global": {
                            "description": "Global rate limiting policy using an external service.",
                            "properties": {
                              "backendRef": {
                                "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                                "properties": {
                                  "group": {
                                    "default": "",
                                    "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                                    "maxLength": 253,
                                    "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                    "type": "string"
                                  },
                                  "kind": {
                                    "default": "Service",
                                    "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                    "type": "string"
                                  },
                                  "name": {
                                    "description": "Name is the name of the referent.",
                                    "maxLength": 253,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "namespace": {
                                    "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                    "type": "string"
                                  },
                                  "port": {
                                    "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                                    "format": "int32",
                                    "maximum": 65535,
                                    "minimum": 1,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "type": "object",
                                "x-kubernetes-validations": [
                                  {
                                    "message": "Must have port for Service reference",
                                    "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                                  }
                                ],
                                "additionalProperties": false
                              },
                              "descriptors": {
                                "description": "Dimensions for rate limiting. These values are\npassed to the rate limit service which applies configured limits based\non them. Each descriptor represents a single rate limit rule with one or\nmore entries.",
                                "items": {
                                  "properties": {
                                    "cost": {
                                      "description": "Common Expression Language (`CEL`) expression that determines\nthe cost of the request for this descriptor. If unset, `Requests` costs\ndefault to 1, and `Tokens` costs default to the total token count.\n\n`Tokens` cost are evaluated after the request has completed. For non-streaming requests, `request`, `llm`, and\n`response` fields are all available; for streaming requests, `response` is not available (however, all LLM\nattributes are in `llm`). For `Requests`, cost is computed during the request phase.\n\nSee https://agentgateway.dev/docs/standalone/latest/reference/cel/ for more info.",
                                      "maxLength": 16384,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "entries": {
                                      "description": "Individual components that make up this descriptor.",
                                      "items": {
                                        "description": "Entry in a rate limit descriptor.",
                                        "properties": {
                                          "expression": {
                                            "description": "Common Expression Language (`CEL`) expression that\ndefines the value for the descriptor.\n\nFor example, to rate limit based on the Client IP: `source.address`.\n\nSee https://agentgateway.dev/docs/standalone/latest/reference/cel/ for more info.",
                                            "maxLength": 16384,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "name": {
                                            "description": "Name of the descriptor.",
                                            "maxLength": 64,
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "expression",
                                          "name"
                                        ],
                                        "type": "object",
                                        "additionalProperties": false
                                      },
                                      "maxItems": 16,
                                      "minItems": 1,
                                      "type": "array"
                                    },
                                    "limitOverride": {
                                      "description": "Common Expression Language (`CEL`) expression that returns a dynamic\nlimit override for this descriptor. The expression must evaluate to an\nobject containing `unit` and `requestsPerUnit`, for example\n`{\"unit\":\"minute\",\"requestsPerUnit\":5}`.\n\nSee https://agentgateway.dev/docs/standalone/latest/reference/cel/ for more info.",
                                      "maxLength": 16384,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "unit": {
                                      "description": "Cost unit. If unspecified,\n`Requests` is used.",
                                      "enum": [
                                        "Requests",
                                        "Tokens"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "entries"
                                  ],
                                  "type": "object",
                                  "additionalProperties": false
                                },
                                "maxItems": 16,
                                "minItems": 1,
                                "type": "array"
                              },
                              "domain": {
                                "description": "Domain under which this limit should apply.\nThis is an arbitrary string that enables a rate limit server to distinguish between different applications.",
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              },
                              "failureMode": {
                                "description": "Behavior when the remote rate limit service is\nunavailable or returns an error. `FailOpen` allows the request to continue.\n`FailClosed` (default) denies the request.",
                                "enum": [
                                  "FailClosed",
                                  "FailOpen"
                                ],
                                "type": "string"
                              },
                              "url": {
                                "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                                "maxLength": 1024,
                                "minLength": 1,
                                "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "descriptors",
                              "domain"
                            ],
                            "type": "object",
                            "x-kubernetes-validations": [
                              {
                                "message": "url must not include a path",
                                "rule": "!has(self.url) || self.url.matches('^https?://[^/?#]+$')"
                              },
                              {
                                "message": "exactly one of the fields in [backendRef url] must be set",
                                "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                              }
                            ],
                            "additionalProperties": false
                          },
                          "local": {
                            "description": "Local rate limiting policy.",
                            "items": {
                              "description": "Local rate limiting policy. Local rate limits are handled on a per-proxy basis, without coordination\nbetween instances of the proxy.",
                              "properties": {
                                "burst": {
                                  "description": "Allowance of requests above the request-per-unit\nthat should be allowed within a short period of time.",
                                  "format": "int32",
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "key": {
                                  "description": "CEL expression selecting the bucket the request counts against, for example `jwt.sub` for a\nper-user limit or `jwt.team` for a per-team limit. Each distinct value gets its own bucket with\nthe limit above. Requests without a value, or whose expression cannot be evaluated, share one\nbucket. When unset, all requests share one bucket. Each proxy instance keeps a bounded number\nof buckets per rule and drops the least used ones.",
                                  "maxLength": 16384,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "requests": {
                                  "description": "Number of HTTP requests per unit of time that\nare allowed. Requests exceeding this limit will fail with a `429`\nerror.",
                                  "format": "int32",
                                  "minimum": 1,
                                  "type": "integer"
                                },
                                "tokens": {
                                  "description": "Number of LLM tokens per unit of time that are\nallowed. Requests exceeding this limit will fail with a `429` error.\n\nBoth input and output tokens are counted. However, token counts are not known until the request completes. As a\nresult, token-based rate limits will apply to future requests only.",
                                  "format": "int32",
                                  "minimum": 1,
                                  "type": "integer"
                                },
                                "unit": {
                                  "description": "Unit of time for the limit.",
                                  "enum": [
                                    "Hours",
                                    "Minutes",
                                    "Seconds"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "unit"
                              ],
                              "type": "object",
                              "x-kubernetes-validations": [
                                {
                                  "message": "exactly one of the fields in [requests tokens] must be set",
                                  "rule": "(has(self.requests)?1:0)+(has(self.tokens)?1:0) == 1"
                                }
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 16,
                            "minItems": 1,
                            "type": "array"
                          }
                        },
                        "type": "object",
                        "x-kubernetes-validations": [
                          {
                            "message": "at least one of the fields in [global local] must be set",
                            "rule": "[has(self.global),has(self.local)].filter(x,x==true).size() >= 1"
                          }
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "policy"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 16,
                  "minItems": 1,
                  "type": "array",
                  "x-kubernetes-validations": [
                    {
                      "message": "conditional entries without condition must be last",
                      "rule": "self.filter(e, !has(e.condition)).size() <= 1 && (!self.exists(e, !has(e.condition)) || !has(self[size(self) - 1].condition))"
                    }
                  ]
                },
                "global": {
                  "description": "Global rate limiting policy using an external service.",
                  "properties": {
                    "backendRef": {
                      "description": "`backendRef` selects a backend for this policy.\nMutually exclusive with `url`.",
                      "properties": {
                        "group": {
                          "default": "",
                          "description": "Group of the referent, for example `gateway.networking.k8s.io`. Empty selects the core API group",
                          "maxLength": 253,
                          "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                          "type": "string"
                        },
                        "kind": {
                          "default": "Service",
                          "description": "Kubernetes resource kind of the referent, for example `Service`. Defaults to `Service`",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name is the name of the referent.",
                          "maxLength": 253,
                          "minLength": 1,
                          "type": "string"
                        },
                        "namespace": {
                          "description": "Namespace of the referent. Defaults to the local namespace. A cross-namespace reference requires a ReferenceGrant in the referent namespace",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                          "type": "string"
                        },
                        "port": {
                          "description": "Destination port number. Required when the referent is a Kubernetes `Service`",
                          "format": "int32",
                          "maximum": 65535,
                          "minimum": 1,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "Must have port for Service reference",
                          "rule": "(size(self.group) == 0 && self.kind == 'Service') ? has(self.port) : true"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "descriptors": {
                      "description": "Dimensions for rate limiting. These values are\npassed to the rate limit service which applies configured limits based\non them. Each descriptor represents a single rate limit rule with one or\nmore entries.",
                      "items": {
                        "properties": {
                          "cost": {
                            "description": "Common Expression Language (`CEL`) expression that determines\nthe cost of the request for this descriptor. If unset, `Requests` costs\ndefault to 1, and `Tokens` costs default to the total token count.\n\n`Tokens` cost are evaluated after the request has completed. For non-streaming requests, `request`, `llm`, and\n`response` fields are all available; for streaming requests, `response` is not available (however, all LLM\nattributes are in `llm`). For `Requests`, cost is computed during the request phase.\n\nSee https://agentgateway.dev/docs/standalone/latest/reference/cel/ for more info.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          },
                          "entries": {
                            "description": "Individual components that make up this descriptor.",
                            "items": {
                              "description": "Entry in a rate limit descriptor.",
                              "properties": {
                                "expression": {
                                  "description": "Common Expression Language (`CEL`) expression that\ndefines the value for the descriptor.\n\nFor example, to rate limit based on the Client IP: `source.address`.\n\nSee https://agentgateway.dev/docs/standalone/latest/reference/cel/ for more info.",
                                  "maxLength": 16384,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "name": {
                                  "description": "Name of the descriptor.",
                                  "maxLength": 64,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "expression",
                                "name"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            },
                            "maxItems": 16,
                            "minItems": 1,
                            "type": "array"
                          },
                          "limitOverride": {
                            "description": "Common Expression Language (`CEL`) expression that returns a dynamic\nlimit override for this descriptor. The expression must evaluate to an\nobject containing `unit` and `requestsPerUnit`, for example\n`{\"unit\":\"minute\",\"requestsPerUnit\":5}`.\n\nSee https://agentgateway.dev/docs/standalone/latest/reference/cel/ for more info.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          },
                          "unit": {
                            "description": "Cost unit. If unspecified,\n`Requests` is used.",
                            "enum": [
                              "Requests",
                              "Tokens"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "entries"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array"
                    },
                    "domain": {
                      "description": "Domain under which this limit should apply.\nThis is an arbitrary string that enables a rate limit server to distinguish between different applications.",
                      "maxLength": 256,
                      "minLength": 1,
                      "type": "string"
                    },
                    "failureMode": {
                      "description": "Behavior when the remote rate limit service is\nunavailable or returns an error. `FailOpen` allows the request to continue.\n`FailClosed` (default) denies the request.",
                      "enum": [
                        "FailClosed",
                        "FailOpen"
                      ],
                      "type": "string"
                    },
                    "url": {
                      "description": "`url` directly specifies the HTTP(S) endpoint for this policy.\nWhen the scheme is `https`, backend TLS is enabled automatically.\nMutually exclusive with `backendRef`.\nURLs are opaque; referencing a Kubernetes service hostname like `hello.ns.svc.cluster.local`\nwill not apply Service policies or load balancing.",
                      "maxLength": 1024,
                      "minLength": 1,
                      "pattern": "^https?://[^/?#@]+(/[^?#]*)?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "descriptors",
                    "domain"
                  ],
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "url must not include a path",
                      "rule": "!has(self.url) || self.url.matches('^https?://[^/?#]+$')"
                    },
                    {
                      "message": "exactly one of the fields in [backendRef url] must be set",
                      "rule": "(has(self.backendRef)?1:0)+(has(self.url)?1:0) == 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "local": {
                  "description": "Local rate limiting policy.",
                  "items": {
                    "description": "Local rate limiting policy. Local rate limits are handled on a per-proxy basis, without coordination\nbetween instances of the proxy.",
                    "properties": {
                      "burst": {
                        "description": "Allowance of requests above the request-per-unit\nthat should be allowed within a short period of time.",
                        "format": "int32",
                        "minimum": 0,
                        "type": "integer"
                      },
                      "key": {
                        "description": "CEL expression selecting the bucket the request counts against, for example `jwt.sub` for a\nper-user limit or `jwt.team` for a per-team limit. Each distinct value gets its own bucket with\nthe limit above. Requests without a value, or whose expression cannot be evaluated, share one\nbucket. When unset, all requests share one bucket. Each proxy instance keeps a bounded number\nof buckets per rule and drops the least used ones.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "requests": {
                        "description": "Number of HTTP requests per unit of time that\nare allowed. Requests exceeding this limit will fail with a `429`\nerror.",
                        "format": "int32",
                        "minimum": 1,
                        "type": "integer"
                      },
                      "tokens": {
                        "description": "Number of LLM tokens per unit of time that are\nallowed. Requests exceeding this limit will fail with a `429` error.\n\nBoth input and output tokens are counted. However, token counts are not known until the request completes. As a\nresult, token-based rate limits will apply to future requests only.",
                        "format": "int32",
                        "minimum": 1,
                        "type": "integer"
                      },
                      "unit": {
                        "description": "Unit of time for the limit.",
                        "enum": [
                          "Hours",
                          "Minutes",
                          "Seconds"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "unit"
                    ],
                    "type": "object",
                    "x-kubernetes-validations": [
                      {
                        "message": "exactly one of the fields in [requests tokens] must be set",
                        "rule": "(has(self.requests)?1:0)+(has(self.tokens)?1:0) == 1"
                      }
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 16,
                  "minItems": 1,
                  "type": "array"
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "at least one of the fields in [conditional global local] must be set",
                  "rule": "[has(self.conditional),has(self.global),has(self.local)].filter(x,x==true).size() >= 1"
                },
                {
                  "message": "conditional cannot be set with any other field",
                  "rule": "has(self.conditional) ? [has(self.global),has(self.local)].filter(x,x==true).size() == 0 : true"
                }
              ],
              "additionalProperties": false
            },
            "retry": {
              "description": "Retry policy.",
              "properties": {
                "attempts": {
                  "description": "Attempts specifies the maximum number of times an individual request\nfrom the gateway to a backend should be retried.\n\nIf the maximum number of retries has been attempted without a successful\nresponse from the backend, the Gateway MUST return an error.\n\nWhen this field is unspecified, the number of times to attempt to retry\na backend request is implementation-specific.\n\nSupport: Extended",
                  "minimum": 1,
                  "type": "integer"
                },
                "backoff": {
                  "description": "Minimum duration to wait between retry attempts, in Gateway API Duration format. Implementations may add jitter or use exponential backoff, and must not exceed a configured request timeout. Support: Extended",
                  "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                  "type": "string"
                },
                "codes": {
                  "description": "Codes defines the HTTP response status codes for which a backend request\nshould be retried.\n\nSupport: Extended",
                  "items": {
                    "description": "HTTPRouteRetryStatusCode defines an HTTP response status code for\nwhich a backend request should be retried.\n\nImplementations MUST support the following status codes as retriable:\n\n* 500\n* 502\n* 503\n* 504\n\nImplementations MAY support specifying additional discrete values in the\n500-599 range.\n\nImplementations MAY support specifying discrete values in the 400-499 range,\nwhich are often inadvisable to retry.\n\n<gateway:experimental>",
                    "maximum": 599,
                    "minimum": 400,
                    "type": "integer"
                  },
                  "type": "array",
                  "x-kubernetes-list-type": "set"
                },
                "condition": {
                  "description": "`condition` is a CEL expression evaluated against each response to decide\nwhether to retry. A response is retried when its status code is in `codes` or\nthis expression evaluates to `true`.",
                  "maxLength": 16384,
                  "minLength": 1,
                  "type": "string"
                },
                "precondition": {
                  "description": "`precondition` is a CEL expression evaluated against the request before any\nattempt is made. When it evaluates to `false`, retries are disabled and only\nthe initial attempt is made, for example `request.method == \"GET\"`.\nRetrying requires buffering the request body in memory for replay, so this lets\nus skip that cost when the request is known to be non-retriable (for example\nstreaming uploads or long-lived connections like websockets).",
                  "maxLength": 16384,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "timeouts": {
              "description": "Request timeouts.\nIt is applicable to `HTTPRoute` resources and ignored for other targeted\nkinds.",
              "properties": {
                "request": {
                  "description": "Maximum time allowed from the start of downstream request processing until response headers\nare received. The response body is not included; use `responseIdle` to bound gaps between body frames.",
                  "maxLength": 32,
                  "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                  "type": "string",
                  "x-kubernetes-validations": [
                    {
                      "message": "request must be at least 1ms",
                      "rule": "duration(self) >= duration('1ms')"
                    }
                  ]
                },
                "responseIdle": {
                  "description": "Maximum time to wait for a frame from the upstream response body.\n\nLimits how long the gateway waits for more response data from the backend.\nTime spent processing the response or waiting for the client to receive it does not count.\n\nThis complements Request rather than overlapping it: Request stops applying once the response\nheaders arrive, so it places no bound on how long the response body may take, and it cannot\ndistinguish a stalled stream from a slow one.\n\nThis does not apply to responses that switch protocols, so upgraded WebSocket connections and\nCONNECT tunnels are never terminated by it.",
                  "maxLength": 32,
                  "pattern": "^([0-9]{1,5}(h|m|s|ms)){1,4}$",
                  "type": "string",
                  "x-kubernetes-validations": [
                    {
                      "message": "responseIdle must be at least 1ms",
                      "rule": "duration(self) >= duration('1ms')"
                    }
                  ]
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "at least one of the fields in [request responseIdle] must be set",
                  "rule": "[has(self.request),has(self.responseIdle)].filter(x,x==true).size() >= 1"
                }
              ],
              "additionalProperties": false
            },
            "transformation": {
              "description": "Mutates and transforms requests and responses\nbefore forwarding them to the destination.",
              "properties": {
                "conditional": {
                  "description": "Conditional policy execution. Set this or the top-level transformation fields.\nThe first matching policy will be executed.\nA single policy may be provided without a condition set; if so, it must be the last policy and will be the fallback\nin case no conditions are met.",
                  "items": {
                    "properties": {
                      "condition": {
                        "description": "CEL expression that must evaluate to true for this policy to execute.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "policy": {
                        "description": "Policy to apply when the condition matches.",
                        "properties": {
                          "request": {
                            "description": "Request transformation settings.",
                            "properties": {
                              "add": {
                                "description": "Headers to add to the request and what each value\nshould be set to. If there is already a header with these values then\nappend the value as an extra entry.",
                                "items": {
                                  "properties": {
                                    "name": {
                                      "description": "The name of the header to add.",
                                      "maxLength": 256,
                                      "minLength": 1,
                                      "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                      "type": "string",
                                      "x-kubernetes-validations": [
                                        {
                                          "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                          "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                                        }
                                      ]
                                    },
                                    "value": {
                                      "description": "CEL expression that generates the output value for\nthe header.",
                                      "maxLength": 16384,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "value"
                                  ],
                                  "type": "object",
                                  "additionalProperties": false
                                },
                                "maxItems": 16,
                                "minItems": 1,
                                "type": "array",
                                "x-kubernetes-list-map-keys": [
                                  "name"
                                ],
                                "x-kubernetes-list-type": "map"
                              },
                              "body": {
                                "description": "HTTP body transformation.",
                                "maxLength": 16384,
                                "minLength": 1,
                                "type": "string"
                              },
                              "metadata": {
                                "additionalProperties": {
                                  "description": "A Common Expression Language (CEL) expression.",
                                  "maxLength": 16384,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "description": "Stores CEL-evaluated values under the `metadata` CEL variable\nfor subsequent policy evaluations. `metadata` is evaluated before header\nor body transformations.",
                                "maxProperties": 16,
                                "minProperties": 1,
                                "type": "object"
                              },
                              "remove": {
                                "description": "Header names to remove from the request or\nresponse.",
                                "items": {
                                  "description": "HTTP header name.",
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                  "type": "string",
                                  "x-kubernetes-validations": [
                                    {
                                      "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                      "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                                    }
                                  ]
                                },
                                "maxItems": 16,
                                "minItems": 1,
                                "type": "array",
                                "x-kubernetes-list-type": "set"
                              },
                              "set": {
                                "description": "Headers to set and the values to use.",
                                "items": {
                                  "properties": {
                                    "name": {
                                      "description": "The name of the header to add.",
                                      "maxLength": 256,
                                      "minLength": 1,
                                      "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                      "type": "string",
                                      "x-kubernetes-validations": [
                                        {
                                          "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                          "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                                        }
                                      ]
                                    },
                                    "value": {
                                      "description": "CEL expression that generates the output value for\nthe header.",
                                      "maxLength": 16384,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "value"
                                  ],
                                  "type": "object",
                                  "additionalProperties": false
                                },
                                "maxItems": 16,
                                "minItems": 1,
                                "type": "array",
                                "x-kubernetes-list-map-keys": [
                                  "name"
                                ],
                                "x-kubernetes-list-type": "map"
                              }
                            },
                            "type": "object",
                            "x-kubernetes-validations": [
                              {
                                "message": "at least one of the fields in [add body metadata remove set] must be set",
                                "rule": "[has(self.add),has(self.body),has(self.metadata),has(self.remove),has(self.set)].filter(x,x==true).size() >= 1"
                              }
                            ],
                            "additionalProperties": false
                          },
                          "response": {
                            "description": "Response transformation settings.",
                            "properties": {
                              "add": {
                                "description": "Headers to add to the request and what each value\nshould be set to. If there is already a header with these values then\nappend the value as an extra entry.",
                                "items": {
                                  "properties": {
                                    "name": {
                                      "description": "The name of the header to add.",
                                      "maxLength": 256,
                                      "minLength": 1,
                                      "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                      "type": "string",
                                      "x-kubernetes-validations": [
                                        {
                                          "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                          "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                                        }
                                      ]
                                    },
                                    "value": {
                                      "description": "CEL expression that generates the output value for\nthe header.",
                                      "maxLength": 16384,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "value"
                                  ],
                                  "type": "object",
                                  "additionalProperties": false
                                },
                                "maxItems": 16,
                                "minItems": 1,
                                "type": "array",
                                "x-kubernetes-list-map-keys": [
                                  "name"
                                ],
                                "x-kubernetes-list-type": "map"
                              },
                              "body": {
                                "description": "HTTP body transformation.",
                                "maxLength": 16384,
                                "minLength": 1,
                                "type": "string"
                              },
                              "metadata": {
                                "additionalProperties": {
                                  "description": "A Common Expression Language (CEL) expression.",
                                  "maxLength": 16384,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "description": "Stores CEL-evaluated values under the `metadata` CEL variable\nfor subsequent policy evaluations. `metadata` is evaluated before header\nor body transformations.",
                                "maxProperties": 16,
                                "minProperties": 1,
                                "type": "object"
                              },
                              "remove": {
                                "description": "Header names to remove from the request or\nresponse.",
                                "items": {
                                  "description": "HTTP header name.",
                                  "maxLength": 256,
                                  "minLength": 1,
                                  "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                  "type": "string",
                                  "x-kubernetes-validations": [
                                    {
                                      "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                      "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                                    }
                                  ]
                                },
                                "maxItems": 16,
                                "minItems": 1,
                                "type": "array",
                                "x-kubernetes-list-type": "set"
                              },
                              "set": {
                                "description": "Headers to set and the values to use.",
                                "items": {
                                  "properties": {
                                    "name": {
                                      "description": "The name of the header to add.",
                                      "maxLength": 256,
                                      "minLength": 1,
                                      "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                                      "type": "string",
                                      "x-kubernetes-validations": [
                                        {
                                          "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                          "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                                        }
                                      ]
                                    },
                                    "value": {
                                      "description": "CEL expression that generates the output value for\nthe header.",
                                      "maxLength": 16384,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "value"
                                  ],
                                  "type": "object",
                                  "additionalProperties": false
                                },
                                "maxItems": 16,
                                "minItems": 1,
                                "type": "array",
                                "x-kubernetes-list-map-keys": [
                                  "name"
                                ],
                                "x-kubernetes-list-type": "map"
                              }
                            },
                            "type": "object",
                            "x-kubernetes-validations": [
                              {
                                "message": "at least one of the fields in [add body metadata remove set] must be set",
                                "rule": "[has(self.add),has(self.body),has(self.metadata),has(self.remove),has(self.set)].filter(x,x==true).size() >= 1"
                              }
                            ],
                            "additionalProperties": false
                          }
                        },
                        "type": "object",
                        "x-kubernetes-validations": [
                          {
                            "message": "at least one of the fields in [request response] must be set",
                            "rule": "[has(self.request),has(self.response)].filter(x,x==true).size() >= 1"
                          }
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "policy"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 16,
                  "minItems": 1,
                  "type": "array",
                  "x-kubernetes-validations": [
                    {
                      "message": "conditional entries without condition must be last",
                      "rule": "self.filter(e, !has(e.condition)).size() <= 1 && (!self.exists(e, !has(e.condition)) || !has(self[size(self) - 1].condition))"
                    }
                  ]
                },
                "request": {
                  "description": "Request transformation settings.",
                  "properties": {
                    "add": {
                      "description": "Headers to add to the request and what each value\nshould be set to. If there is already a header with these values then\nappend the value as an extra entry.",
                      "items": {
                        "properties": {
                          "name": {
                            "description": "The name of the header to add.",
                            "maxLength": 256,
                            "minLength": 1,
                            "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                            "type": "string",
                            "x-kubernetes-validations": [
                              {
                                "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                              }
                            ]
                          },
                          "value": {
                            "description": "CEL expression that generates the output value for\nthe header.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    },
                    "body": {
                      "description": "HTTP body transformation.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "metadata": {
                      "additionalProperties": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "description": "Stores CEL-evaluated values under the `metadata` CEL variable\nfor subsequent policy evaluations. `metadata` is evaluated before header\nor body transformations.",
                      "maxProperties": 16,
                      "minProperties": 1,
                      "type": "object"
                    },
                    "remove": {
                      "description": "Header names to remove from the request or\nresponse.",
                      "items": {
                        "description": "HTTP header name.",
                        "maxLength": 256,
                        "minLength": 1,
                        "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                        "type": "string",
                        "x-kubernetes-validations": [
                          {
                            "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                            "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                          }
                        ]
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-type": "set"
                    },
                    "set": {
                      "description": "Headers to set and the values to use.",
                      "items": {
                        "properties": {
                          "name": {
                            "description": "The name of the header to add.",
                            "maxLength": 256,
                            "minLength": 1,
                            "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                            "type": "string",
                            "x-kubernetes-validations": [
                              {
                                "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                              }
                            ]
                          },
                          "value": {
                            "description": "CEL expression that generates the output value for\nthe header.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "at least one of the fields in [add body metadata remove set] must be set",
                      "rule": "[has(self.add),has(self.body),has(self.metadata),has(self.remove),has(self.set)].filter(x,x==true).size() >= 1"
                    }
                  ],
                  "additionalProperties": false
                },
                "response": {
                  "description": "Response transformation settings.",
                  "properties": {
                    "add": {
                      "description": "Headers to add to the request and what each value\nshould be set to. If there is already a header with these values then\nappend the value as an extra entry.",
                      "items": {
                        "properties": {
                          "name": {
                            "description": "The name of the header to add.",
                            "maxLength": 256,
                            "minLength": 1,
                            "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                            "type": "string",
                            "x-kubernetes-validations": [
                              {
                                "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                              }
                            ]
                          },
                          "value": {
                            "description": "CEL expression that generates the output value for\nthe header.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    },
                    "body": {
                      "description": "HTTP body transformation.",
                      "maxLength": 16384,
                      "minLength": 1,
                      "type": "string"
                    },
                    "metadata": {
                      "additionalProperties": {
                        "description": "A Common Expression Language (CEL) expression.",
                        "maxLength": 16384,
                        "minLength": 1,
                        "type": "string"
                      },
                      "description": "Stores CEL-evaluated values under the `metadata` CEL variable\nfor subsequent policy evaluations. `metadata` is evaluated before header\nor body transformations.",
                      "maxProperties": 16,
                      "minProperties": 1,
                      "type": "object"
                    },
                    "remove": {
                      "description": "Header names to remove from the request or\nresponse.",
                      "items": {
                        "description": "HTTP header name.",
                        "maxLength": 256,
                        "minLength": 1,
                        "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                        "type": "string",
                        "x-kubernetes-validations": [
                          {
                            "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                            "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                          }
                        ]
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-type": "set"
                    },
                    "set": {
                      "description": "Headers to set and the values to use.",
                      "items": {
                        "properties": {
                          "name": {
                            "description": "The name of the header to add.",
                            "maxLength": 256,
                            "minLength": 1,
                            "pattern": "^:?[A-Za-z0-9!#$%&'*+\\-.^_\\x60|~]+$",
                            "type": "string",
                            "x-kubernetes-validations": [
                              {
                                "message": "pseudo-headers must be one of :authority, :method, :path, :scheme, or :status",
                                "rule": "!self.startsWith(':') || self in [':authority', ':method', ':path', ':scheme', ':status']"
                              }
                            ]
                          },
                          "value": {
                            "description": "CEL expression that generates the output value for\nthe header.",
                            "maxLength": 16384,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "maxItems": 16,
                      "minItems": 1,
                      "type": "array",
                      "x-kubernetes-list-map-keys": [
                        "name"
                      ],
                      "x-kubernetes-list-type": "map"
                    }
                  },
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "at least one of the fields in [add body metadata remove set] must be set",
                      "rule": "[has(self.add),has(self.body),has(self.metadata),has(self.remove),has(self.set)].filter(x,x==true).size() >= 1"
                    }
                  ],
                  "additionalProperties": false
                }
              },
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "at least one of the fields in [conditional request response] must be set",
                  "rule": "[has(self.conditional),has(self.request),has(self.response)].filter(x,x==true).size() >= 1"
                },
                {
                  "message": "conditional cannot be set with any other field",
                  "rule": "has(self.conditional) ? [has(self.request),has(self.response)].filter(x,x==true).size() == 0 : true"
                }
              ],
              "additionalProperties": false
            }
          },
          "type": "object",
          "x-kubernetes-validations": [
            {
              "message": "phase PreRouting only supports extAuth, authorization, transformation, extProc, jwtAuthentication, basicAuthentication, apiKeyAuthentication and cors",
              "rule": "has(self.phase) && self.phase == 'PreRouting' ? [has(self.buffer),has(self.csrf),has(self.delay),has(self.directResponse),has(self.headerModifiers),has(self.hostRewrite),has(self.rateLimit),has(self.retry),has(self.timeouts)].filter(x,x==true).size() == 0 : true"
            }
          ],
          "additionalProperties": false
        }
      },
      "type": "object",
      "x-kubernetes-validations": [
        {
          "message": "At least one of traffic, frontend, or backend must be provided.",
          "rule": "has(self.traffic) || has(self.frontend) || has(self.backend)"
        },
        {
          "message": "strategy.inheritance may only be set on traffic policies",
          "rule": "!has(self.strategy) || !has(self.strategy.inheritance) || (has(self.traffic) && !has(self.frontend) && !has(self.backend))"
        },
        {
          "message": "backend.mcp may not be used with a Service target",
          "rule": "!has(self.backend) || !has(self.backend.mcp) || ((!has(self.targetRefs) || !self.targetRefs.exists(t, t.kind == 'Service')) && (!has(self.targetSelectors) || !self.targetSelectors.exists(t, t.kind == 'Service')))"
        },
        {
          "message": "backend.mcp may not target an AgentgatewayBackend sectionName",
          "rule": "!has(self.backend) || !has(self.backend.mcp) || ((!has(self.targetRefs) || !self.targetRefs.exists(t, t.kind == 'AgentgatewayBackend' && has(t.sectionName))) && (!has(self.targetSelectors) || !self.targetSelectors.exists(t, t.kind == 'AgentgatewayBackend' && has(t.sectionName))))"
        },
        {
          "message": "backend.ai may not be used with a Service target",
          "rule": "!has(self.backend) || !has(self.backend.ai) || ((!has(self.targetRefs) || !self.targetRefs.exists(t, t.kind == 'Service')) && (!has(self.targetSelectors) || !self.targetSelectors.exists(t, t.kind == 'Service')))"
        },
        {
          "message": "backend.sessionAffinity must target the whole AgentgatewayBackend, not an individual AI provider",
          "rule": "!has(self.backend) || !has(self.backend.sessionAffinity) || ((!has(self.targetRefs) || !self.targetRefs.exists(t, t.kind == 'AgentgatewayBackend' && has(t.sectionName))) && (!has(self.targetSelectors) || !self.targetSelectors.exists(t, t.kind == 'AgentgatewayBackend' && has(t.sectionName))))"
        },
        {
          "message": "traffic.jwtAuthentication may not be used with backend.mcp.authentication in the same policy",
          "rule": "!(has(self.traffic) && has(self.traffic.jwtAuthentication) && has(self.backend) && has(self.backend.mcp) && has(self.backend.mcp.authentication))"
        },
        {
          "message": "the 'frontend' field can only target a Gateway",
          "rule": "has(self.frontend) && has(self.targetRefs) ? self.targetRefs.all(t, t.kind == 'Gateway') : true"
        },
        {
          "message": "the 'frontend' field can only target a Gateway",
          "rule": "has(self.frontend) && has(self.targetSelectors) ? self.targetSelectors.all(t, t.kind == 'Gateway') : true"
        },
        {
          "message": "frontend tcp, networkAuthorization, tls, http, proxyProtocol, and connect policies may only target a Gateway or port, not a listener (sectionName)",
          "rule": "has(self.frontend) && (has(self.frontend.tcp) || has(self.frontend.networkAuthorization) || has(self.frontend.tls) || has(self.frontend.http) || has(self.frontend.proxyProtocol) || has(self.frontend.connect)) && has(self.targetRefs) ? self.targetRefs.all(t, !has(t.sectionName)) : true"
        },
        {
          "message": "frontend tcp, networkAuthorization, tls, http, proxyProtocol, and connect policies may only target a Gateway or port, not a listener (sectionName)",
          "rule": "has(self.frontend) && (has(self.frontend.tcp) || has(self.frontend.networkAuthorization) || has(self.frontend.tls) || has(self.frontend.http) || has(self.frontend.proxyProtocol) || has(self.frontend.connect)) && has(self.targetSelectors) ? self.targetSelectors.all(t, !has(t.sectionName)) : true"
        },
        {
          "message": "port may only be set on frontend-only policies (not traffic or backend)",
          "rule": "has(self.targetRefs) && self.targetRefs.exists(t, has(t.port)) ? (has(self.frontend) && !has(self.traffic) && !has(self.backend)) : true"
        },
        {
          "message": "port may only be set on frontend-only policies (not traffic or backend)",
          "rule": "has(self.targetSelectors) && self.targetSelectors.exists(t, has(t.port)) ? (has(self.frontend) && !has(self.traffic) && !has(self.backend)) : true"
        },
        {
          "message": "the 'traffic' field can only target a Gateway, ListenerSet, GRPCRoute, HTTPRoute, or InferencePool",
          "rule": "has(self.traffic) && has(self.targetRefs) ? self.targetRefs.all(t, t.kind in ['Gateway', 'HTTPRoute', 'GRPCRoute', 'ListenerSet', 'InferencePool']) : true"
        },
        {
          "message": "the 'traffic' field can only target a Gateway, ListenerSet, GRPCRoute, HTTPRoute, or InferencePool",
          "rule": "has(self.traffic) && has(self.targetSelectors) ? self.targetSelectors.all(t, t.kind in ['Gateway', 'HTTPRoute', 'GRPCRoute', 'ListenerSet', 'InferencePool']) : true"
        },
        {
          "message": "the 'traffic.phase=PreRouting' field can only target a Gateway or ListenerSet",
          "rule": "has(self.targetRefs) && has(self.traffic) && has(self.traffic.phase) && self.traffic.phase == 'PreRouting' ? self.targetRefs.all(t, t.kind in ['Gateway', 'ListenerSet']) : true"
        },
        {
          "message": "the 'traffic.phase=PreRouting' field can only target a Gateway or ListenerSet",
          "rule": "has(self.targetSelectors) && has(self.traffic) && has(self.traffic.phase) && self.traffic.phase == 'PreRouting' ? self.targetSelectors.all(t, t.kind in ['Gateway', 'ListenerSet']) : true"
        },
        {
          "message": "Service sectionName must be a numeric port from 1 to 65535",
          "rule": "!has(self.targetRefs) || self.targetRefs.all(t, t.kind != 'Service' || !has(t.sectionName) || (int(t.sectionName) >= 1 && int(t.sectionName) <= 65535))"
        },
        {
          "message": "Service sectionName must be a numeric port from 1 to 65535",
          "rule": "!has(self.targetSelectors) || self.targetSelectors.all(t, t.kind != 'Service' || !has(t.sectionName) || (int(t.sectionName) >= 1 && int(t.sectionName) <= 65535))"
        },
        {
          "message": "exactly one of the fields in [targetRefs targetSelectors] must be set",
          "rule": "(has(self.targetRefs)?1:0)+(has(self.targetSelectors)?1:0) == 1"
        }
      ],
      "additionalProperties": false
    },
    "status": {
      "description": "Current policy status.",
      "properties": {
        "ancestors": {
          "description": "Ancestor resources (usually Gateways) associated with the policy, with the policy's status for each. At most 16 entries; an empty list means the policy is not relevant to any ancestor",
          "items": {
            "description": "Status of a policy with respect to an associated ancestor resource, usually a Gateway",
            "properties": {
              "ancestorRef": {
                "description": "AncestorRef corresponds with a ParentRef in the spec that this\nPolicyAncestorStatus struct describes the status of.",
                "properties": {
                  "group": {
                    "default": "gateway.networking.k8s.io",
                    "description": "Group is the group of the referent.\nWhen unspecified, \"gateway.networking.k8s.io\" is inferred.\nTo set the core API group (such as for a \"Service\" kind referent),\nGroup must be explicitly set to \"\" (empty string).\n\nSupport: Core",
                    "maxLength": 253,
                    "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                    "type": "string"
                  },
                  "kind": {
                    "default": "Gateway",
                    "description": "Kind is kind of the referent.\n\nThere are two kinds of parent resources with \"Core\" support:\n\n* Gateway (Gateway conformance profile)\n* Service (Mesh conformance profile, ClusterIP Services only)\n\nSupport for other resources is Implementation-Specific.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                    "type": "string"
                  },
                  "name": {
                    "description": "Name is the name of the referent.\n\nSupport: Core",
                    "maxLength": 253,
                    "minLength": 1,
                    "type": "string"
                  },
                  "namespace": {
                    "description": "Namespace of the referent. Defaults to the Route's local namespace. Cross-namespace references must be explicitly allowed, for example via ReferenceGrant. Support: Core",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                    "type": "string"
                  },
                  "port": {
                    "description": "Port this Route targets on the parent, interpreted per parent kind (for example a Gateway listener port or Service port). Support: Extended",
                    "format": "int32",
                    "maximum": 65535,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "sectionName": {
                    "description": "Name of a section within the target resource, for example a Gateway Listener name or Service port name. Empty references the entire resource. Support: Core",
                    "maxLength": 253,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "conditions": {
                "description": "Conditions describing the status of the policy for this ancestor",
                "items": {
                  "description": "Condition contains details for one aspect of the current state of this API Resource.",
                  "properties": {
                    "lastTransitionTime": {
                      "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                      "format": "date-time",
                      "type": "string"
                    },
                    "message": {
                      "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                      "maxLength": 32768,
                      "type": "string"
                    },
                    "observedGeneration": {
                      "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                      "format": "int64",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "reason": {
                      "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                      "maxLength": 1024,
                      "minLength": 1,
                      "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                      "type": "string"
                    },
                    "status": {
                      "description": "status of the condition, one of True, False, Unknown.",
                      "enum": [
                        "True",
                        "False",
                        "Unknown"
                      ],
                      "type": "string"
                    },
                    "type": {
                      "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                      "maxLength": 316,
                      "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "lastTransitionTime",
                    "message",
                    "reason",
                    "status",
                    "type"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "maxItems": 8,
                "minItems": 1,
                "type": "array",
                "x-kubernetes-list-map-keys": [
                  "type"
                ],
                "x-kubernetes-list-type": "map"
              },
              "controllerName": {
                "description": "ControllerName is a domain/path string that indicates the name of the\ncontroller that wrote this status. This corresponds with the\ncontrollerName field on GatewayClass.\n\nExample: \"example.net/gateway-controller\".\n\nThe format of this field is DOMAIN \"/\" PATH, where DOMAIN and PATH are\nvalid Kubernetes names\n(https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).\n\nControllers MUST populate this field when writing status. Controllers should ensure that\nentries to status populated with their ControllerName are cleaned up when they are no\nlonger necessary.",
                "maxLength": 253,
                "minLength": 1,
                "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9\\/\\-._~%!$&'()*+,;=:]+$",
                "type": "string"
              }
            },
            "required": [
              "ancestorRef",
              "conditions",
              "controllerName"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "maxItems": 16,
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        }
      },
      "required": [
        "ancestors"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
