【问题标题】:ActiveMQ run in FIPS modeActiveMQ 在 FIPS 模式下运行
【发布时间】:2023-04-03 02:48:01
【问题描述】:

我正在使用 ActiveMQ 5.14 我的 ssl 配置是:

<sslContext>
        <sslContext keyStore="file:${activemq.base}/conf/keystore/activemq/activemq.bcfks" keyStorePassword="password" keyStoreType="BCFKS" 
              trustStore="file:${activemq.base}/conf/keystore/activemq/cacerts.bcfks" trustStorePassword="password" trustStoreType="BCFKS" />
    </sslContext>

我们的 JVM 配置为 FIPS 模式:

security.provider.4=com.safelogic.cryptocomply.jcajce.provider.CryptoComplyFipsProvider
security.provider.5=com.sun.net.ssl.internal.ssl.Provider CCJ

如果 FIPS 模式处于 ActiveMQ 启动失败并出现错误:

Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Invocation of init method failed; nested exception is java.io.IOException: Transport Connector could not be registered in JMX: java.io.IOException: FIPS mode: SecureRandom must be from provider CCJ | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main

我尝试使用 Spring spel 初始化secureRandom: secureRandom="#{T(java.security.SecureRandom).getInstance('DEFAULT','CCJ')}" -

secureRandom="CCJ"

没用!!! 如何强制 SecureRandom 提供程序来自类型“CCJ”

谢谢,

【问题讨论】:

    标签: java spring activemq bouncycastle fips


    【解决方案1】:

    activemq.xml 中的以下配置在我使用 AMQ 5.15.0 和 CCJ 时对我有用:

    <sslContext>
       <sslContext 
            keyStore="file:${activemq.conf}/broker.ks" 
            keyStorePassword="123456" 
            keyStoreType="BCFKS" 
            trustStore="file:${activemq.conf}/broker.ts" 
            trustStorePassword="123456" 
            trustStoreType="BCFKS" 
            secureRandomAlgorithm="DEFAULT" />
    </sslContext>
    

    当我将具有 CCJ 值的 XML 属性“provider”添加到 sslContext 时,它也对我有用:

    <sslContext>
       <sslContext 
            keyStore="file:${activemq.conf}/broker.ks" 
            keyStorePassword="123456" 
            keyStoreType="BCFKS" 
            trustStore="file:${activemq.conf}/broker.ts" 
            trustStorePassword="123456" 
            trustStoreType="BCFKS" 
            secureRandomAlgorithm="DEFAULT" 
            **provider="CCJ"**/>
    </sslContext>
    

    【讨论】:

      猜你喜欢
      • 2018-02-06
      • 1970-01-01
      • 2020-10-19
      • 1970-01-01
      • 2016-04-11
      • 1970-01-01
      • 2020-08-20
      • 1970-01-01
      • 2021-10-30
      相关资源
      最近更新 更多