Internet Explorer 11 / Outlook 2013 单点登录异常:它不断发送授权:标头

Internet Explorer 11 / Outlook 2013 单点登录异常:它不断发送授权:标头

我在客户端安装了 IE 11 和 Outlook 2013。在服务器端安装了 centos7、apache 2.4 以及 auth_ntlm_winbind_module 和 winbindd。服务器 URI (http://server.yourdomain.com) 被添加到 Explorer 的选项/安全中的“本地站点”。

Apache 配置为通过 .htaccess 文件对单个 URI (/sso.php) 使用/请求身份验证:

<IfModule auth_ntlm_winbind_module>
  <FilesMatch "sso.php$">
    AuthName "NTLM authentication"
    NTLMAuth on
    NTLMAuthHelper "/usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp"
    NTLMBasicAuthoritative on
    AuthType NTLM
    require valid-user
  </FilesMatch>
</IfModule>

问题是,当 IE 或 Outlook 配置为使用 SSO 时,它们会偶尔随机地(根据我的观察,比例为 1:10-20)将 ntlm 授权数据随 http 请求一起发送,不仅仅是发送到 /sso.php,还会发送到任何其他 URI。

有问题的 http 查询的 ngrep 输出:

T 1.2.3.4:49229 -> 1.2.3.5:80 [AP]
POST /message.php HTTP/1.1..Accept: */*..Content-Type: app
lication/x-www-form-urlencoded; charset=UTF-8..X-Roundcube
-Request: undefined..X-Requested-With: XMLHttpRequest..Ref
erer: search.php..Accept-Language:
hu,en-US;q=0.7,en;q=0.3..Accept-Encoding: gzip, deflate..U
ser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6
.2; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; Microsoft Outl
ook 15.0.4420)..Host: SERVER..Content-Length: 0..
Connection: Keep-Alive..Cache-Control: no-cache..Cookie: s
plitter2=421; PHPSESSID=38jo8vdmvvfotqhivffsocgif3..Author
ization: NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAG
A4AlAAAADw==....
#
T 1.2.3.5:80 -> 1.2.3.4:49229 [AP]
HTTP/1.1 200 OK..Date: Mon, 15 Sep 2014 08:52:50 GMT..Serv
er: Apache/2.4.6 (CentOS) PHP/5.4.16..X-Powered-By: PHP/5.
4.16..Expires: Thu, 19 Nov 1981 08:52:00 GMT..Cache-Contro
l: no-store, no-cache, must-revalidate, post-check=0, pre-
check=0..Pragma: no-cache..Content-Length: 42..Keep-Alive:
timeout=5, max=100..Connection: Keep-Alive..Content-Type:
text/html; charset=UTF-8.....invalid id:
#
T 1.2.3.4:49229 -> 1.2.3.5:80 [A]

问题是,当他们这样做时,他们无法通过 http 请求发送 POST 参数,网站脚本会返回错误消息。但是,当立即重试时,它似乎可以正常工作:

没有“授权:”标头,并且正确的 POST 数据已发送到网络服务器。

有效的帖子查询应如下所示(请注意,缺少 Authorization: 标头,但存在 'id' 字段):

T 1.2.3.4:49229 -> 1.2.3.5:80 [AP]
POST /message.php HTTP/1.1..Accept: */*..Content-Type: app
lication/x-www-form-urlencoded; charset=UTF-8..X-Roundcube
-Request: undefined..X-Requested-With: XMLHttpRequest..Ref
erer: search.php..Accept-Language:
hu,en-US;q=0.7,en;q=0.3..Accept-Encoding: gzip, deflate..U
ser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6
.2; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; Microsoft Outl
ook 15.0.4420)..Host: SZERVER..Content-Length: 15.
.Connection: Keep-Alive..Cache-Control: no-cache..Cookie:
splitter2=421; PHPSESSID=38jo8vdmvvfotqhivffsocgif3....
#
T 1.2.3.4:49229 -> 1.2.3.5:80 [AP]
id=4992&search=

因此问题是如何防止 IE 11 或 Outlook 2013 每 10-20 秒将 ntlm 授权凭据发送到任何 URI,而 apache 实际上并没有要求这样做? 或者如何强制 IE 或 Outlook 发送 POST 数据,即使它们将 ntlm 授权数据发送到 Web 服务器?

感谢任何提示或线索。

相关内容