我在设置OpenAM的过程中遇到了一段时间的麻烦,仍然无法按原样运行。我希望OpenAM能够通过我自己的EJBCA副本进行OCSP验证验证用户。因此,我需要tomcat提示用户证书并将其传递给OpenAM。从HTTPS访问OpenAM很好,用户可以使用密码(OpenAM中的根域)登录。但是,在访问为证书登录设计的领域(OpenAM中需要证书的子领域)时,tomcat不会提示用户证书。有人有任何想法吗?以下是与SSL相关的Tomcat配置server.xml
的片段:
<Connector port="8181" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8445" />
<Connector port="8445" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
keystoreFile="/opt/sso/apache-tomcat-7.0.52/conf/keystore"
keystorePass="password"
truststoreFile="/opt/sso/apache-tomcat-7.0.52/conf/keystore"
truststorePass="password"
clientAuth="want" sslProtocol="TLS" />
在我的案例中,web.xml
文件没有变化。感谢。
根据Bernhard的建议,这是openssl s_client -connect FQDN:8445
的输出
CONNECTED(00000003)
depth=1 CN = leopardrootCA
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
0 s:/CN=ncw01271123114/OU=ouname/O=O-name/L=j/ST=a/C=us
i:/CN=leopardrootCA
1 s:/CN=leopardrootCA
i:/CN=leopardrootCA
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIDlzCCAwC--too_long_too_show
-----END CERTIFICATE-----
subject=/CN=ncw01271123114/OU=ouname/O=O-name/L=j/ST=a/C=us
issuer=/CN=leopardrootCA
---
Acceptable client certificate CA names
/CN=leopardrootCA
/CN=ncw0127114/OU=ouname/O=O-name/L=j/ST=a/C=us
---
SSL handshake has read 2097 bytes and written 403 bytes
---
New, TLSv1/SSLv3, Cipher is DHE-DSS-AES256-SHA
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : DHE-DSS-AES256-SHA
Session-ID: 53309AA15C218F41330C077476A3BDAE352CAFD84A503A281EA09AE884BA73D9
Session-ID-ctx:
Master-Key: EF5016A9D8236A704313720FC2E1A1B9FAC47A744F6A9B53E80BBEF8D1141476E050A71F3C50498ABEE1F790A2D76891
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1395694241
Timeout : 300 (sec)
Verify return code: 19 (self signed certificate in certificate chain)
答案 0 :(得分:1)
您可以从以下握手消息中看到
Acceptable client certificate CA names
/CN=leopardrootCA
/CN=ncw0127114/OU=ouname/O=O-name/L=j/ST=a/C=us
Tomcat要求提供客户端证书,并且只接受由其中一个证书颁发机构颁发的证书。
答案 1 :(得分:0)
似乎问题与客户端证书的extended key usage
有关。如果有人和我有同样的情况,那值得试试。感谢所有帮助过的人。
从我的评论中复制: