Web services 如何在DominoWeb服务使用者中使用TLS和SHA-2证书

Web services 如何在DominoWeb服务使用者中使用TLS和SHA-2证书,web-services,lotus-domino,Web Services,Lotus Domino,和其他许多人一样,我们也被IBMDomino中缺少TLS和SHA-2支持所困扰 我们的应用程序严重依赖于使用需要使用证书进行身份验证的web服务。直到上周,一切都很顺利。然后,其中一个提供商开始请求SHA-2证书进行身份验证,另一个提供商开始请求TLS而不是SSS v3 我们当前的解决方案使用Java web消费者,与此类似: ServiceBinding stub = new ServiceLocator().getWebService(portAddress); stub.setSSLOpt

和其他许多人一样,我们也被IBMDomino中缺少TLS和SHA-2支持所困扰

我们的应用程序严重依赖于使用需要使用证书进行身份验证的web服务。直到上周,一切都很顺利。然后,其中一个提供商开始请求SHA-2证书进行身份验证,另一个提供商开始请求TLS而不是SSS v3

我们当前的解决方案使用Java web消费者,与此类似:

ServiceBinding stub = new ServiceLocator().getWebService(portAddress);
stub.setSSLOptions(PortTypeBase.NOTES_SSL_SEND_CLIENT_CERT + PortTypeBase.NOTES_SSL_ACCEPT_SITE_CERTS);
证书保存在服务器的密钥环中

我们如何将SHA-2证书和TLS用于Domino web消费者

我尝试在Java信任库/密钥库中导入证书,并使用如下代码:

