Enum Class SecurityMode
- All Implemented Interfaces:
Serializable, Comparable<SecurityMode>, Constable
Defines security modes for expression evaluation and similar features.
- RESTRICTED: Safe-by-default mode. Disables risky capabilities (type lookup, bean resolution, constructor invocation, unrestricted static access) and allows only whitelisted/custom functions and safe instance method/property access.
- PERMISSIVE: Enables full SpEL capabilities (as provided by the configured evaluation context factory) intended only for trusted templates.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents the permissive security mode that enables full SpEL (Spring Expression Language) capabilities as provided by the configured evaluation context factory.Represents the safe-by-default security mode in which potentially risky features such as type lookup, bean resolution, constructor invocations, and unrestricted static access are disabled. -
Method Summary
Modifier and TypeMethodDescriptionstatic SecurityModeReturns the enum constant of this class with the specified name.static SecurityMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RESTRICTED
Represents the safe-by-default security mode in which potentially risky features such as type lookup, bean resolution, constructor invocations, and unrestricted static access are disabled.
This mode enforces security and allows only whitelisted/custom functions, as well as safe instance method and property access during expression evaluation. It is recommended for scenarios involving untrusted templates.
-
PERMISSIVE
Represents the permissive security mode that enables full SpEL (Spring Expression Language) capabilities as provided by the configured evaluation context factory.
This mode allows potentially risky features such as type lookup, bean resolution, constructor invocation, and unrestricted static access. It is intended exclusively for use with trusted templates where security concerns are not a primary issue.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-