WebSphere Application Server service integration bus 消息传递引擎的安全连接

要使 XMS .NET 应用程序能够与 WebSphere® Application Server service integration bus 消息传递引擎建立安全连接,必须在 ConnectionFactory 对象中定义相关属性。

XMS 为连接 提供SSL和 WebSphere Application Server service integration busHTTPS 支持。 SSL 和 HTTPS 提供安全连接以便进行认证和确保机密性。

WebSphere 安全性一样,根据 JSSE 安全性标准和命名约定配置 XMS 安全性,其中包括使用 CipherSuites 来指定协商安全连接时使用的算法。 在加密协商中使用的协议可以是 SSL 或 TLS,这取决于您在 ConnectionFactory 对象中指定的 CipherSuite。

表 1 列出了必须在 ConnectionFactory 对象中定义的属性。
表 1. 与 WebSphere Application Server service integration bus 消息传递引擎的安全连接的 ConnectionFactory 属性
属性的名称 描述
XMSC_WPM_SSL_CIPHER_SUITE 要在与 WebSphere Application Server service integration bus 消息传递引擎的 TLS 连接上使用的 CipherSuite 的名称。 协商安全连接时使用的协议取决于指定的 CipherSuite。
XMSC_WPM_SSL_KEYRING_LABEL 向服务器进行认证时要使用的证书。
以下是用于与 WebSphere Application Server service integration bus 消息传递引擎进行安全连接的 ConnectionFactory 属性示例:
cf.setStringProperty(XMSC_WPM_PROVIDER_ENDPOINTS, host_name:port_number:chain_name);
cf.setStringProperty(XMSC_WPM_SSL_KEY_REPOSITORY, key_repository_pathname); 
cf.setStringProperty(XMSC_WPM_TARGET_TRANSPORT_CHAIN, transport_chain); 
cf.setStringProperty(XMSC_WPM_SSL_CIPHER_SUITE, cipher_suite);
cf.setStringProperty(XMSC_WPM_SSL_KEYRING_STASH_FILE, stash_file_pathname);
其中,应将 chain_name 设置为 BootstrapTunneledSecureMessaging 或 BootstrapSecureMessaging,port_number 是引导程序服务器侦听入局请求时所使用的端口号。

以下是与插入了样本值的 WebSphere Application Server service integration bus 消息传递引擎的安全连接的 ConnectionFactory 属性示例:

  /* CF properties needed for an SSL connection */
    cf.setStringProperty(XMSC_WPM_PROVIDER_ENDPOINTS,"localhost:7286:BootstrapSecureMessaging");
    cf.setStringProperty(XMSC_WPM_TARGET_TRANSPORT_CHAIN,"InboundSecureMessaging");    
    cf.setStringProperty(XMSC_WPM_SSL_KEY_REPOSITORY,"C:\\Program Files\\IBM\\gsk7\\bin\\XMSkey.kdb");    
    cf.setStringProperty(XMSC_WPM_SSL_KEYRING_STASH_FILE,"C:\\Program Files\\IBM\\gsk7\\bin\\XMSkey.sth");
    cf.setStringProperty(XMSC_WPM_SSL_CIPHER_SUITE,"SSL_RSA_EXPORT_WITH_RC4_40_MD5");