System.setProperty("javax.net.ssl.keyStore", "/path/to/keystore");
System.setProperty("javax.net.ssl.keyStorePassword", "pwd);
System.setProperty("javax.net.ssl.trustStore", "/path/to/truststore");
System.setProperty("javax.net.ssl.trustStorePassword", "pwd");
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
<VirtualHost *:8443>
    # Turn off forward proxy
    ProxyRequests Off

    # Communication with Domino is using SSL, so we need SSL support   
    SSLEngine On
    SSLCertificateFile /etc/pki/tls/certs/localhost.crt
    SSLCertificateKeyFile /etc/pki/tls/private/localhost.key

    # This is necessary for authentication to work.
    SSLProxyEngine On
    # This is Domino certificate including private key saved as unecrypted pem file.
    SSLProxyMachineCertificateFile /etc/httpd/certs/domino-cert.pem
    # This is list of CA certificates necessary to authenticate the provider.
    SSLProxyCACertificateFile /etc/httpd/certs/provider-cert.pem

    # Redirection rules are in this case very simple - redirect everything that comes
    # to the proxy to the web service provider address.
    ProxyPass / https://ws.provider.com/
    ProxyPassReverse / https://ws.provider.com/

    # Allow only connections from Intranet.
    <Proxy *>
        Order deny,allow
        Deny from all
        Allow from 172.20.20.0/24
    </Proxy>
</VirtualHost>
但它似乎不起作用。我仍在调试代码,以便找到确切的原因

但是如何处理TLS呢?是否可以使用Apache/Nginx作为web服务身份验证的某种代理

或者,我们唯一的选择是将web服务使用者编写为独立的Java应用程序,并从Notes调用它们

谢谢


Sasa

SHA2可以工作,但用于Windows和Unix的TLS使用提示 我想在Poodle TLS的上下文中,SHA-2并不重要,但无论如何,这里是如何让SHA-2在没有IBMHTTP的情况下与Domino9一起工作的。 只有SHA-2无法解决TLS问题。 对于Windows,使用IHS集成 对于unix,请查看此链接

问候
Mats

我们能够通过使用Apache反向代理解决SHA-2和TLS问题。我们第一次尝试使用转发代理,但没有成功

在工作解决方案中,我们的dominoweb服务消费者首先使用SSL联系Apache反向代理,但不进行任何身份验证。然后Apache使用Domino以前使用的证书联系web服务提供商

在Apache和web服务提供商完成握手和身份验证之后,Domino中的web服务消费者就可以免费完成自己的工作了

事实证明,设置起来相当容易。您需要一个Apache服务器(显然),我们在CentOS虚拟机中安装了我们的服务器

您需要进行的配置非常简单,如下所示:

System.setProperty("javax.net.ssl.keyStore", "/path/to/keystore");
System.setProperty("javax.net.ssl.keyStorePassword", "pwd);
System.setProperty("javax.net.ssl.trustStore", "/path/to/truststore");
System.setProperty("javax.net.ssl.trustStorePassword", "pwd");
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
<VirtualHost *:8443>
    # Turn off forward proxy
    ProxyRequests Off

    # Communication with Domino is using SSL, so we need SSL support   
    SSLEngine On
    SSLCertificateFile /etc/pki/tls/certs/localhost.crt
    SSLCertificateKeyFile /etc/pki/tls/private/localhost.key

    # This is necessary for authentication to work.
    SSLProxyEngine On
    # This is Domino certificate including private key saved as unecrypted pem file.
    SSLProxyMachineCertificateFile /etc/httpd/certs/domino-cert.pem
    # This is list of CA certificates necessary to authenticate the provider.
    SSLProxyCACertificateFile /etc/httpd/certs/provider-cert.pem

    # Redirection rules are in this case very simple - redirect everything that comes
    # to the proxy to the web service provider address.
    ProxyPass / https://ws.provider.com/
    ProxyPassReverse / https://ws.provider.com/

    # Allow only connections from Intranet.
    <Proxy *>
        Order deny,allow
        Deny from all
        Allow from 172.20.20.0/24
    </Proxy>
</VirtualHost>

#关闭转发代理
代理请求关闭
#与Domino的通信使用SSL,因此我们需要SSL支持
斯伦金安
SSLCertificateFile/etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile/etc/pki/tls/private/localhost.key
#这是认证工作所必需的。
SSLProxyEngine打开
#这是Domino证书,包括保存为未加密pem文件的私钥。
SSLProxyMachineCertificateFile/etc/httpd/certs/domino-cert.pem
#这是验证提供程序所需的CA证书列表。
sslproxy证书文件/etc/httpd/certs/provider-cert.pem
#在这种情况下,重定向规则非常简单-重定向所有出现的内容
#到web服务提供商地址的代理。
ProxyPass/https://ws.provider.com/
ProxyPassReverse/https://ws.provider.com/
#仅允许从Intranet进行连接。
命令拒绝,允许
全盘否定
允许从172.20.20.0/24开始
这里只提几件事:

  • 您应该能够使用Apache默认安装的证书和密钥,因为它们只用于保护Domino和代理之间的通信
  • Domino密钥和证书必须采用未加密的pem格式。如有必要,使用openssl进行转换。如果您收到关于丢失或加密私钥的错误消息,请打开您的pem证书并确认它在
    ----开始RSA私钥------
    ----结束RSA私钥------
    行中包含
    。openssl有时在没有RSA的情况下生成证书,然后Apache将无法使用它
Apache配置到此结束。剩下的唯一一件事就是修改web服务使用者——在代码中找到设置端点地址的行,类似于
https://ws.provider.com/ws/getTemperature
并将其更改为
https://proxy.mycompany.com:8443/ws/getTemperature


就这样。我们现在有了一个工作解决方案,可以将DominoWeb服务与TLS和SHA-2证书一起使用。我们可以冷静地等待IBM在Domino中实现对此的支持。

您可以避免更改地址以使用不同的端口

我解决这个问题的方法是使用安装在Domino9服务器上的IBMHTTPServer(IHS)(您必须从自定义安装屏幕中选择IBMHTTPServer)。IHS是Apache的一个版本,带有Domino HTTP处理程序。您可以在IHS/Apache服务器上安装TLS证书,并动态代理Domino服务器。所以你甚至不需要改变你的网址

以下是IBM提供的一些说明:

它向您展示了如何使用IKEYMAN创建签名请求(csr)并将证书存储在Domino中

在domino\ihs\conf\domino.conf文件中,通过取消注释行进行编辑,如下所示,并添加VirtualHost节点:

# IPv4 support:
Listen 0.0.0.0:80
# Uncomment the following line for IPv6 support on Windows XP or Windows
# 2003 or later. Windows IPv6 networking must be configured first.
# Listen [::]:80
...
Listen 0.0.0.0:443
## IPv6 support:
#Listen [::]:443

#default vhost for Domino HTTP:
<VirtualHost *:80>
  ServerName "${DOMINO_SERVER_NAME}"
  DocumentRoot "${DOMINO_DOCUMENT_ROOT}"      
</VirtualHost> 

<VirtualHost *:443>
  ServerName "${DOMINO_SERVER_NAME}"
  DocumentRoot "${DOMINO_DOCUMENT_ROOT}"
  SSLEnable
  #SSLProtocolDisable SSLv2
  #SSLProtocolDisable SSLv3
</VirtualHost>
KeyFile d:/keys/myserver.kdb
SSLDisable
#
#IPv4支持:
听0.0.0.0:80
#为Windows XP或Windows上的IPv6支持取消注释以下行
#2003年或以后。必须首先配置Windows IPv6网络。
#听[:]:80
...
听0.0.0.0:443
##IPv6支持:
#听[:]:443
#Domino HTTP的默认vhost:
服务器名称“${DOMINO_服务器名称}”
DocumentRoot“${DOMINO_DOCUMENT_ROOT}”
服务器名称“${DOMINO_服务器名称}”
DocumentRoot“${DOMINO_DOCUMENT_ROOT}”
可耻的
#SSLProtocolidable SSLv2
#SSLProtocolidable SSLv3
KeyFile d:/keys/myserver.kdb
可折叠
#
当所有domino.conf修改完成后,请记住向notes.ini添加
HTTPIHSEnabled=1
。然后观察Domino控制台在HTTP启动过程中由于Domino.conf而出现的任何错误。您还可以添加
HTTPIHSDebugStartup=1
t