Required mTLS route admits a resumed session whose client cert has since expired
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- networking, security
Research direction
Start at the handling of HandshakeKind::Resumed in symphony's TLS accept path, and read how the PROXY v2 re-verification already re-checks a resumed chain at the current time. The rustls resumption code in src/server/tls13.rs and src/server/tls12.rs (rustls 0.23.45) explains why the client verifier is skipped. Done means that on routes with mtls.requireClientCert: true, a resumed connection whose restored chain fails verification against the route's CA roots is closed, with a test for an expired cert resumed on a non-PROXY route.
Written by the indexing model from the issue text.
Description
Summary
On a route with mtls.requireClientCert: true, a client whose certificate expires after its TLS session was issued can keep connecting by resuming that session. The handshake's certificate check does not run on resumption.
Mechanism
- Resumption skips the verifier. rustls restores the client chain stored with the session and never calls
ClientCertVerifier::verify_client_certagain (rustls 0.23.45src/server/tls13.rs~line 374,src/server/tls12.rs~line 289). - Window. The session lasts as long as the ticket (rustls ring
Ticketer, about 6h) for TLS 1.3. For TLS 1.2 it also lasts while the session stays in the per-config session cache (ServerSessionMemoryCache, 1024 entries). After that the client must do a full handshake, and the expired cert is rejected. - A policy change never resumes across. Each route's
ServerConfigowns its ticketer and session store. The TLS config cache key includes the CA bundle bytes andrequireClientCert, so changing either builds a new config whose tickets the old sessions can't use. - PROXY v2 routes are already covered for authorization. On
sourceAddressHeader: 'proxyProtocolV2', symphony re-verifies a resumed chain at the current time before reporting it. An expired chain is reported as presented but unverified (verify=1, no0xE2chain TLVs), so Harper's PROXY reader treats the client as unauthorized. - Exposed case: required routes with no PROXY v2. No identity reaches the upstream, and symphony's rejection was the only enforcement. Those routes admit the resumed connection.
This is the same default behaviour as OpenSSL and nginx. Symphony has no revocation (CRL/OCSP) support, so expiry is the only thing this window can miss.
Proposed fix
After a resumed handshake (HandshakeKind::Resumed) on a required route, re-verify the restored chain against the route's CA roots at the current time, on every route whatever its sourceAddressHeader. Close the connection if verification fails. This costs one chain verification per resumed connection on required routes. Full handshakes are unchanged, since rustls already verified them.
Related
- HarperFast/symphony#62 and HarperFast/symphony#63 (the PR closing them adds the PROXY v2 re-verification described above)
🤖 Generated by Claude Opus 5.5 via Claude Code; posted via @kriszyp.
Review-Deferral: 71a692d3fc7de781 severity=minor category=security
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HarperFast/symphony
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/symphony#91 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
HarperFast/symphony#89 ·
Maintainers usually reply within 1 day
-
Mixed-case SNI forwarded to an older peer during a rolling upgrade can reach its wildcard routeOpen
Difficulty 4/5 3-5 days Newbie friendliness 49/100
HarperFast/symphony#93 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
HarperFast/symphony#92 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
HarperFast/symphony#90 ·
Maintainers usually reply within 1 day
All issues in HarperFast/symphony
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
feature request needs triage
Difficulty 1/5 1-3 hours Newbie friendliness 69/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
solidjs/solid-docs#1716 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
thecodacus/pithagoras#380 ·
Maintainers usually reply within 1 day