简体   繁体   English

使用证书的相互认证

[英]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.

相关问题 相互客户端身份验证在Servlet中获取证书 - Mutual Client Authentication Get Certificate in Servlet 同一台机器上具有相同证书的两个服务之间的相互认证 - Mutual authentication between two services with same certificate on the same machine weblogic-相互认证-从HTTP标头读取证书 - weblogic - mutual authentication - read certificate from HTTP header 使用HttpURLConnection设置相互身份验证客户端 - setting up mutual authentication client using HttpURLConnection 如何验证配置相互认证(客户端证书,服务器证书)Java EE的正确性? - How to verify the correctness of configuring mutual authentication (client certificate, server certificate) Java EE? 相互SSL-使用Java作为客户端时的客户端证书链为空 - Mutual SSL - client certificate chain emtpy when using java as a client 如何获得ldap证书绕过使用Java的相互认证 - how to get ldap certificate bypass the mutual certification using Java Android客户端上的SSL相互身份验证FAIL接受服务器证书,但服务器未获得客户端证书 - SSL mutual authentication FAIL on Android Client accepts servers certificate but server does not get the client cert 如何配置 apache httpclient 4.5+ SSLContext 以使用带有自签名证书的双向 TLS 身份验证? - How to configure apache httpclient 4.5+ SSLContext to use mutual TLS authentication with a self signed certificate? 如何在Java SE中使用SSL设置相互身份验证 - How to set mutual authentication using SSL in Java SE
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM