Skip to content

docs(jwt): update OAuth scope matching example - #939

Open
CodingRI wants to merge 1 commit into
kgateway-dev:mainfrom
CodingRI:docs-rbac-scope-example
Open

docs(jwt): update OAuth scope matching example#939
CodingRI wants to merge 1 commit into
kgateway-dev:mainfrom
CodingRI:docs-rbac-scope-example

Conversation

@CodingRI

Copy link
Copy Markdown

Description

Updates the claim-based RBAC documentation for OAuth scope matching to remove the unsupported CEL .split(' ') example.

The previous example recommended splitting the standard OAuth scope claim, which is commonly represented as a space-delimited string such as read write admin. However, Envoy's CEL RBAC matcher does not support .split(' '), and kgateway now rejects unsupported CEL expressions during translation before they can reach Envoy/xDS.

This change documents the supported alternative for exact scope membership matching: configure the identity provider or token minter to emit an array-shaped claim, such as scp, and use direct CEL membership matching.

The update also warns against substring checks such as contains('admin'), because they can accidentally match longer scope values such as superadmin.

Related to https://github.com/kgateway-dev/kgateway/pull/14491

Change Type

/kind documentation

Signed-off-by: CodingRI <125729609+CodingRI@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant