Skip to content

Commit 2c64a87

Browse files
authored
docs: update comments for ScopesSupported (envoyproxy#1612)
1 parent e0326cd commit 2c64a87

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

api/v1alpha1/mcp_route.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,13 @@ type ProtectedResourceMetadata struct {
262262
// +optional
263263
ResourceName *string `json:"resourceName,omitempty"`
264264

265-
// ScopesSupported is a list of OAuth 2.0 scopes that the resource server supports.
265+
// ScopesSupported defines the minimal set of scopes required for the basic functionality of the MCPRoute.
266+
// It should avoid broad or overly permissive scopes to prevent clients from requesting tokens with excessive privileges.
267+
//
268+
// If an operation requires additional scopes that are not present in the access token, the client will receive a
269+
// 403 Forbidden response that includes the required scopes in the `scope` field of the `WWW-Authenticate` header.
270+
// This enables incremental privilege elevation through targeted `WWW-Authenticate: scope="..."` challenges when
271+
// privileged operations are first attempted.
266272
//
267273
// +kubebuilder:validation:Optional
268274
// +kubebuilder:validation:MaxItems=32

manifests/charts/ai-gateway-crds-helm/templates/aigateway.envoyproxy.io_mcproutes.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4112,8 +4112,14 @@ spec:
41124112
minItems: 1
41134113
type: array
41144114
scopesSupported:
4115-
description: ScopesSupported is a list of OAuth 2.0 scopes
4116-
that the resource server supports.
4115+
description: |-
4116+
ScopesSupported defines the minimal set of scopes required for the basic functionality of the MCPRoute.
4117+
It should avoid broad or overly permissive scopes to prevent clients from requesting tokens with excessive privileges.
4118+
4119+
If an operation requires additional scopes that are not present in the access token, the client will receive a
4120+
403 Forbidden response that includes the required scopes in the `scope` field of the `WWW-Authenticate` header.
4121+
This enables incremental privilege elevation through targeted `WWW-Authenticate: scope="..."` challenges when
4122+
privileged operations are first attempted.
41174123
items:
41184124
type: string
41194125
maxItems: 32

site/docs/api/api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ References:
18111811
name="scopesSupported"
18121812
type="string array"
18131813
required="false"
1814-
description="ScopesSupported is a list of OAuth 2.0 scopes that the resource server supports."
1814+
description="ScopesSupported defines the minimal set of scopes required for the basic functionality of the MCPRoute.<br />It should avoid broad or overly permissive scopes to prevent clients from requesting tokens with excessive privileges.<br />If an operation requires additional scopes that are not present in the access token, the client will receive a<br />403 Forbidden response that includes the required scopes in the `scope` field of the `WWW-Authenticate` header.<br />This enables incremental privilege elevation through targeted `WWW-Authenticate: scope=`...`` challenges when<br />privileged operations are first attempted."
18151815
/><ApiField
18161816
name="resourceSigningAlgValuesSupported"
18171817
type="string array"

0 commit comments

Comments
 (0)