Skip to content

Add spaceDelimitedClaims field to RequestAuthentication API #3547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fjglira
Copy link

@fjglira fjglira commented Aug 7, 2025

Related Issues
#56873

Following a change in Istio 1.21, JWT claims other than scope and permissions are treated as exact string values. This created an issue for users with custom, space-delimited claims (for example: a roles claim with the value "editor admin"), as they could no longer match individual values like editor or admin in their Authorization Policies.

This PR introduces a new field, spaceDelimitedClaims, to the RequestAuthentication API. This field allows users to explicitly specify a list of custom claims that Istio should parse as space-delimited strings. This restores the previous, more flexible behavior for users who depend on it, without changing the new default for other claims.

API Changes

apiVersion: security.istio.io/v1beta1
kind: RequestAuthentication
spec:
  jwtRules:
  - issuer: "https://example.com"
    jwksUri: "https://example.com/.well-known/jwks.json"
    spaceDelimitedClaims:
    - "custom_scope"
    - "provider.login.scope"
    - "roles"

This change is fully backward compatible. The default behavior for the standard scope and permissions claims remains unchanged; they will always be treated as space-delimited lists, regardless of whether they are included in the new field.

@fjglira fjglira requested a review from a team as a code owner August 7, 2025 10:58
@istio-policy-bot
Copy link

😊 Welcome @fjglira! This is either your first contribution to the Istio api repo, or it's been
a while since you've been here.

You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines
by referring to Contributing to Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants