Class WssKeyStoreConfiguration

java.lang.Object
org.mule.soap.api.security.stores.WssKeyStoreConfiguration
All Implemented Interfaces:
WssStoreConfiguration

public class WssKeyStoreConfiguration extends Object implements 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
  • 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/decryption
      password - keystore password
      keyStorePath - path or classpath resource to the keystore file
      keyPassword - password for the private key entry (may be null if same as keystore password)
      type - keystore type as accepted by KeyStore.getInstance(String) (e.g. "JKS", "BCFKS")
    • WssKeyStoreConfiguration

      public WssKeyStoreConfiguration(String alias, String password, String keyStorePath)
      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/decryption
      password - keystore password (and key password if not specified separately)
      keyStorePath - path or classpath resource to the keystore file
  • Method Details

    • getConfigurationProperties

      public Properties getConfigurationProperties()

      Returns properties for WSS4J Merlin (keystore path, type, alias, passwords).

      Specified by:
      getConfigurationProperties in interface WssStoreConfiguration
      Returns:
      a set of Properties to configure a SecurityStrategy.
    • getKeyPassword

      public String getKeyPassword()
      Returns the password for the private key entry, or null if the same as the keystore password.
      Returns:
      the key password, or null
    • getAlias

      public String getAlias()
      Returns the alias of the key entry used for signing, encryption or decryption.
      Returns:
      the key alias
    • getPassword

      public String getPassword()
      Returns the keystore password.
      Returns:
      the keystore password
    • getKeyStorePath

      public String getKeyStorePath()
      Returns the path or classpath resource to the keystore file.
      Returns:
      the keystore path, or null
    • getType

      public String getType()
      Returns the keystore type (e.g. "JKS", "BCFKS").
      Returns:
      the keystore type