Record Class AdapterSecurityProfile

java.lang.Object
java.lang.Record
org.j7m.middleware.adapter.spi.AdapterSecurityProfile
Record Components:
authorizationHooks - whether adapter operations call authorization hooks
auditHooks - whether adapter operations emit audit evidence
redaction - whether public errors, status, and reports are redacted
objectReferenceProtection - whether object references remain authorization checked
digestNotBearerToken - whether digests and references are not treated as bearer authorization
credentials - immutable credential declarations; values are never stored here

public record AdapterSecurityProfile(boolean authorizationHooks, boolean auditHooks, boolean redaction, boolean objectReferenceProtection, boolean digestNotBearerToken, List<AdapterCredentialRequirement> credentials) extends Record
Security posture declared by an adapter.

The record is immutable and thread-safe. It captures whether the adapter preserves J7M authorization hooks, audit hooks, redaction, object reference semantics, and digest/reference non-bearer behavior. Missing required security behavior causes the TCK to reject the adapter instead of silently weakening native J7M semantics.

  • Constructor Details

    • AdapterSecurityProfile

      public AdapterSecurityProfile(boolean authorizationHooks, boolean auditHooks, boolean redaction, boolean objectReferenceProtection, boolean digestNotBearerToken, List<AdapterCredentialRequirement> credentials)
      Creates a security profile.
  • Method Details

    • strict

      public static AdapterSecurityProfile strict()
      Returns a profile that preserves the baseline J7M security hooks.
      Returns:
      strict security profile
    • 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.
    • authorizationHooks

      public boolean authorizationHooks()
      Returns the value of the authorizationHooks record component.
      Returns:
      the value of the authorizationHooks record component
    • auditHooks

      public boolean auditHooks()
      Returns the value of the auditHooks record component.
      Returns:
      the value of the auditHooks record component
    • redaction

      public boolean redaction()
      Returns the value of the redaction record component.
      Returns:
      the value of the redaction record component
    • objectReferenceProtection

      public boolean objectReferenceProtection()
      Returns the value of the objectReferenceProtection record component.
      Returns:
      the value of the objectReferenceProtection record component
    • digestNotBearerToken

      public boolean digestNotBearerToken()
      Returns the value of the digestNotBearerToken record component.
      Returns:
      the value of the digestNotBearerToken record component
    • credentials

      public List<AdapterCredentialRequirement> credentials()
      Returns the value of the credentials record component.
      Returns:
      the value of the credentials record component