Class SessionIdContextBuilder

java.lang.Object
io.netty.handler.ssl.SessionIdContextBuilder

public final class SessionIdContextBuilder extends Object
Derives the session_id_context for a server context from the material that determines which clients it accepts. The session discriminating material is the ClientAuth mode, the certificate chain it presents, the certificates it trusts, and any installed credentials.

The session_id_context scopes session resumption: a session (and therefore its client-authentication state) can only be resumed by a context that uses the same session_id_context. It must hence differ between contexts which, when sharing a session cache or session-ticket keys, must not accept each others sessions (for example because they use a different ClientAuth mode or trust configuration), but it should be the same for contexts that are configured identically (for example on different nodes of a cluster that share session-ticket keys), so resumption keeps working between them. See SSL_CTX_set_session_id_context and GHSA-6xv6-9mgg-mfvc.

This class securely computes distinct session context identifiers from the discriminating material, such that resumption is allowed for connections to the same JVM, with optional support for deterministic cross-JVM session context ids.