tomcat - Apache tomcat 相互认证自签名证书 REST 服务

标签 tomcat ssl https x509certificate mutual-authentication

我想在 Apache Tomcat 上部署我的 REST 服务(war),希望它使用自签名证书和相互身份验证启用 HTTPS。我需要想出一个使用自签名证书的客户端。我希望客户端和服务器交换它们的证书。

我需要关于如何做到这一点的建议。

最佳答案

满足您所有需要的 tomcat 连接器配置,通常如下所示

<Connector SSLEnabled="true" clientAuth="want" connectionTimeout="20000"  
keystoreFile="C:\\Users\\tomcat.keystore" keystorePass="changeit"
keystoreType="JKS" maxThreads="150" port="8443" protocol="org.apache.coyote.http11.Http11Protocol"  
scheme="https" secure="true" sslProtocol="TLS" truststoreFile="C:\\Users
\\tomcat.truststore" truststorePass="changeit" truststoreType="JKS"/>

此链接将非常全面地理解术语 http://tomcat.apache.org/tomcat-7.0-doc/config/http.html

从您的应用程序角度来看,您的应用程序应该接受 https 连接,应该能够允许使用证书进行客户端身份验证。

希望这能给你一些提示!

关于tomcat - Apache tomcat 相互认证自签名证书 REST 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23839446/

相关文章:

http - 使用自签名证书进行 Windows Phone HTTPS(HTTP over SSL)通信

apache - 通配符证书对 mydomain.com 无效

nginx - 为什么Docker https-portal的 “See It Work”部分给我一个 “port 443: Connection refused”错误?

java - 找不到该类的实体元数据

java - 使用负载均衡器进行 SSL 卸载

java - Tomcat 部署中与 Spring 持久性相关的错误

ajax - 重复的 "Access-Control-Allow-Origin: *" header 会破坏 CORS 吗?

java - 为什么 Tomcat 使用反射来实现 Catalina 实例化

asp.net - Windows Azure VM SSL 和 Cloudapp.net

ssl - Jetty 主页/安装中的 keystore 文件是什么?