Class FipsPasswordEncryptor

java.lang.Object
org.mule.soap.internal.security.FipsPasswordEncryptor
All Implemented Interfaces:
org.apache.wss4j.common.crypto.PasswordEncryptor

public final class FipsPasswordEncryptor extends Object implements org.apache.wss4j.common.crypto.PasswordEncryptor
A FIPS-compatible PasswordEncryptor that replaces WSS4J's default JasyptPasswordEncryptor.

WSS4J 4.0.0's JasyptPasswordEncryptor hardcodes new RandomSaltGenerator("PKCS11") when FIPS is enabled, which fails in environments that use Bouncy Castle FIPS (BCFIPS) instead of a PKCS11 provider. This implementation uses the JVM's default SecureRandom (which delegates to whichever FIPS provider is registered) instead of requesting the PKCS11 algorithm explicitly.

Since:
2.4.0
  • Constructor Details

    • FipsPasswordEncryptor

      public FipsPasswordEncryptor(CallbackHandler callbackHandler)
  • Method Details

    • encrypt

      public String encrypt(String password)
      Specified by:
      encrypt in interface org.apache.wss4j.common.crypto.PasswordEncryptor
    • decrypt

      public String decrypt(String encryptedPassword)
      Specified by:
      decrypt in interface org.apache.wss4j.common.crypto.PasswordEncryptor