Record Class BreakGlassService.Record

java.lang.Object
java.lang.Record
zeroecho.pki.server.BreakGlassService.Record
Record Components:
breakGlassId - stable emergency grant identity
principalId - grantee
grant - exact scoped permission grant
reason - mandatory reason
issuerPrincipalId - independent issuer identity
approvalId - optional independent approval authority
createdAt - creation time
activatedAt - activation time
expiresAt - mandatory expiry
state - lifecycle state
auditCommitment - stable safe commitment
Enclosing class:
BreakGlassService

public static record BreakGlassService.Record(String breakGlassId, String principalId, Permission.Grant grant, String reason, String issuerPrincipalId, Optional<String> approvalId, Instant createdAt, Optional<Instant> activatedAt, Instant expiresAt, BreakGlassService.State state, String auditCommitment) extends Record
Durable break-glass record.
  • Constructor Details

    • Record

      public Record(String breakGlassId, String principalId, Permission.Grant grant, String reason, String issuerPrincipalId, Optional<String> approvalId, Instant createdAt, Optional<Instant> activatedAt, Instant expiresAt, BreakGlassService.State state, String auditCommitment)
      Validates the strict time-limited scoped record.
    • Record

      public Record(String breakGlassId, String principalId, Permission.Grant grant, String reason, String issuerPrincipalId, Optional<String> approvalId, Instant createdAt, Instant activatedAt, Instant expiresAt, BreakGlassService.State state, String auditCommitment)
      Creates an activated record for existing embedded callers.
      Parameters:
      breakGlassId - stable emergency grant identifier
      principalId - grantee principal
      grant - exact scoped allow grant
      reason - mandatory bounded emergency reason
      issuerPrincipalId - independent issuer principal
      approvalId - optional independent approval authority
      createdAt - server-authoritative creation time
      activatedAt - server-authoritative activation time
      expiresAt - mandatory expiry no more than 24 hours after activation
      state - lifecycle state
      auditCommitment - safe immutable audit commitment
  • Method Details

    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • breakGlassId

      public String breakGlassId()
      Returns the value of the breakGlassId record component.
      Returns:
      the value of the breakGlassId record component
    • principalId

      public String principalId()
      Returns the value of the principalId record component.
      Returns:
      the value of the principalId record component
    • grant

      public Permission.Grant grant()
      Returns the value of the grant record component.
      Returns:
      the value of the grant record component
    • reason

      public String reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component
    • issuerPrincipalId

      public String issuerPrincipalId()
      Returns the value of the issuerPrincipalId record component.
      Returns:
      the value of the issuerPrincipalId record component
    • approvalId

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

      public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • activatedAt

      public Optional<Instant> activatedAt()
      Returns the value of the activatedAt record component.
      Returns:
      the value of the activatedAt record component
    • expiresAt

      public Instant expiresAt()
      Returns the value of the expiresAt record component.
      Returns:
      the value of the expiresAt record component
    • state

      public BreakGlassService.State state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • auditCommitment

      public String auditCommitment()
      Returns the value of the auditCommitment record component.
      Returns:
      the value of the auditCommitment record component