← Back to Pull requests

Docs/jwt claim extraction fixes #873

Closed
unknown closed this pull request without merging on Jul 07, 2026 18:34 UTC
View on GitHub
unknown unknown commented on Jun 25, 2026 11:54 UTC
Author

Description

This PR adds a nested claims extraction section to the claim-based-rbac guide, as suggested by @artberger

Motivation: Nested claims are supported in the codebase (see kgateway-dev/kgateway#3107), but the documentation was missing guidance on how to extract them using dot notation in claimsToHeaders and access them in CEL expressions.

What changed:

  • Added "Extract nested claims to headers" section under "Other configurations" in claim-based-rbac.md

  • Includes example JWT payload, GatewayExtension configuration, and CEL expression examples

  • Follows the existing guide's style and formatting patterns
  • Related issues:

  • Builds on #740 by @vishnukothakapu

  • Addresses Art's feedback on nested claims documentation
  • Change Type

    /kind documentation

    Changelog

    ```release-note
    docs: add nested claims extraction section to claim-based-rbac guide

    Additional Notes


    This PR adds the nested claims section to the claim-based-rbac guide. The nested claims content was originally in PR #740 but has been moved here to centralize the documentation, as suggested by @artberger

    Diff: 149 lines (+111 / -38) across 1 files Reviewer: npolshakova Review duration: 17679m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.56) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.56 · 149 lines diff across 1 files
    0.56
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.300
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.056
    Real PR Conversation Timeline
    1 comments
    "Review active on #873"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 56.1% (MEDIUM) · Higher = larger blast radius
    56.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.2% · Safe to merge
    22.2%