Record Class EnvironmentPolicy
java.lang.Object
java.lang.Record
org.j7m.middleware.api.isolation.EnvironmentPolicy
- Record Components:
denyAllByDefault- whether unmatched variables are deniedmaxVariableLength- maximum value lengthmaxEnvironmentBytes- maximum aggregate environment bytesrules- ordered immutable variable rules
public record EnvironmentPolicy(boolean denyAllByDefault, int maxVariableLength, int maxEnvironmentBytes, List<EnvironmentVariableRule> rules)
extends Record
Environment exposure policy.
Providers must redact environment values by default in status, evidence, audit, exception messages, and demo output. The policy controls what values are passed to child processes or exposed through J7M-provided environment capabilities.
-
Constructor Summary
ConstructorsConstructorDescriptionEnvironmentPolicy(boolean denyAllByDefault, int maxVariableLength, int maxEnvironmentBytes, List<EnvironmentVariableRule> rules) Creates a validated environment policy. -
Method Summary
Modifier and TypeMethodDescriptionstatic EnvironmentPolicydenyAll()Creates a deny-all environment policy.booleanReturns the value of thedenyAllByDefaultrecord 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 themaxEnvironmentBytesrecord component.intReturns the value of themaxVariableLengthrecord component.rules()Returns the value of therulesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EnvironmentPolicy
public EnvironmentPolicy(boolean denyAllByDefault, int maxVariableLength, int maxEnvironmentBytes, List<EnvironmentVariableRule> rules) Creates a validated environment policy.
-
-
Method Details
-
denyAll
Creates a deny-all environment policy.- Returns:
- deny-all policy
-
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. -
denyAllByDefault
public boolean denyAllByDefault()Returns the value of thedenyAllByDefaultrecord component.- Returns:
- the value of the
denyAllByDefaultrecord component
-
maxVariableLength
public int maxVariableLength()Returns the value of themaxVariableLengthrecord component.- Returns:
- the value of the
maxVariableLengthrecord component
-
maxEnvironmentBytes
public int maxEnvironmentBytes()Returns the value of themaxEnvironmentBytesrecord component.- Returns:
- the value of the
maxEnvironmentBytesrecord component
-
rules
-