简体   繁体   English

JBoss 相互证书身份验证在 SSL 握手时失败

[英]JBoss mutual certificate authentication fails on SSL Handshake

I followed all the steps in this blogpost http://virgo47.wordpress.com/2010/08/23/tomcat-web-application-with-ssl-client-certificates/ except for the fact that I'm using JBoss7.0.2 and not the 6.x version.我遵循了这篇博文http://virgo47.wordpress.com/2010/08/23/tomcat-web-application-with-ssl-client-certificates/中的所有步骤,但我使用的是 JBoss7.0.2而不是 6.x 版本。

The goal is to ask any clients to provide a client certificate and achieve mutual authentication between the client and the server.目标是要求任何客户端提供客户端证书并实现客户端和服务器之间的相互身份验证。

I have created a certification authority (CA) to sign the client and server certificates.我创建了一个证书颁发机构 (CA) 来签署客户端和服务器证书。

I have imported the server certificate into the keystore and added an HTTPS connector to the standalone.xml configuration file to serve HTTPS requests on the 8443 port.我已将服务器证书导入到密钥库中,并在standalone.xml 配置文件中添加了一个 HTTPS 连接器,以在 8443 端口上处理 HTTPS 请求。

I have imported the CA root certificate into the Certificate Manager under Authorities in client's Firefox.我已将 CA 根证书导入到客户端 Firefox 的 Authorities 下的证书管理器中。

Everything works fine and when I request https://localhost:8443 I get a page with a valid server certificate.一切正常,当我请求https://localhost:8443时,我得到一个带有有效服务器证书的页面。

The problem is, when I import the client certificate into the Certificate Manager in Firefox and set the server configuration to verify client certificates (verify-client="true" in standalone.xml) I get a browser error:问题是,当我将客户端证书导入 Firefox 中的证书管理器并设置服务器配置以验证客户端证书(standalone.xml 中的 verify-client="true")时,出现浏览器错误:

Secure Connection Failed:
An error occurred during a connection to localhost:8443.
SSL peer cannot verify your certificate.
(Error code: ssl_error_bad_cert_alert)

while the jboss log on the server states:而服务器上的 jboss 日志状态:

11:01:31,142 DEBUG [org.apache.tomcat.util.net.JIoEndpoint] (http-localhost-127.0.0.1-8443-1) Handshake failed: java.io.IOException: SSL handshake failed. Ciper suite in SSL Session is SSL_NULL_WITH_NULL_NULL
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:191) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.tomcat.util.net.JIoEndpoint.setSocketOptions(JIoEndpoint.java:1144) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_30]

Do you have any idea how to resolve this problem?你知道如何解决这个问题吗?

My setup:我的设置:

Localhost server:本地主机服务器:

sovo@sovo-pc:~$ cat /etc/issue
Ubuntu 10.10

JBoss 7.0.2 Final standalone.xml (relevant parts): JBoss 7.0.2 Final Standalone.xml(相关部分):

<management>
    <security-realms>
        <security-realm name="PropertiesMgmtSecurityRealm">
            <authentication>
                <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
            </authentication>
        </security-realm>
    </security-realms>
    <management-interfaces>
        <native-interface interface="management" port="9999"/>
        <http-interface interface="management" port="9990"/>
    </management-interfaces>
</management>
<profile>
    <subsystem xmlns="urn:jboss:domain:security:1.0">
        <security-domains>
            <security-domain name="other" cache-type="default">
                <authentication>
                    <login-module code="Disabled" flag="required"/>
                </authentication>
            </security-domain>
        </security-domains>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
        <connector name="https" protocol="HTTP/1.1" socket-binding="https" scheme="https" enable-lookups="false" secure="true">
            <ssl name="ssl" key-alias="sercer" password="changeit" certificate-key-file="/usr/share/jboss7.0.2/standalone/configuration/certificates/keystore.jks" protocol="TLSv1" verify-client="true" ca-certificate-file="/usr/share/jboss7.0.2/standalone/configuration/certificates/cacerts.jks"/>
        </connector>
        <virtual-server name="default-host" enable-welcome-root="true">
            <alias name="localhost"/>
            <alias name="example.com"/>
        </virtual-server>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:weld:1.0"/>
</profile>
<interfaces>
    <interface name="management">
        <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
    </interface>
    <interface name="public">
        <inet-address value="${jboss.bind.address:127.0.0.1}"/>
        <inet-address value="${jboss.bind.address:localhost}"/>
    </interface>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public">
    <socket-binding name="http" port="8080"/>
    <socket-binding name="https" port="8443"/>
    <socket-binding name="jmx-connector-registry" port="1090" interface="management"/>
    <socket-binding name="jmx-connector-server" port="1091" interface="management"/>
    <socket-binding name="jndi" port="1099"/>
    <socket-binding name="osgi-http" port="8090" interface="management"/>
    <socket-binding name="remoting" port="4447"/>
    <socket-binding name="txn-recovery-environment" port="4712"/>
    <socket-binding name="txn-status-manager" port="4713"/>
</socket-binding-group>

Java version:爪哇版:

sovo@sovo-pc:~$ java -version
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) Server VM (build 20.5-b03, mixed mode)
sovo@sovo-pc:~$ javac -version
javac 1.6.0_30

I'll be happy to provide other relevant information if needed.如果需要,我很乐意提供其他相关信息。

您可能想通过在您的 ssl 连接器中添加密码套件来尝试一下:

<ssl name="ssl" key-alias="sercer" password="changeit" certificate-key-file="/usr/share/jboss7.0.2/standalone/configuration/certificates/keystore.jks" protocol="TLSv1" verify-client="true" ca-certificate-file="/usr/share/jboss7.0.2/standalone/configuration/certificates/cacerts.jks" cipher-suite="AES+RSA"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 .NET Mutual SSL握手&#39;客户端身份验证&#39; - .NET Mutual SSL handshake 'Client Authentication' Netty客户端在需要相互认证的SSL握手期间不发送客户端证书 - Netty client does not send client certificate during SSL handshake that requires mutual authentication SSL握手中的客户端证书身份验证 - Client Certificate Authentication in SSL Handshake 撤销相互TLS身份验证中的SSL证书 - Revoking SSL certificate in Mutual TLS authentication 群集环境中的相互WCF证书身份验证/ SSL - Mutual WCF certificate authentication/SSL in cluster environment 在R中运行httr库时的SSL握手失败,以及相互身份验证 - SSL handshake failure when running httr library in R, and mutual authentication 使用 WCF 进行相互 SSL 身份验证:在握手阶段没有 CertificateRequest 和 CertificateVerify - Mutual SSL authentication with WCF: no CertificateRequest and CertificateVerify in handshake phase 在没有证书的SSL握手中添加客户端身份验证 - Adding client authentication in SSL handshake without certificate 如何在ssl连接期间加载客户端证书以进行相互身份验证? - How to load Client certificate during ssl connection for mutual authentication? 使用gSOAP的相互SSL身份验证 - Mutual SSL Authentication with gSOAP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM