Skip to content

feat: RequestAuthentication add presence field to JWTRule (#60823)#3737

Open
fjglira wants to merge 1 commit into
istio:masterfrom
fjglira:aut-multiple-token
Open

feat: RequestAuthentication add presence field to JWTRule (#60823)#3737
fjglira wants to merge 1 commit into
istio:masterfrom
fjglira:aut-multiple-token

Conversation

@fjglira

@fjglira fjglira commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Adds a presence field of type JWTRequirement to JWTRule in RequestAuthentication.

When presence: REQUIRED, the JWT for that rule must be present and valid. Requests without it are rejected with 401 Unauthorized, even if other JWT rules in the same policy are satisfied.

This enables workloads that must validate multiple JWT tokens from different issuers and headers (for example, an identity token in Authorization and a scope token in a custom header). Defaults to OPTIONAL.

Issue reference: istio/istio#60823

Example

apiVersion: security.istio.io/v1
kind: RequestAuthentication
metadata:
  name: multi-jwt
spec:
  selector:
    matchLabels:
      app: my-service
  jwtRules:
  - issuer: "https://idp.example.com"
    jwksUri: "https://idp.example.com/.well-known/jwks.json"
    fromHeaders:
    - name: authorization
      prefix: "Bearer "
    presence: REQUIRED
  - issuer: "https://scope.example.com"
    jwksUri: "https://scope.example.com/.well-known/jwks.json"
    fromHeaders:
    - name: x-scope-token
    presence: REQUIRED

These changes require the implementation of the new feature in the istio/istio repo. I'll create the PR as draft and once this is reviewed and merged, I'll undraft the other one

@fjglira
fjglira requested a review from a team as a code owner July 9, 2026 10:30
@istio-policy-bot

Copy link
Copy Markdown

😊 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.

@fjglira
fjglira force-pushed the aut-multiple-token branch from e120063 to 1983966 Compare July 27, 2026 11:48
@istio-testing istio-testing added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 27, 2026
@fjglira fjglira changed the title feat: RequestAuthentication add required field to JWTRule (#60823) feat: RequestAuthentication add presence field to JWTRule (#60823) Jul 27, 2026
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.

4 participants