SPNEGO身份验证失败

时间:2016-04-28 05:08:16

标签: java apache tomcat authentication

我为Apache 2.4 CentOS 7机器设置了kerberos + OpenLDAP身份验证。我现在正尝试使用Kerberos + OpenLDAP为Tomcat 7设置SSO。为此,我选择了SPNEGO。我相信我已根据需要使用所有LDAP和Kerberos设置。

现在,当浏览到启用了SPNEGO身份验证的网络应用程序时,我获得了401,这是因为我的用户代理没有发送WWW-Negotation标头。我期待着这一点,因为我还没有达到这一点。

我的问题是特定于登录。在Apache 2.4中我设置了SSO,如果没有密钥,它使用基本身份验证并且工作正常,正如预期的那样,它在提供凭据后授予我TGT并且对整个会话有效。

我想让Tomcat 7在失败时向我显示登录提示,例如我现在收到的401错误消息。

此外,我还设置了AJP。仅仅是为了测试,我想我会尝试从Apache到Tomcat的AJP启用SSO。在观看我的kerberos日志时,当我查看webapp但仍然显示401时,它实际上是在验证。

tldr; 如果需要,如何让Tomcat 7提示输入用户名和密码?有没有办法使用AJP通过AJP隧道从Apache到webapp进行身份验证?

以下是我的Tomcat 7日志的片段,请让我知道还需要哪些其他信息。

Apr 28, 2016 12:58:08 AM org.apache.catalina.authenticator.AuthenticatorBase invoke
FINE: Security checking request GET /helloworld/
Apr 28, 2016 12:58:08 AM org.apache.catalina.realm.RealmBase findSecurityConstraints
FINE:   Checking constraint 'SecurityConstraint[all]' against GET /index.jsp --> true
Apr 28, 2016 12:58:08 AM org.apache.catalina.realm.RealmBase findSecurityConstraints
FINE:   Checking constraint 'SecurityConstraint[all]' against GET /index.jsp --> true
Apr 28, 2016 12:58:08 AM org.apache.catalina.authenticator.AuthenticatorBase invoke
FINE:  Calling hasUserDataPermission()
Apr 28, 2016 12:58:08 AM org.apache.catalina.realm.RealmBase hasUserDataPermission
FINE:   User data constraint has no restrictions
Apr 28, 2016 12:58:08 AM org.apache.catalina.authenticator.AuthenticatorBase invoke
FINE:  Calling authenticate()
Apr 28, 2016 12:58:08 AM org.apache.catalina.authenticator.SpnegoAuthenticator authenticate
FINE: No authorization header sent by client
Apr 28, 2016 12:58:08 AM org.apache.catalina.authenticator.AuthenticatorBase invoke
FINE:  Failed authenticate() test

0 个答案:

没有答案