1 路 SSL 与 MQIPT 和 tomcat docker
1 way SSL with MQIPT and tomcat docker
我正在尝试连接到启用了 1 种方式的 SSL 的 MQIPT。下面是我的 spring 配置
<bean id="connectionFactory"
class="org.springframework.jms.connection.SingleConnectionFactory">
<property name="targetConnectionFactory">
<ref bean="mqQueueConnectionFactory" />
</property>
</bean>
<bean id="mqQueueConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="hostName" value="xx.xx.xx.xx" />
<property name="port" value="xxxx" />
<property name="queueManager" value="QM" />
<property name="transportType" value="1" />
<property name="channel" value="SSL.CHNL" />
<property name="SSLCipherSuite" value="SSL_RSA_WITH_AES_256_CBC_SHA"/>
</bean>
<bean id="destination" class="com.ibm.mq.jms.MQQueue">
<constructor-arg value="SANDBOX_Q" />
<property name="baseQueueManagerName">
<value>QM</value>
</property>
<property name="baseQueueName">
<value>QUEUE</value>
</property>
</bean>
我将证书添加到信任库并在 tomcat 启动时设置标志 -Dcom.ibm.mq.cfg.useIBMCipherMappings=false。在 MQIPT 密码套件中设置为 SSL_RSA_WITH_AES_256_CBC_SHA。我收到以下错误
MQ Exception:: Uncategorized exception occured during JMS processing; nested exception is com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ0018: Failed to connect to queue manager 'QM' with connection mode 'Client' and host name 'null'. .... Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2400' ('MQRC_UNSUPPORTED_CIPHER_SUITE').
我正在使用 JDK 8 和 MQ 客户端 jar 版本 8。
如果您使用的是 Oracle JRE,则需要根据 IBM MQ V8 知识中心页面“SSL/TLS CipherSpecs and CipherSuites in IBM MQ classes for JMS”
中的 table 指定 SSLCipherSuite
CipherSpec |Equivalent CipherSuite (IBM JRE)|Equivalent CipherSuite (Oracle JRE)
-------------------------------------------------------------------------------------------------
TLS_RSA_WITH_AES_256_CBC_SHA| SSL_RSA_WITH_AES_256_CBC_SHA |TLS_RSA_WITH_AES_256_CBC_SHA
根据以上内容,如果使用 IBM JRE 的 MQIPT 指定 SSL_RSA_WITH_AES_256_CBC_SHA
,则意味着队列管理器上的 SVRCONN 通道应指定 TLS_RSA_WITH_AES_256_CBC_SHA
,而 Oracle JRE 应指定 [=14] =] 也应该指定 TLS_RSA_WITH_AES_256_CBC_SHA
。
总结,将您的 Spring 配置更改为:
<property name="SSLCipherSuite" value="TLS_RSA_WITH_AES_256_CBC_SHA"/>
我正在尝试连接到启用了 1 种方式的 SSL 的 MQIPT。下面是我的 spring 配置
<bean id="connectionFactory"
class="org.springframework.jms.connection.SingleConnectionFactory">
<property name="targetConnectionFactory">
<ref bean="mqQueueConnectionFactory" />
</property>
</bean>
<bean id="mqQueueConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="hostName" value="xx.xx.xx.xx" />
<property name="port" value="xxxx" />
<property name="queueManager" value="QM" />
<property name="transportType" value="1" />
<property name="channel" value="SSL.CHNL" />
<property name="SSLCipherSuite" value="SSL_RSA_WITH_AES_256_CBC_SHA"/>
</bean>
<bean id="destination" class="com.ibm.mq.jms.MQQueue">
<constructor-arg value="SANDBOX_Q" />
<property name="baseQueueManagerName">
<value>QM</value>
</property>
<property name="baseQueueName">
<value>QUEUE</value>
</property>
</bean>
我将证书添加到信任库并在 tomcat 启动时设置标志 -Dcom.ibm.mq.cfg.useIBMCipherMappings=false。在 MQIPT 密码套件中设置为 SSL_RSA_WITH_AES_256_CBC_SHA。我收到以下错误
MQ Exception:: Uncategorized exception occured during JMS processing; nested exception is com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ0018: Failed to connect to queue manager 'QM' with connection mode 'Client' and host name 'null'. .... Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2400' ('MQRC_UNSUPPORTED_CIPHER_SUITE').
我正在使用 JDK 8 和 MQ 客户端 jar 版本 8。
如果您使用的是 Oracle JRE,则需要根据 IBM MQ V8 知识中心页面“SSL/TLS CipherSpecs and CipherSuites in IBM MQ classes for JMS”
中的 table 指定 SSLCipherSuiteCipherSpec |Equivalent CipherSuite (IBM JRE)|Equivalent CipherSuite (Oracle JRE)
-------------------------------------------------------------------------------------------------
TLS_RSA_WITH_AES_256_CBC_SHA| SSL_RSA_WITH_AES_256_CBC_SHA |TLS_RSA_WITH_AES_256_CBC_SHA
根据以上内容,如果使用 IBM JRE 的 MQIPT 指定 SSL_RSA_WITH_AES_256_CBC_SHA
,则意味着队列管理器上的 SVRCONN 通道应指定 TLS_RSA_WITH_AES_256_CBC_SHA
,而 Oracle JRE 应指定 [=14] =] 也应该指定 TLS_RSA_WITH_AES_256_CBC_SHA
。
总结,将您的 Spring 配置更改为:
<property name="SSLCipherSuite" value="TLS_RSA_WITH_AES_256_CBC_SHA"/>