Record Class SecurityConfiguration

java.lang.Object
java.lang.Record
org.j7m.middleware.security.api.SecurityConfiguration
Record Components:
mode - security mode
policy - authorization policy
auditSink - audit sink
redactor - redactor
requireAuthentication - whether requests require authentication
allowInsecureProductionTransport - explicit production insecure override
maxInboundMessageBytes - max inbound message bytes
maxOutboundMessageBytes - max outbound message bytes
maxConcurrentInvocations - max concurrent invocations
adminDeadline - admin deadline
credentialProvider - credential provider
replayProtectionEnabled - whether invocation replay protection is enabled
allowedClockSkew - accepted request timestamp skew
maxReplayEntries - maximum retained replay cache entries
strictRegistryTrust - whether invalid or unsigned registry records are rejected
resourcePolicy - resource policy

public record SecurityConfiguration(SecurityMode mode, AuthorizationPolicy policy, SecurityAuditSink auditSink, Redactor redactor, boolean requireAuthentication, boolean allowInsecureProductionTransport, int maxInboundMessageBytes, int maxOutboundMessageBytes, int maxConcurrentInvocations, Duration adminDeadline, CredentialProvider credentialProvider, boolean replayProtectionEnabled, Duration allowedClockSkew, int maxReplayEntries, boolean strictRegistryTrust, ResourcePolicy resourcePolicy) extends Record
Immutable runtime security configuration.
  • Constructor Details

    • SecurityConfiguration

      public SecurityConfiguration(SecurityMode mode, AuthorizationPolicy policy, SecurityAuditSink auditSink, Redactor redactor, boolean requireAuthentication, boolean allowInsecureProductionTransport, int maxInboundMessageBytes, int maxOutboundMessageBytes, int maxConcurrentInvocations, Duration adminDeadline, CredentialProvider credentialProvider, boolean replayProtectionEnabled, Duration allowedClockSkew, int maxReplayEntries, boolean strictRegistryTrust, ResourcePolicy resourcePolicy)
      Creates security configuration.
    • SecurityConfiguration

      public SecurityConfiguration(SecurityMode mode, AuthorizationPolicy policy, SecurityAuditSink auditSink, Redactor redactor, boolean requireAuthentication, boolean allowInsecureProductionTransport, int maxInboundMessageBytes, int maxConcurrentInvocations, Duration adminDeadline, CredentialProvider credentialProvider, boolean replayProtectionEnabled, Duration allowedClockSkew, int maxReplayEntries, boolean strictRegistryTrust)
      Creates configuration with Phase 3.1 fields but no resource policy.
      Parameters:
      mode - security mode
      policy - authorization policy
      auditSink - audit sink
      redactor - redactor
      requireAuthentication - whether authentication is required
      allowInsecureProductionTransport - insecure production override
      maxInboundMessageBytes - inbound message limit
      maxConcurrentInvocations - concurrent invocation limit
      adminDeadline - admin deadline
      credentialProvider - credential provider
      replayProtectionEnabled - whether replay protection is enabled
      allowedClockSkew - allowed clock skew
      maxReplayEntries - max replay entries
      strictRegistryTrust - strict registry trust flag
    • SecurityConfiguration

      public SecurityConfiguration(SecurityMode mode, AuthorizationPolicy policy, SecurityAuditSink auditSink, Redactor redactor, boolean requireAuthentication, boolean allowInsecureProductionTransport, int maxInboundMessageBytes, int maxConcurrentInvocations, Duration adminDeadline, CredentialProvider credentialProvider)
      Creates a Phase 3.0-compatible configuration.
      Parameters:
      mode - security mode
      policy - authorization policy
      auditSink - audit sink
      redactor - redactor
      requireAuthentication - whether authentication is required
      allowInsecureProductionTransport - insecure production override
      maxInboundMessageBytes - inbound message limit
      maxConcurrentInvocations - concurrent invocation limit
      adminDeadline - admin deadline
      credentialProvider - credential provider
  • 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. 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.
    • mode

      public SecurityMode mode()
      Returns the value of the mode record component.
      Returns:
      the value of the mode record component
    • policy

      public AuthorizationPolicy policy()
      Returns the value of the policy record component.
      Returns:
      the value of the policy record component
    • auditSink

      public SecurityAuditSink auditSink()
      Returns the value of the auditSink record component.
      Returns:
      the value of the auditSink record component
    • redactor

      public Redactor redactor()
      Returns the value of the redactor record component.
      Returns:
      the value of the redactor record component
    • requireAuthentication

      public boolean requireAuthentication()
      Returns the value of the requireAuthentication record component.
      Returns:
      the value of the requireAuthentication record component
    • allowInsecureProductionTransport

      public boolean allowInsecureProductionTransport()
      Returns the value of the allowInsecureProductionTransport record component.
      Returns:
      the value of the allowInsecureProductionTransport record component
    • maxInboundMessageBytes

      public int maxInboundMessageBytes()
      Returns the value of the maxInboundMessageBytes record component.
      Returns:
      the value of the maxInboundMessageBytes record component
    • maxOutboundMessageBytes

      public int maxOutboundMessageBytes()
      Returns the value of the maxOutboundMessageBytes record component.
      Returns:
      the value of the maxOutboundMessageBytes record component
    • maxConcurrentInvocations

      public int maxConcurrentInvocations()
      Returns the value of the maxConcurrentInvocations record component.
      Returns:
      the value of the maxConcurrentInvocations record component
    • adminDeadline

      public Duration adminDeadline()
      Returns the value of the adminDeadline record component.
      Returns:
      the value of the adminDeadline record component
    • credentialProvider

      public CredentialProvider credentialProvider()
      Returns the value of the credentialProvider record component.
      Returns:
      the value of the credentialProvider record component
    • replayProtectionEnabled

      public boolean replayProtectionEnabled()
      Returns the value of the replayProtectionEnabled record component.
      Returns:
      the value of the replayProtectionEnabled record component
    • allowedClockSkew

      public Duration allowedClockSkew()
      Returns the value of the allowedClockSkew record component.
      Returns:
      the value of the allowedClockSkew record component
    • maxReplayEntries

      public int maxReplayEntries()
      Returns the value of the maxReplayEntries record component.
      Returns:
      the value of the maxReplayEntries record component
    • strictRegistryTrust

      public boolean strictRegistryTrust()
      Returns the value of the strictRegistryTrust record component.
      Returns:
      the value of the strictRegistryTrust record component
    • resourcePolicy

      public ResourcePolicy resourcePolicy()
      Returns the value of the resourcePolicy record component.
      Returns:
      the value of the resourcePolicy record component