【问题标题】:Mod_auth_kerb: optional Kerberos NegotiationMod_auth_kerb:可选的 Kerberos 协商
【发布时间】:2014-03-20 09:58:11
【问题描述】:

我能否配置 Mod_auth_kerb (http://modauthkerb.sourceforge.net/configure.html) 以使其执行可选的 Kerberos 协商:

  1. 如果浏览器配置为协商,Mod_auth_kerb 将执行协商并对用户进行身份验证(并发送REMOTE_USER

  2. 如果浏览器未配置为协商 Mod_auth_kerb 将不会执行身份验证,并将发送没有REMOTE_USER 的请求。稍后,应用程序将对请求执行身份验证。 重要的是 Mod_auth_kerb 不应返回 401 NEGOTIATE。

【问题讨论】:

    标签: apache authentication kerberos mod-auth-kerb


    【解决方案1】:

    我的猜测是,您要解决的真正问题是 Internet Explorer 的缺陷。对于所有其他浏览器,您可以像这样在 Apache 配置中简单地设置错误重定向。

    <Location /login-spnego>
            AuthType Kerberos
            require valid-user
            KrbMethodNegotiate on
            KrbMethodK5Passwd off
            Krb5Keytab /etc/httpd/conf/keytab
            ErrorDocument 401 /login-simple
    </Location>
    

    但是,如果没有将 IE 配置为允许对相关站点进行 kerberos 身份验证并且从不显示 401 文档,则 IE 将陷入死循环。我发现解决此问题的唯一方法是使用基于 HTTP_USER_AGENT 的 mod_rewrite 规则。

    # IE fails hard if the user does not have a tgt for SPNEGO
    # and either attempts NTLM or fails altogether depending on
    # exact version. Redirect all IE login attempts to
    # form rather than attempt pass-thru SPNEGO login.
    
    RewriteCond   %{HTTP_USER_AGENT}           ^Mozilla.*MSIE
    RewriteRule   ^/login-spnego/          /login-simple/   [PT]
    

    这并不能真正解决您的问题,但据我所知,如果不重新编写 mod_auth_kerb 的代码,根本没有办法做您想做的事情。

    【讨论】:

    • 不幸的是,如果不修改 mod_auth_kerb 是不可能做到的
    猜你喜欢
    • 1970-01-01
    • 2014-08-18
    • 1970-01-01
    • 2011-01-07
    • 1970-01-01
    • 2012-05-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多