File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed
manifests/charts/ai-gateway-crds-helm/templates Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -259,11 +259,17 @@ type MCPRouteAuthorizationRule struct {
259259 //
260260 // +kubebuilder:validation:Required
261261 Target MCPAuthorizationTarget `json:"target"`
262+
263+ // Action defines whether to allow or deny requests that match this rule.
264+ //
265+ // +kubebuilder:validation:Required
266+ Action egv1a1.AuthorizationAction `json:"action"`
262267}
263268
264269type MCPAuthorizationTarget struct {
265270 // Tools defines the list of tools this rule applies to.
266271 //
272+ // +kubebuilder:validation:Required
267273 // +kubebuilder:validation:MinItems=1
268274 // +kubebuilder:validation:MaxItems=16
269275 Tools []ToolCall `json:"tools"`
@@ -280,6 +286,7 @@ type JWTSource struct {
280286 // Scopes defines the list of JWT scopes required for the rule.
281287 // If multiple scopes are specified, all scopes must be present in the JWT for the rule to match.
282288 //
289+ // +kubebuilder:validation:Required
283290 // +kubebuilder:validation:MinItems=1
284291 // +kubebuilder:validation:MaxItems=16
285292 Scopes []egv1a1.JWTScope `json:"scopes"`
Original file line number Diff line number Diff line change @@ -603,6 +603,13 @@ spec:
603603 MCPRouteAuthorizationRule defines an authorization rule for MCPRoute based on the MCP authorization spec.
604604 Reference: https://modelcontextprotocol.io/specification/draft/basic/authorization#scope-challenge-handling
605605 properties :
606+ action :
607+ description : Action defines whether to allow or deny
608+ requests that match this rule.
609+ enum :
610+ - Allow
611+ - Deny
612+ type : string
606613 source :
607614 description : Source defines the authorization source
608615 for this rule.
@@ -653,6 +660,7 @@ spec:
653660 - tools
654661 type : object
655662 required :
663+ - action
656664 - source
657665 - target
658666 type : object
Original file line number Diff line number Diff line change @@ -1684,6 +1684,11 @@ Reference: https://modelcontextprotocol.io/specification/draft/basic/authorizati
16841684 type = " [MCPAuthorizationTarget](#mcpauthorizationtarget)"
16851685 required = " true"
16861686 description = " Target defines the authorization target for this rule."
1687+ /><ApiField
1688+ name = " action"
1689+ type = " [AuthorizationAction](#authorizationaction)"
1690+ required = " true"
1691+ description = " Action defines whether to allow or deny requests that match this rule."
16871692/>
16881693
16891694
You can’t perform that action at this time.
0 commit comments