Record Class CertificateProfileDefinition
java.lang.Object
java.lang.Record
zeroecho.pki.api.profile.CertificateProfileDefinition
- Record Components:
certificateType- kind of certificate governed by the profileprofileId- stable profile identifierprofileVersion- positive configuration versionformatId- framework/format identifierdisplayName- human-readable profile namemaximumValidity- positive maximum validityapprovalRequirement- multi-party approval requirement for issuancesubjectPolicy- complete subject policycertificatePolicy- closed certificate-specific policy variantalgorithmBindingPolicy- explicit X.509 representation policyconfirmationPolicy- exact leaf confirmation policy; absent for CA profileshybridMode- hybrid certificate mode;HybridCertificateMode.Nonefor standard profiles
public record CertificateProfileDefinition(CertificateProfileKind certificateType, String profileId, long profileVersion, FormatId formatId, String displayName, Duration maximumValidity, IssuanceApprovalRequirement approvalRequirement, SubjectPolicy subjectPolicy, CertificatePolicy certificatePolicy, X509AlgorithmBindingPolicy algorithmBindingPolicy, Optional<CredentialConfirmationPolicy> confirmationPolicy, HybridCertificateMode hybridMode)
extends Record
Immutable, versioned certificate-profile configuration.
Schema version 4 adds an exact immutable confirmation policy to end-entity
profiles in the closed pre-release profile shape. Schema version 5 adds an
explicit IssuanceApprovalRequirement that selects the multi-party
approval control applied to issuance. The hybridMode component selects
the hybrid certificate variant; it is optional in the codec and defaults to
HybridCertificateMode.None. The certificate kind and its closed
policy variant are immutable across the definition.
Runtime activation state is deliberately excluded.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intCurrent certificate-profile document schema version. -
Constructor Summary
ConstructorsConstructorDescriptionCertificateProfileDefinition(CertificateProfileKind certificateType, String profileId, long profileVersion, FormatId formatId, String displayName, Duration maximumValidity, IssuanceApprovalRequirement approvalRequirement, SubjectPolicy subjectPolicy, CertificatePolicy certificatePolicy, X509AlgorithmBindingPolicy algorithmBindingPolicy, Optional<CredentialConfirmationPolicy> confirmationPolicy) Creates a profile with full components excepthybridMode, defaulting it toHybridCertificateMode.None.CertificateProfileDefinition(CertificateProfileKind certificateType, String profileId, long profileVersion, FormatId formatId, String displayName, Duration maximumValidity, IssuanceApprovalRequirement approvalRequirement, SubjectPolicy subjectPolicy, CertificatePolicy certificatePolicy, X509AlgorithmBindingPolicy algorithmBindingPolicy, Optional<CredentialConfirmationPolicy> confirmationPolicy, HybridCertificateMode hybridMode) Creates a certificate-profile definition.CertificateProfileDefinition(CertificateProfileKind certificateType, String profileId, long profileVersion, FormatId formatId, String displayName, Duration maximumValidity, SubjectPolicy subjectPolicy, CertificatePolicy certificatePolicy) Creates a standard-only CA profile definition without an issuance approval requirement.CertificateProfileDefinition(CertificateProfileKind certificateType, String profileId, long profileVersion, FormatId formatId, String displayName, Duration maximumValidity, SubjectPolicy subjectPolicy, CertificatePolicy certificatePolicy, X509AlgorithmBindingPolicy algorithmBindingPolicy) Creates a profile without a leaf confirmation policy; valid only for CA profiles.CertificateProfileDefinition(CertificateProfileKind certificateType, String profileId, long profileVersion, FormatId formatId, String displayName, Duration maximumValidity, SubjectPolicy subjectPolicy, CertificatePolicy certificatePolicy, X509AlgorithmBindingPolicy algorithmBindingPolicy, Optional<CredentialConfirmationPolicy> confirmationPolicy) Creates a profile with the pre-approval-requirement component order, defaulting issuance approval toIssuanceApprovalRequirement.NONE. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealgorithmBindingPolicyrecord component.Returns the value of theapprovalRequirementrecord component.caPolicy()Returns the CA policy.Returns the value of thecertificatePolicyrecord component.Returns the value of thecertificateTyperecord component.Returns the value of theconfirmationPolicyrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.formatId()Returns the value of theformatIdrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehybridModerecord component.Returns the end-entity policy.Returns the value of themaximumValidityrecord component.Returns the value of theprofileIdrecord component.longReturns the value of theprofileVersionrecord component.voidRequires a currently supported certificate lifecycle before import, activation or issuance.Returns the value of thesubjectPolicyrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
SCHEMA_VERSION
public static final int SCHEMA_VERSIONCurrent certificate-profile document schema version.- See Also:
-
-
Constructor Details
-
CertificateProfileDefinition
public CertificateProfileDefinition(CertificateProfileKind certificateType, String profileId, long profileVersion, FormatId formatId, String displayName, Duration maximumValidity, SubjectPolicy subjectPolicy, CertificatePolicy certificatePolicy) Creates a standard-only CA profile definition without an issuance approval requirement.- Parameters:
certificateType- CA certificate kind governed by the profileprofileId- nonblank stable profile identifierprofileVersion- positive imported profile versionformatId- credential framework and encoding formatdisplayName- nonblank human-readable profile namemaximumValidity- positive maximum credential validitysubjectPolicy- complete CA subject policycertificatePolicy- closed CA certificate policy
-
CertificateProfileDefinition
public CertificateProfileDefinition(CertificateProfileKind certificateType, String profileId, long profileVersion, FormatId formatId, String displayName, Duration maximumValidity, SubjectPolicy subjectPolicy, CertificatePolicy certificatePolicy, X509AlgorithmBindingPolicy algorithmBindingPolicy) Creates a profile without a leaf confirmation policy; valid only for CA profiles.- Parameters:
certificateType- CA certificate kind governed by the profileprofileId- nonblank stable profile identifierprofileVersion- positive imported profile versionformatId- credential framework and encoding formatdisplayName- nonblank human-readable profile namemaximumValidity- positive maximum credential validitysubjectPolicy- complete CA subject policycertificatePolicy- closed CA certificate policyalgorithmBindingPolicy- explicit X.509 representation policy
-
CertificateProfileDefinition
public CertificateProfileDefinition(CertificateProfileKind certificateType, String profileId, long profileVersion, FormatId formatId, String displayName, Duration maximumValidity, SubjectPolicy subjectPolicy, CertificatePolicy certificatePolicy, X509AlgorithmBindingPolicy algorithmBindingPolicy, Optional<CredentialConfirmationPolicy> confirmationPolicy) Creates a profile with the pre-approval-requirement component order, defaulting issuance approval toIssuanceApprovalRequirement.NONE. Retained so existing programmatic callers stay source-compatible across the schema-5 field addition.- Parameters:
certificateType- certificate kind governed by the profileprofileId- nonblank stable profile identifierprofileVersion- positive imported profile versionformatId- credential framework and encoding formatdisplayName- nonblank human-readable profile namemaximumValidity- positive maximum credential validitysubjectPolicy- complete subject policycertificatePolicy- closed certificate-specific policyalgorithmBindingPolicy- explicit X.509 representation policyconfirmationPolicy- exact leaf confirmation policy; absent for CA profiles
-
CertificateProfileDefinition
public CertificateProfileDefinition(CertificateProfileKind certificateType, String profileId, long profileVersion, FormatId formatId, String displayName, Duration maximumValidity, IssuanceApprovalRequirement approvalRequirement, SubjectPolicy subjectPolicy, CertificatePolicy certificatePolicy, X509AlgorithmBindingPolicy algorithmBindingPolicy, Optional<CredentialConfirmationPolicy> confirmationPolicy) Creates a profile with full components excepthybridMode, defaulting it toHybridCertificateMode.None. Retained so existing programmatic callers that use the approval-requirement order stay source-compatible.- Parameters:
certificateType- certificate kind governed by the profileprofileId- nonblank stable profile identifierprofileVersion- positive imported profile versionformatId- credential framework and encoding formatdisplayName- nonblank human-readable profile namemaximumValidity- positive maximum credential validityapprovalRequirement- multi-party approval requirement for issuancesubjectPolicy- complete subject policycertificatePolicy- closed certificate-specific policyalgorithmBindingPolicy- explicit X.509 representation policyconfirmationPolicy- exact leaf confirmation policy; absent for CA profiles
-
CertificateProfileDefinition
public CertificateProfileDefinition(CertificateProfileKind certificateType, String profileId, long profileVersion, FormatId formatId, String displayName, Duration maximumValidity, IssuanceApprovalRequirement approvalRequirement, SubjectPolicy subjectPolicy, CertificatePolicy certificatePolicy, X509AlgorithmBindingPolicy algorithmBindingPolicy, Optional<CredentialConfirmationPolicy> confirmationPolicy, HybridCertificateMode hybridMode) Creates a certificate-profile definition.- Throws:
IllegalArgumentException- if a required value is absent or the profile version is not positive
-
-
Method Details
-
leafPolicy
Returns the end-entity policy.- Returns:
- leaf policy
- Throws:
IllegalStateException- if this is a CA profile
-
caPolicy
Returns the CA policy.- Returns:
- CA policy
- Throws:
IllegalStateException- if this is an end-entity profile
-
requireSupportedIssuance
public void requireSupportedIssuance()Requires a currently supported certificate lifecycle before import, activation or issuance. Historical definitions remain representable for archival reads and backup even when their lifecycle is unsupported.- Throws:
IllegalArgumentException- if the requested hybrid lifecycle is unsupported
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
certificateType
Returns the value of thecertificateTyperecord component.- Returns:
- the value of the
certificateTyperecord component
-
profileId
-
profileVersion
public long profileVersion()Returns the value of theprofileVersionrecord component.- Returns:
- the value of the
profileVersionrecord component
-
formatId
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
maximumValidity
Returns the value of themaximumValidityrecord component.- Returns:
- the value of the
maximumValidityrecord component
-
approvalRequirement
Returns the value of theapprovalRequirementrecord component.- Returns:
- the value of the
approvalRequirementrecord component
-
subjectPolicy
Returns the value of thesubjectPolicyrecord component.- Returns:
- the value of the
subjectPolicyrecord component
-
certificatePolicy
Returns the value of thecertificatePolicyrecord component.- Returns:
- the value of the
certificatePolicyrecord component
-
algorithmBindingPolicy
Returns the value of thealgorithmBindingPolicyrecord component.- Returns:
- the value of the
algorithmBindingPolicyrecord component
-
confirmationPolicy
Returns the value of theconfirmationPolicyrecord component.- Returns:
- the value of the
confirmationPolicyrecord component
-
hybridMode
Returns the value of thehybridModerecord component.- Returns:
- the value of the
hybridModerecord component
-