← Back to Pull requests

Prefer client certificate chains in the TLS extension #590

Merged
Kludex merged 1 files (104 lines) on Sep 28, 2026 12:14 UTC
View on GitHub
Kludex Kludex commented on Sep 15, 2026 11:42 UTC
Author

Summary

  • Keep only client_cert_chain in the TLS extension.

  • Remove fields that require servers to parse or translate TLS metadata.

  • Document the TLS extension version history.
  • This addresses the implementation concerns in #466. Applications can derive certificate details from the chain without requiring ASGI servers to parse X.509 certificates.

    Testing

  • git diff --check

  • uv run --with sphinx --with sphinx-rtd-theme sphinx-build -E -b html docs docs/_build/html
  • AI Disclaimer

    This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.

    Diff: 104 lines (+10 / -94) across 1 files Reviewer: sylvesterkaczmarek Review duration: 18751m
    All Vouch review confidence checks passed
    Residual risk 0.04 = Change Risk (0.59) × (1 − Review Confidence (0.92)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.59 · 104 lines diff across 1 files
    0.59
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.94 · 2 substantive comment(s)
    0.94
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    92%
    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.278
    Sensitive Paths sensitive_paths
    0.059
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    6 items
    sylvesterkaczmarek sylvesterkaczmarek commented on Sep 17, 2026 21:23 UTC
    Reviewer

    This removes fields that 0.2 made mandatory (server_cert, tls_version, and cipher_suite), but the TLS extension carried in scope has no version marker or negotiation mechanism: applications only know that scope['extensions']['tls'] exists. An existing 0.2 consumer can therefore receive a 0.3 scope and fail when those required keys disappear. Could the existing fields remain available/optional for compatibility, or could an explicit extension version be carried before removing them?

    Kludex Kludex commented on Sep 19, 2026 10:13 UTC
    Author

    We can keep the spec_version.

    sylvesterkaczmarek sylvesterkaczmarek commented on Sep 19, 2026 12:04 UTC
    Contributor

    Yes, keeping an explicit spec_version in the TLS extension payload and bumping it for 0.3 would address the compatibility concern. That gives existing 0.2 consumers a way to distinguish the new shape before relying on fields that 0.3 removes. Happy with that direction.

    sylvesterkaczmarek sylvesterkaczmarek approved these changes on Sep 20, 2026 10:59 UTC
    Approved Reviewer

    Rechecked d5b0c8d8. The TLS scope now carries spec_version="0.3", with an explicit compatibility rule that a missing marker means 0.2. That gives existing consumers a reliable way to distinguish the field set before reading keys removed in 0.3. My compatibility concern is resolved.

    carltongibson carltongibson approved these changes on Sep 28, 2026 12:13 UTC
    Approved Reviewer

    OK, thanks @Kludex

    Assignees
    Kludex Kludex
    Labels
    risk: low confidence: 92.4% 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: 59% (MEDIUM) · Higher = larger blast radius
    59%
    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: 92.4% · Lower = rushed or shallow review
    92.4%
    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: 4.5% · Safe to merge
    4.5%
    Repository