我在Openshift上运行的Tomcat 7上部署了一个Web应用程序。 我设法启用服务器上的HTTP到HTTPSredirect( 指令 )。
我没有有效的证书。 所以我必须使用原始的URL https://foo-bar.rhcloud.com (没有客户的URL)。
现在我想在我的应用程序中启用x509身份validation。 我知道如何在我的本地机器上使用Tomcat。 但在Openshift上的应用程序的HTTPS连接器被注释掉了。
我试图添加<login-config>到web.xml,但它没有工作(它没有问我的客户端证书)。 这是web.xmlconfiguration:
<security-constraint> <web-resource-collection> <web-resource-name>HTTPSOnly</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> <login-config> <auth-method>CLIENT-CERT</auth-method> </login-config>
问题:
1.如何启用x509身份validation?
2.由于我没有有效的客户端证书,我如何指定Tomcat的可信密钥库?
提前致谢。