Record Class AdapterSecurityProfile
java.lang.Object
java.lang.Record
org.j7m.middleware.adapter.spi.AdapterSecurityProfile
- Record Components:
- whether adapter operations call authorization hooksauditHooks- whether adapter operations emit audit evidenceredaction- whether public errors, status, and reports are redactedobjectReferenceProtection- whether object references remain authorization checkeddigestNotBearerToken- whether digests and references are not treated as bearer authorizationcredentials- 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 Summary
ConstructorsConstructorDescriptionAdapterSecurityProfile(boolean authorizationHooks, boolean auditHooks, boolean redaction, boolean objectReferenceProtection, boolean digestNotBearerToken, List<AdapterCredentialRequirement> credentials) Creates a security profile. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theauditHooksrecord component.booleanReturns the value of theauthorizationHooksrecord component.Returns the value of thecredentialsrecord component.booleanReturns the value of thedigestNotBearerTokenrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theobjectReferenceProtectionrecord component.booleanReturns the value of theredactionrecord component.static AdapterSecurityProfilestrict()Returns a profile that preserves the baseline J7M security hooks.final StringtoString()Returns a string representation of this record class.
-
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
Returns a profile that preserves the baseline J7M security hooks.- Returns:
- strict security profile
-
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. -
authorizationHooks
public boolean authorizationHooks()Returns the value of theauthorizationHooksrecord component.- Returns:
- the value of the
authorizationHooksrecord component
-
auditHooks
public boolean auditHooks()Returns the value of theauditHooksrecord component.- Returns:
- the value of the
auditHooksrecord component
-
redaction
-
objectReferenceProtection
public boolean objectReferenceProtection()Returns the value of theobjectReferenceProtectionrecord component.- Returns:
- the value of the
objectReferenceProtectionrecord component
-
digestNotBearerToken
public boolean digestNotBearerToken()Returns the value of thedigestNotBearerTokenrecord component.- Returns:
- the value of the
digestNotBearerTokenrecord component
-
credentials
Returns the value of thecredentialsrecord component.- Returns:
- the value of the
credentialsrecord component
-