Record Class DisclosureService.Capability

java.lang.Object
java.lang.Record
zeroecho.pki.server.DisclosureService.Capability
Record Components:
capabilityId - stable non-bearer capability identifier
realmId - owning security realm
objectId - exact protected object identifier
action - bounded capability action
issuerPrincipalId - issuing administrative principal
tokenCommitment - SHA-256 commitment to the raw bearer token
expiresAt - mandatory capability expiry
deliveryState - one-time token-delivery classification
revoked - whether the capability is permanently revoked
Enclosing class:
DisclosureService

public static record DisclosureService.Capability(String capabilityId, RealmId realmId, PkiId objectId, String action, String issuerPrincipalId, byte[] tokenCommitment, Instant expiresAt, DisclosureService.DeliveryState deliveryState, boolean revoked) extends Record
Persisted commitment-only capability authority.
  • Constructor Details

    • Capability

      public Capability(String capabilityId, RealmId realmId, PkiId objectId, String action, String issuerPrincipalId, byte[] tokenCommitment, Instant expiresAt, DisclosureService.DeliveryState deliveryState, boolean revoked)
      Validates and snapshots capability metadata.
    • Capability

      public Capability(String capabilityId, RealmId realmId, PkiId objectId, String action, byte[] tokenCommitment, Instant expiresAt, boolean revoked)
      Creates compatibility metadata with a non-secret system issuer.
      Parameters:
      capabilityId - stable non-bearer capability identifier
      realmId - owning security realm
      objectId - exact protected object identifier
      action - bounded capability action
      tokenCommitment - SHA-256 commitment to the raw bearer token
      expiresAt - mandatory capability expiry
      revoked - whether the capability is permanently revoked
    • Capability

      public Capability(String capabilityId, RealmId realmId, PkiId objectId, String action, String issuerPrincipalId, byte[] tokenCommitment, Instant expiresAt, boolean revoked)
      Creates capability metadata in the delivered state for embedded compatibility.
      Parameters:
      capabilityId - stable non-bearer capability identifier
      realmId - owning security realm
      objectId - exact protected object identifier
      action - bounded capability action
      issuerPrincipalId - issuing administrative principal
      tokenCommitment - SHA-256 commitment to the raw bearer token
      expiresAt - mandatory capability expiry
      revoked - whether the capability is permanently revoked
  • Method Details

    • tokenCommitment

      public byte[] tokenCommitment()
      Returns a defensive commitment copy.
      Returns:
      exact 32-byte token commitment
    • 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.
    • capabilityId

      public String capabilityId()
      Returns the value of the capabilityId record component.
      Returns:
      the value of the capabilityId record component
    • realmId

      public RealmId realmId()
      Returns the value of the realmId record component.
      Returns:
      the value of the realmId record component
    • objectId

      public PkiId objectId()
      Returns the value of the objectId record component.
      Returns:
      the value of the objectId record component
    • action

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

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

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

      public DisclosureService.DeliveryState deliveryState()
      Returns the value of the deliveryState record component.
      Returns:
      the value of the deliveryState record component
    • revoked

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