Package org.mule.soap.api.security
Class WssDecryptSecurityStrategy
java.lang.Object
org.mule.soap.api.security.WssDecryptSecurityStrategy
- All Implemented Interfaces:
SecurityStrategy
Decrypts an encrypted SOAP response, using the private key of the key-store in the provided TLS context.
FIPS mode is determined exclusively from mule.security.model (if it starts with fips140-). When FIPS is
detected, this class sets fips.enabled=true so that WSS4J (WSS-711) and other components see the same mode. In FIPS
mode, RSA 1.5 key transport is not allowed by default (only RSA-OAEP); this can be overridden by setting the system property
mule.soap.security.allowRsa15InFips=true for legacy interoperability (not recommended).
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mule.soap.api.security.SecurityStrategy
SecurityStrategy.SecurityStrategyType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSystem property to allow RSA 1.5 key transport even in FIPS mode. -
Constructor Summary
ConstructorsConstructorDescriptionWssDecryptSecurityStrategy(WssKeyStoreConfiguration keyStoreConfiguration) Creates a decrypt strategy. -
Method Summary
Modifier and TypeMethodDescriptionGives the option to return a customWSPasswordCallbackHandlerinstance allowing to compose many password handlers from different security strategies.Returns a set of properties to be set on the SOAP request interceptors (OUT interceptors) in order to appliesthissecurity strategy.static booleanDetermines if the runtime is in FIPS mode.static voidClears the cached FIPS mode so that the next construction of aWssDecryptSecurityStrategywill re-readmule.security.model.Returns the security action name that is going to be executed in the request phase (OUT interceptors).Returns the type of the security strategy, if applies for the request or the response.
-
Field Details
-
ALLOW_RSA15_IN_FIPS_PROPERTY
System property to allow RSA 1.5 key transport even in FIPS mode. This is not FIPS 140-3 compliant and should only be used for legacy interoperability during migration. The underlying crypto provider may still reject the algorithm.- See Also:
-
-
Constructor Details
-
WssDecryptSecurityStrategy
Creates a decrypt strategy. RSA 1.5 key transport is allowed or not according to FIPS mode, which is determined exclusively frommule.security.model(prefixfips140-). In FIPS mode, RSA 1.5 is disabled by default but can be forced viaALLOW_RSA15_IN_FIPS_PROPERTY.
-
-
Method Details
-
resetFIPSModeCache
public static void resetFIPSModeCache()Clears the cached FIPS mode so that the next construction of aWssDecryptSecurityStrategywill re-readmule.security.model. Primarily for tests that need to simulate different environments (FIPS vs non-FIPS) in the same JVM. -
isFIPSMode
public static boolean isFIPSMode()Determines if the runtime is in FIPS mode. Usesmule.security.modelas the single source of truth (values starting withfips140-). When FIPS is detected, also setsfips.enabled=trueso WSS4J (WSS-711) and other libraries see the same mode. Thefips.enabledproperty alone is not considered a valid source of truth for FIPS mode detection. Result is cached. No reflection; safe with any WSS4J version.- Returns:
- true if FIPS mode is enabled, false otherwise
-
securityType
Description copied from interface:SecurityStrategyReturns the type of the security strategy, if applies for the request or the response.- Specified by:
securityTypein interfaceSecurityStrategy- Returns:
- whether is the security strategy applies for the request or the response.
-
securityAction
Description copied from interface:SecurityStrategyReturns the security action name that is going to be executed in the request phase (OUT interceptors).- Specified by:
securityActionin interfaceSecurityStrategy- Returns:
- the request action name of
thissecurity strategy.
-
buildPasswordCallbackHandler
Description copied from interface:SecurityStrategyGives the option to return a customWSPasswordCallbackHandlerinstance allowing to compose many password handlers from different security strategies.- Specified by:
buildPasswordCallbackHandlerin interfaceSecurityStrategy- Returns:
- an optional
WSPasswordCallbackHandlerto be added to the composite callback handler.
-
buildSecurityProperties
Description copied from interface:SecurityStrategyReturns a set of properties to be set on the SOAP request interceptors (OUT interceptors) in order to appliesthissecurity strategy.- Specified by:
buildSecurityPropertiesin interfaceSecurityStrategy- Returns:
- a
Mapwith the properties required to apply the security strategy.
-