Record Class SecurityConfiguration
java.lang.Object
java.lang.Record
org.j7m.middleware.security.api.SecurityConfiguration
- Record Components:
mode- security modepolicy- authorization policyauditSink- audit sinkredactor- redactorrequireAuthentication- whether requests require authenticationallowInsecureProductionTransport- explicit production insecure overridemaxInboundMessageBytes- max inbound message bytesmaxOutboundMessageBytes- max outbound message bytesmaxConcurrentInvocations- max concurrent invocationsadminDeadline- admin deadlinecredentialProvider- credential providerreplayProtectionEnabled- whether invocation replay protection is enabledallowedClockSkew- accepted request timestamp skewmaxReplayEntries- maximum retained replay cache entriesstrictRegistryTrust- whether invalid or unsigned registry records are rejectedresourcePolicy- 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 Summary
ConstructorsConstructorDescriptionSecurityConfiguration(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(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.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. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadminDeadlinerecord component.Returns the value of theallowedClockSkewrecord component.booleanReturns the value of theallowInsecureProductionTransportrecord component.Returns the value of theauditSinkrecord component.Returns the value of thecredentialProviderrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxConcurrentInvocationsrecord component.intReturns the value of themaxInboundMessageBytesrecord component.intReturns the value of themaxOutboundMessageBytesrecord component.intReturns the value of themaxReplayEntriesrecord component.mode()Returns the value of themoderecord component.policy()Returns the value of thepolicyrecord component.redactor()Returns the value of theredactorrecord component.booleanReturns the value of thereplayProtectionEnabledrecord component.booleanReturns the value of therequireAuthenticationrecord component.Returns the value of theresourcePolicyrecord component.booleanReturns the value of thestrictRegistryTrustrecord component.final StringtoString()Returns a string representation of this record class.
-
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 modepolicy- authorization policyauditSink- audit sinkredactor- redactorrequireAuthentication- whether authentication is requiredallowInsecureProductionTransport- insecure production overridemaxInboundMessageBytes- inbound message limitmaxConcurrentInvocations- concurrent invocation limitadminDeadline- admin deadlinecredentialProvider- credential providerreplayProtectionEnabled- whether replay protection is enabledallowedClockSkew- allowed clock skewmaxReplayEntries- max replay entriesstrictRegistryTrust- 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 modepolicy- authorization policyauditSink- audit sinkredactor- redactorrequireAuthentication- whether authentication is requiredallowInsecureProductionTransport- insecure production overridemaxInboundMessageBytes- inbound message limitmaxConcurrentInvocations- concurrent invocation limitadminDeadline- admin deadlinecredentialProvider- credential provider
-
-
Method Details
-
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. -
mode
-
policy
-
auditSink
-
redactor
-
requireAuthentication
public boolean requireAuthentication()Returns the value of therequireAuthenticationrecord component.- Returns:
- the value of the
requireAuthenticationrecord component
-
allowInsecureProductionTransport
public boolean allowInsecureProductionTransport()Returns the value of theallowInsecureProductionTransportrecord component.- Returns:
- the value of the
allowInsecureProductionTransportrecord component
-
maxInboundMessageBytes
public int maxInboundMessageBytes()Returns the value of themaxInboundMessageBytesrecord component.- Returns:
- the value of the
maxInboundMessageBytesrecord component
-
maxOutboundMessageBytes
public int maxOutboundMessageBytes()Returns the value of themaxOutboundMessageBytesrecord component.- Returns:
- the value of the
maxOutboundMessageBytesrecord component
-
maxConcurrentInvocations
public int maxConcurrentInvocations()Returns the value of themaxConcurrentInvocationsrecord component.- Returns:
- the value of the
maxConcurrentInvocationsrecord component
-
adminDeadline
Returns the value of theadminDeadlinerecord component.- Returns:
- the value of the
adminDeadlinerecord component
-
credentialProvider
Returns the value of thecredentialProviderrecord component.- Returns:
- the value of the
credentialProviderrecord component
-
replayProtectionEnabled
public boolean replayProtectionEnabled()Returns the value of thereplayProtectionEnabledrecord component.- Returns:
- the value of the
replayProtectionEnabledrecord component
-
allowedClockSkew
Returns the value of theallowedClockSkewrecord component.- Returns:
- the value of the
allowedClockSkewrecord component
-
maxReplayEntries
public int maxReplayEntries()Returns the value of themaxReplayEntriesrecord component.- Returns:
- the value of the
maxReplayEntriesrecord component
-
strictRegistryTrust
public boolean strictRegistryTrust()Returns the value of thestrictRegistryTrustrecord component.- Returns:
- the value of the
strictRegistryTrustrecord component
-
resourcePolicy
Returns the value of theresourcePolicyrecord component.- Returns:
- the value of the
resourcePolicyrecord component
-