【发布时间】:2016-12-25 04:38:03
【问题描述】:
我需要为 Web 服务 (SOAP) 应用 SSL“相互验证”,为网页应用“单向验证”以避免在浏览器中出现证书。作为参考,GUI 和 SOAP Web 服务在同一个 war 模块中。
我在 Tomcat 容器级别使用 SSL Mutual 身份验证:
<Connector port="8443" protocol="HTTP/1.1" connectionTimeout="20000"
SSLEnabled="true"
scheme="https"
secure="true"
clientAuth="true"
sslProtocol="TLS"
keystoreFile="D:\certificates\demo-keystore"
keystorePass="xxxxxxxx"
truststoreFile="D:\certificates\demo-truststore"
truststorePass="xxxxxxxx"/>
- clientAuth="true" 表示在接受连接之前,客户端(来自浏览器和 Web 服务使用者)应提供有效的证书链。我知道可以通过使用 clientAuth="false" 将 SSL 连接器配置为不需要来自客户端的证书链,然后使用 WSS4J 拦截器在消息级别应用 WS-Security 但我想知道是否还有另一个解决方案。
提前谢谢你。
【问题讨论】:
标签: java web-services ssl tomcat6