Class WssKeyStoreConfiguration
java.lang.Object
org.mule.soap.api.security.stores.WssKeyStoreConfiguration
- All Implemented Interfaces:
WssStoreConfiguration
Default
WssStoreConfiguration implementation for Key Stores, used for WS-Security encryption, decryption and signing.
The keystore type (e.g. JKS, BCFKS) is passed through to WSS4J/Merlin; for FIPS environments use type "BCFKS" via the
five-argument constructor.- Since:
- 1.0
-
Field Summary
Fields inherited from interface org.mule.soap.api.security.stores.WssStoreConfiguration
MERLIN_PROP_PREFIX, WS_CRYPTO_PROVIDER_KEY, WSS4J_PROP_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionWssKeyStoreConfiguration(String alias, String password, String keyStorePath) Creates a key store configuration with default type"JKS".WssKeyStoreConfiguration(String alias, String password, String keyStorePath, String keyPassword, String type) Creates a key store configuration with explicit type (e.g. -
Method Summary
Modifier and TypeMethodDescriptiongetAlias()Returns the alias of the key entry used for signing, encryption or decryption.Returns the password for the private key entry, ornullif the same as the keystore password.Returns the path or classpath resource to the keystore file.Returns the keystore password.getType()Returns the keystore type (e.g.
-
Constructor Details
-
WssKeyStoreConfiguration
public WssKeyStoreConfiguration(String alias, String password, String keyStorePath, String keyPassword, String type) Creates a key store configuration with explicit type (e.g."JKS"or"BCFKS"). Use this constructor for FIPS environments, passing"BCFKS"and the path to a BCFKS keystore.- Parameters:
alias- alias of the key entry to use for signing/encryption/decryptionpassword- keystore passwordkeyStorePath- path or classpath resource to the keystore filekeyPassword- password for the private key entry (may be null if same as keystore password)type- keystore type as accepted byKeyStore.getInstance(String)(e.g."JKS","BCFKS")
-
WssKeyStoreConfiguration
Creates a key store configuration with default type"JKS". For FIPS environments use the five-argument constructor with type"BCFKS".- Parameters:
alias- alias of the key entry to use for signing/encryption/decryptionpassword- keystore password (and key password if not specified separately)keyStorePath- path or classpath resource to the keystore file
-
-
Method Details
-
getConfigurationProperties
Returns properties for WSS4J Merlin (keystore path, type, alias, passwords).
- Specified by:
getConfigurationPropertiesin interfaceWssStoreConfiguration- Returns:
- a set of
Propertiesto configure aSecurityStrategy.
-
getKeyPassword
Returns the password for the private key entry, ornullif the same as the keystore password.- Returns:
- the key password, or null
-
getAlias
Returns the alias of the key entry used for signing, encryption or decryption.- Returns:
- the key alias
-
getPassword
Returns the keystore password.- Returns:
- the keystore password
-
getKeyStorePath
Returns the path or classpath resource to the keystore file.- Returns:
- the keystore path, or null
-
getType
Returns the keystore type (e.g."JKS","BCFKS").- Returns:
- the keystore type
-