Record Class DisclosureService.Capability
java.lang.Object
java.lang.Record
zeroecho.pki.server.DisclosureService.Capability
- Record Components:
capabilityId- stable non-bearer capability identifierrealmId- owning security realmobjectId- exact protected object identifieraction- bounded capability actionissuerPrincipalId- issuing administrative principaltokenCommitment- SHA-256 commitment to the raw bearer tokenexpiresAt- mandatory capability expirydeliveryState- one-time token-delivery classificationrevoked- 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 Summary
ConstructorsConstructorDescriptionCapability(String capabilityId, RealmId realmId, PkiId objectId, String action, byte[] tokenCommitment, Instant expiresAt, boolean revoked) Creates compatibility metadata with a non-secret system issuer.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.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. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.Returns the value of thecapabilityIdrecord component.Returns the value of thedeliveryStaterecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theissuerPrincipalIdrecord component.objectId()Returns the value of theobjectIdrecord component.realmId()Returns the value of therealmIdrecord component.booleanrevoked()Returns the value of therevokedrecord component.byte[]Returns a defensive commitment copy.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Capability
-
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 identifierrealmId- owning security realmobjectId- exact protected object identifieraction- bounded capability actiontokenCommitment- SHA-256 commitment to the raw bearer tokenexpiresAt- mandatory capability expiryrevoked- 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 identifierrealmId- owning security realmobjectId- exact protected object identifieraction- bounded capability actionissuerPrincipalId- issuing administrative principaltokenCommitment- SHA-256 commitment to the raw bearer tokenexpiresAt- mandatory capability expiryrevoked- whether the capability is permanently revoked
-
-
Method Details
-
tokenCommitment
public byte[] tokenCommitment()Returns a defensive commitment copy.- Returns:
- exact 32-byte token commitment
-
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. -
capabilityId
Returns the value of thecapabilityIdrecord component.- Returns:
- the value of the
capabilityIdrecord component
-
realmId
-
objectId
-
action
-
issuerPrincipalId
Returns the value of theissuerPrincipalIdrecord component.- Returns:
- the value of the
issuerPrincipalIdrecord component
-
expiresAt
-
deliveryState
Returns the value of thedeliveryStaterecord component.- Returns:
- the value of the
deliveryStaterecord component
-
revoked
-