[英]mutual authentication using certificate
I have been developing a web application using java and I wanted to use implement mutual certificate authentication. 我一直在使用Java开发Web应用程序,并且想使用实现相互证书身份验证。
I used a self-signed certificate, I put it on my browser(chrome) and to my glassfish trust store(cacerts.jks) and configure my web.xml and sun-web.xml and works fine. 我使用了自签名证书,将其放在浏览器(chrome)上和我的glassfish信任库(cacerts.jks)中,并配置了web.xml和sun-web.xml并可以正常工作。
When I run the application it asked me to choose a certificate and after the proper authentication the page I requested is displayed. 当我运行该应用程序时,它要求我选择一个证书,并在进行正确的身份验证之后显示我请求的页面。
However I need to make different certificate(actually three) and based on the role I want to authorize the user. 但是,我需要制作不同的证书(实际上是三个),并且要基于我要授权用户的角色。
But even if I created other two certificates and added to the browser certificate list, the browser didn't list them on the certificate selection prompt except for the first certificate. 但是,即使我创建了另外两个证书并将其添加到浏览器证书列表中,浏览器也不会在第一个证书之外的证书选择提示中列出它们。
It seems that I am adding the certificate to the wrong version of glassfish trust store(cacerts.jks) now everything is working fine. 看来我正在将证书添加到错误版本的glassfish信任库(cacerts.jks)中,现在一切正常。 The browser lists all certificate I added and authorize correctly according to the role.
浏览器会列出我添加的所有证书,并根据角色正确授权。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.