Prefer client certificate chains in the TLS extension #590
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?
We can keep the spec_version.
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.
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.
OK, thanks @Kludex
sylvesterkaczmarek
Kludex
Summary
client_cert_chainin the TLS extension.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 --checkuv run --with sphinx --with sphinx-rtd-theme sphinx-build -E -b html docs docs/_build/htmlAI Disclaimer
This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.