Record Class EnrollmentProfile
java.lang.Object
java.lang.Record
zeroecho.pki.server.enrollment.EnrollmentProfile
- Record Components:
id- URL-safe profile identity, unique within the realmdisplayName- human-readable labelstate- current lifecycle statecertificateProfileId- certificate profile applied to issued credentialsallowedAuthorityIds- set of CA identities that may issue under this profile; empty means any authority is permittedsubjectDnPattern- optional bounded pattern of literal text and.*wildcards; seeEnrollmentSubjectPatternrequiredSanDomains- DNS suffixes each requiring at least one matching DNS SAN; normalized to sorted lowercase ASCII; empty = unconstrainedrequireApproval- whether issuance requires an out-of-band approval
public record EnrollmentProfile(String id, String displayName, EnrollmentProfileState state, String certificateProfileId, Set<String> allowedAuthorityIds, Optional<String> subjectDnPattern, List<String> requiredSanDomains, boolean requireApproval)
extends Record
Immutable enrollment profile.
An enrollment profile groups the policy constraints applied to
certificate requests arriving through any enrollment protocol
(SCEP, CMP, EST, ACME). Endpoints reference a profile by its
id rather than duplicating policy inline.
-
Constructor Summary
ConstructorsConstructorDescriptionEnrollmentProfile(String id, String displayName, EnrollmentProfileState state, String certificateProfileId, Set<String> allowedAuthorityIds, Optional<String> subjectDnPattern, List<String> requiredSanDomains, boolean requireApproval) Validates and defensively copies the record. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedAuthorityIdsrecord component.Returns the value of thecertificateProfileIdrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanReturns the value of therequireApprovalrecord component.Returns the value of therequiredSanDomainsrecord component.state()Returns the value of thestaterecord component.Returns the value of thesubjectDnPatternrecord component.final StringtoString()Returns a string representation of this record class.withState(EnrollmentProfileState newState) Returns a copy of this profile with the given state.
-
Constructor Details
-
EnrollmentProfile
-
-
Method Details
-
withState
Returns a copy of this profile with the given state.- Parameters:
newState- non-null replacement state- Returns:
- a new profile retaining every other field
- Throws:
NullPointerException- if the state is null
-
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. -
id
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
state
-
certificateProfileId
Returns the value of thecertificateProfileIdrecord component.- Returns:
- the value of the
certificateProfileIdrecord component
-
allowedAuthorityIds
Returns the value of theallowedAuthorityIdsrecord component.- Returns:
- the value of the
allowedAuthorityIdsrecord component
-
subjectDnPattern
Returns the value of thesubjectDnPatternrecord component.- Returns:
- the value of the
subjectDnPatternrecord component
-
requiredSanDomains
Returns the value of therequiredSanDomainsrecord component.- Returns:
- the value of the
requiredSanDomainsrecord component
-
requireApproval
public boolean requireApproval()Returns the value of therequireApprovalrecord component.- Returns:
- the value of the
requireApprovalrecord component
-