Record Class PkiServerAuthenticationContext
java.lang.Object
java.lang.Record
zeroecho.pki.server.spi.PkiServerAuthenticationContext
- Record Components:
peerCertificates- trusted JSSE peer chain, leaf first; 1–64 entriesprotocol- negotiated TLS protocol; max 64 charscipherSuite- negotiated cipher suite; max 128 charsrequestId- safe request correlation identity matching[A-Za-z0-9_-]{16,128}realmId- exact server realmrequestHeaders- bounded immutable request headers used only by an explicitly configured proxy mode; max 256 entries
public record PkiServerAuthenticationContext(List<X509Certificate> peerCertificates, String protocol, String cipherSuite, String requestId, RealmId realmId, Map<String, List<String>> requestHeaders)
extends Record
Bounded read-only mutual-TLS authentication input, independent of operation
arguments.
All fields are immutably snapshotted at construction time. Sensitive
material (certificate contents, header values, TLS session details) is never
rendered in toString().
Thread safety
Immutable after construction; safe for concurrent access without additional synchronization.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionPkiServerAuthenticationContext(List<X509Certificate> peerCertificates, String protocol, String cipherSuite, String requestId, RealmId realmId) Creates a direct-mTLS context without forwarded identity headers.PkiServerAuthenticationContext(List<X509Certificate> peerCertificates, String protocol, String cipherSuite, String requestId, RealmId realmId, Map<String, List<String>> requestHeaders) Validates and snapshots the finite authentication context. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecipherSuiterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepeerCertificatesrecord component.protocol()Returns the value of theprotocolrecord component.realmId()Returns the value of therealmIdrecord component.Returns the value of therequestHeadersrecord component.Returns the value of therequestIdrecord component.toString()Returns safe metadata only; certificate and header values are never rendered.
-
Constructor Details
-
PkiServerAuthenticationContext
-
PkiServerAuthenticationContext
public PkiServerAuthenticationContext(List<X509Certificate> peerCertificates, String protocol, String cipherSuite, String requestId, RealmId realmId) Creates a direct-mTLS context without forwarded identity headers.- Parameters:
peerCertificates- non-empty authenticated peer chain; defensively copiedprotocol- negotiated TLS protocol namecipherSuite- negotiated TLS cipher-suite namerequestId- validated request correlation identityrealmId- realm receiving the request
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
peerCertificates
Returns the value of thepeerCertificatesrecord component.- Returns:
- the value of the
peerCertificatesrecord component
-
protocol
-
cipherSuite
Returns the value of thecipherSuiterecord component.- Returns:
- the value of the
cipherSuiterecord component
-
requestId
-
realmId
-
requestHeaders
Returns the value of therequestHeadersrecord component.- Returns:
- the value of the
requestHeadersrecord component
-