Record Class EnrollmentProfile

java.lang.Object
java.lang.Record
zeroecho.pki.server.enrollment.EnrollmentProfile
Record Components:
id - URL-safe profile identity, unique within the realm
displayName - human-readable label
state - current lifecycle state
certificateProfileId - certificate profile applied to issued credentials
allowedAuthorityIds - set of CA identities that may issue under this profile; empty means any authority is permitted
subjectDnPattern - optional bounded pattern of literal text and .* wildcards; see EnrollmentSubjectPattern
requiredSanDomains - DNS suffixes each requiring at least one matching DNS SAN; normalized to sorted lowercase ASCII; empty = unconstrained
requireApproval - 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 Details

  • Method Details

    • withState

      public EnrollmentProfile withState(EnrollmentProfileState newState)
      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

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • displayName

      public String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • state

      public EnrollmentProfileState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • certificateProfileId

      public String certificateProfileId()
      Returns the value of the certificateProfileId record component.
      Returns:
      the value of the certificateProfileId record component
    • allowedAuthorityIds

      public Set<String> allowedAuthorityIds()
      Returns the value of the allowedAuthorityIds record component.
      Returns:
      the value of the allowedAuthorityIds record component
    • subjectDnPattern

      public Optional<String> subjectDnPattern()
      Returns the value of the subjectDnPattern record component.
      Returns:
      the value of the subjectDnPattern record component
    • requiredSanDomains

      public List<String> requiredSanDomains()
      Returns the value of the requiredSanDomains record component.
      Returns:
      the value of the requiredSanDomains record component
    • requireApproval

      public boolean requireApproval()
      Returns the value of the requireApproval record component.
      Returns:
      the value of the requireApproval record component