Record Class CertificateIdentityEvidence
java.lang.Object
java.lang.Record
zeroecho.pki.server.CertificateIdentityEvidence
- Record Components:
realmId- authentication realmcertificateSha256- exact certificate DER commitmentcanonicalKeySha256- mathematical key commitment, distinct from mapping hasheslegacySpkiSha256- finite supported equivalent SPKI commitments plus actual provider encodingissuerSerialSha256- existing issuer-DER/positive-serial mapping commitment
public record CertificateIdentityEvidence(RealmId realmId, String certificateSha256, String canonicalKeySha256, Set<String> legacySpkiSha256, String issuerSerialSha256)
extends Record
Immutable realm-bound certificate and mathematical key commitments used only
for enrollment separation. Construction does not establish certificate trust,
authentication or authority. Production callers create this value only after
validating the actual direct or forwarded end-client credential.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecanonicalKeySha256record component.Returns the value of thecertificateSha256record component.final booleanIndicates whether some other object is "equal to" this one.static CertificateIdentityEvidencefromCertificate(RealmId realmId, X509Certificate certificate) Computes evidence from an already validated end-client certificate.final inthashCode()Returns a hash code value for this object.Returns the value of theissuerSerialSha256record component.Returns the value of thelegacySpkiSha256record component.realmId()Returns the value of therealmIdrecord component.booleanCompares exact certificates or mathematical keys within the same realm.toString()Returns a string representation of this record class.
-
Constructor Details
-
CertificateIdentityEvidence
-
-
Method Details
-
fromCertificate
public static CertificateIdentityEvidence fromCertificate(RealmId realmId, X509Certificate certificate) throws CertificateEncodingException Computes evidence from an already validated end-client certificate. It does not validate trust, time, usage or principal mapping. Unsupported identity encodings are rejected without a fallback to hashing arbitrary SPKI bytes. Existing configured mapping hash semantics remain unchanged.- Parameters:
realmId- exact authenticated realmcertificate- validated end-client leaf, never a proxy transport leaf- Returns:
- immutable, redacted credential evidence
- Throws:
CertificateEncodingException- if certificate encoding is unavailableIllegalArgumentException- if the key representation or serial is unsupported
-
sameCredential
Compares exact certificates or mathematical keys within the same realm.- Parameters:
other- verified credential evidence- Returns:
- whether both represent one known requester credential relationship
-
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). -
realmId
-
certificateSha256
Returns the value of thecertificateSha256record component.- Returns:
- the value of the
certificateSha256record component
-
canonicalKeySha256
Returns the value of thecanonicalKeySha256record component.- Returns:
- the value of the
canonicalKeySha256record component
-
legacySpkiSha256
Returns the value of thelegacySpkiSha256record component.- Returns:
- the value of the
legacySpkiSha256record component
-
issuerSerialSha256
Returns the value of theissuerSerialSha256record component.- Returns:
- the value of the
issuerSerialSha256record component
-