test(tls): rfc 0030 green (mTLS) — RFC0030.4 require-and-verify - #448
Conversation
The server-side mTLS enforcement already ships in TlsSettings::load (a client_ca_file builds a WebPkiClientVerifier → RequireAndVerifyClient- Cert), so this slice is the acceptance test, no production change. Four arms over a real gRPC handshake, client_ca_file set + a static bearer configured: a CA-trusted client cert plus a valid bearer is ingested; the same cert with no bearer is Unauthenticated (mTLS composes with, does not replace, bearer auth); a client with no cert and one with an untrusted-CA cert are both rejected before the handler (connect-then-export, since tonic defers the handshake to the first RPC). All certs rcgen-minted; the trusted client is its own CA root. Six of nine §5 scenarios now green (.1/.2/.4/.5/.9 + .7); .6 reload and the .3/.8 querier+served arms remain. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 34 seconds Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates the RFC 0030 TLS/mTLS integration test suite in ourios-ingester by turning RFC0030.4 (mTLS require-and-verify) from an ignored stub into a real end-to-end gRPC handshake test, validating that mTLS enforcement composes with (and does not replace) bearer authentication.
Changes:
- Implemented RFC0030.4 as a multi-arm integration test covering: trusted client cert + bearer success, trusted cert without bearer rejection, missing client cert handshake failure, and untrusted-CA client cert handshake failure.
- Added a small helper to build a static
TokenStorefor bearer auth in the test. - Updated module-level scenario status documentation to reflect RFC0030.4 now being live and only RFC0030.6 remaining ignored.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Third RFC 0030 green slice: RFC0030.4 un-ignored and passing. Six of nine §5 scenarios now green.
What
The server-side mTLS enforcement already shipped in the acceptor slice (#447):
TlsSettings::loadbuilds aWebPkiClientVerifier(⇒RequireAndVerifyClientCert) wheneverclient_ca_fileis set. So this slice is the acceptance test — no production code change.Four arms over a real gRPC handshake, with
client_ca_fileset and a static bearer configured:Unauthenticated— mTLS composes with, does not replace, bearer auth (the tenant still comes from the token).Cases 3/4 use connect-then-export because tonic defers the TLS handshake to the first RPC (a bare
connect()succeeds lazily). All certsrcgen-minted at test time; the trusted client is its own CA root written toclient_ca_file.Verification
cargo fmt --check,cargo clippy --all-targets --all-features -- -D warningsexit 0, the mTLS test passes (all four arms), and the rest of the rfc0030 suite is unaffected.Remaining
.6(cert reload) and the.3/.8querier + served-end-to-end arms. This slice unlocked nothing new — thetls-connect-infopeer_certificates()hook was already enabled in #447 and is available when a future slice wants SAN→tenant binding (RFC §7.1, deferred).🤖 Generated with Claude Code