我需要帮助配置GF3.1.2我做了以下更改,请让我知道如果我失去了重要的东西,因为改变后它不工作。 我的ID是[email protected]Glassfish 3.1.2配置客户端证书相互认证
我找不到任何特定的线程或在论坛上的答案,如果有任何链接是有帮助的。 如果您有任何文件请转发。
请做要紧
的web.xml
<login-config>
<auth-method>CLIENT-CERT</auth-method>
</login-config>
<security-constraint>
<web-resource-collection>
<web-resource-name>Entire Application</web-resource-name>
<url-pattern>/faces/*</url-pattern>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description/>
<role-name>authorized</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-role>
<description/>
<role-name>authorized</role-name>
</security-role>
sun-web.xml中
<security-role-mapping>
<role-name>authorized</role-name>
<principal-name>admin</principal-name>
<group-name>authorized</group-name>
</security-role-mapping>
domain.xml中
<security-service>
<auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
<property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property>
<property name="jaas-context" value="fileRealm"></property>
</auth-realm>
<auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
<property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"></property>
<property name="jaas-context" value="fileRealm"></property>
</auth-realm>
<auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate">
<property name="assign-groups" value="authorized"></property>
</auth-realm>
请更具体地说明“不工作”。你在建什么样的应用程序?你确定客户端工作正常吗? – TPete 2012-04-23 09:22:48
具体来说,我的博客并不是要求客户端证书,我想用客户端证书来验证用户,我已经在glassfish服务器上做了特定的更改。 – user1347618 2012-04-23 17:12:34
所以当我在浏览器中打网址时,它应该要求客户端证书?我对吗。 – user1347618 2012-04-23 17:48:22