Required mTLS route admits a resumed session whose client cert has since expired
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- networking, security
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Rust
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 19 h 12 min
- PR fusionados (30 d)
- 13
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de HarperFast/symphony
-
Don't route to a restarted upstream until it serves, not just acceptsPosiblemente ocupada @kriszyp la tomó hace 5 días. Abierto
HarperFast/symphony#84 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Forward to a peer when the local upstream connect fails on a TLS-terminating failover routePosiblemente ocupada @kriszyp la tomó hace 5 días. Abierto
HarperFast/symphony#83 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
HarperFast/symphony#80 ·
Los mantenedores suelen responder en 1 día
-
Forward a connection to a peer when its local upstream connect failsPosiblemente ocupada @kriszyp la tomó hace 5 días. Abierto
HarperFast/symphony#79 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
HarperFast/symphony#77 ·
Los mantenedores suelen responder en 1 día
Todos los issues de HarperFast/symphony
Issues similares
-
area: cli kind:docs priority: P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
swc-project/swc-ai-issues#164 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
pop-os/cosmic-player#367 ·
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
servo/rust-smallvec#873 ·