Class MutualTlsAuthenticator
java.lang.Object
zeroecho.pki.server.http.MutualTlsAuthenticator
- All Implemented Interfaces:
AutoCloseable, PkiServerAuthenticator
Production mutual-TLS authenticator using immutable cryptographic certificate
commitments rather than mutable subject or SAN strings.
The HTTPS handshake has already validated the chain through the configured JSSE trust manager. This authenticator additionally validates validity time, canonical single-certificate encoding, mapping uniqueness, and the enabled state of the persisted principal.
-
Constructor Summary
ConstructorsConstructorDescriptionMutualTlsAuthenticator(List<PkiServerConfiguration.ClientCertificateMapping> mappings, Function<String, SecurityPrincipal> principalResolver, Clock clock) Creates one immutable principal mapper. -
Method Summary
Modifier and TypeMethodDescriptionAuthenticates one already TLS-validated peer without inspecting operation arguments.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PkiServerAuthenticator
close
-
Constructor Details
-
MutualTlsAuthenticator
public MutualTlsAuthenticator(List<PkiServerConfiguration.ClientCertificateMapping> mappings, Function<String, SecurityPrincipal> principalResolver, Clock clock) Creates one immutable principal mapper.- Parameters:
mappings- exact cryptographic mappingsprincipalResolver- persisted principal resolverclock- injected validity clock
-
-
Method Details
-
authenticate
Description copied from interface:PkiServerAuthenticatorAuthenticates one already TLS-validated peer without inspecting operation arguments.- Specified by:
authenticatein interfacePkiServerAuthenticator- Parameters:
context- bounded trusted TLS context; nevernull- Returns:
- safe authentication result; never
null
-