JiriOndrusek opened a new issue, #9333:
URL: https://github.com/apache/camel-quarkus/issues/9333

   ### Bug description
   
   Since the upgrade to quarkus-cxf 3.40.2 (4764534fdf60), WS-Security fails on 
FIPS, e.g. `CxfWssSecurityPolicyServerTest` in `cxf-soap-ws-security-server`:
   
   ```
   org.jasypt.exceptions.EncryptionInitializationException: 
java.security.NoSuchAlgorithmException: SHA1PRNG SecureRandom not available
       at org.jasypt.iv.RandomIvGenerator.<init>(RandomIvGenerator.java:74)
       at 
org.apache.wss4j.common.crypto.JasyptPasswordEncryptor.configureGenerators(JasyptPasswordEncryptor.java:110)
       at 
org.apache.wss4j.dom.handler.WSHandler.getPasswordEncryptor(WSHandler.java:1175)
       at 
org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JInInterceptor.getEncryptionCrypto(PolicyBasedWSS4JInInterceptor.java:412)
   ```
   
   **Cause:** quarkus-cxf 3.40.2 brings WSS4J 4.0.2. Its change WSS-729 
(apache/ws-wss4j@b1f77e8da6) makes `JasyptPasswordEncryptor` create a 
`SHA1PRNG` generator in its constructor, unless `-Dfips.enabled=true` is set. 
The FIPS JDK has no `SHA1PRNG`. CXF creates this encryptor for incoming 
signed/encrypted messages with a callback handler.
   
   **Workarounds:**
   - `-Dfips.enabled=true`. CXF's `CustomAlgorithmSuite` then defaults to 
RSA-OAEP key wrap, which the Red Hat FIPS JDK lacks, so the tests also need RSA 
1.5 set explicitly (PR to follow).
   - or `-Dorg.apache.wss4j.crypto.jasypt.useLegacyDefaultAlgorithm=true` 
(restores the WSS4J 4.0.1 behaviour).
   
   The proper fix belongs in WSS4J.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to