如何使用Microsoft AD为内部PHP应用程序实施单点登录(SSO)?

我模糊地意识到,加入域IE的计算机可以被要求发送一些额外的标题,我可以使用它来自动登录到应用程序。我有apache在带有mod_php的Windows服务器上运行。我想要避免用户必要时登录。我发现了一些关于Kerberos和Apache模块的链接。

http://www.onlamp.com/pub/a/onlamp/2003/09/11/kerberos.html?page=last
https://metacpan.org/pod/Apache2::AuthenNTLM

由于我在Windows上运行,所以证明是安装Perl或Apache模块是不平凡的。但PHP没有访问HTTP标头?

我发现这个,但它没有做任何身份验证,它只是表明PHP可以读取NTLM头。
http://siphon9.net/loune/2007/10/simple-lightweight-ntlm-in-php/

我想让我的用户只需指向应用程序并让它们自动进行身份验证。有没有人有这方面的经验或者得到它的工作吗?

UPDATE
自从最初发布这个问题以来,我们已将设置更改为仍在windows上运行的nginx和php-fcgi。 Windows上的Apache2和php-cgi可能是您可以在Windows上配置的最慢的设置之一。看起来像Apache可能仍然需要(它适用于php-fcgi),但我宁愿使用一个nginx解决方案。

为什么HTTP服务器插件是必需的,我还是不明白(并且很乐意接受教育),我们不能拥有PHP,Web服务器不可知的解决方案。

所有你需要的是 mod_auth_sspi Apache模块。

样品配置:

AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain mydomain

# Set this if you want to allow access with clients that do not support NTLM,or via proxy from outside. Don't forget to require SSL in this case!
SSPIOfferBasic On

# Set this if you have only one domain and don't want the MYDOMAIN\ prefix on each user name
SSPIOmitDomain On

# AD user names are case-insensitive,so use this for normalization if your application's user names are case-sensitive
SSPIUsernameCase Lower
AuthName "Some text to prompt for domain credentials"
Require valid-user

并且不要忘记你也可以use Firefox for transparent SSO in a Windows domain:只需转到:config,搜索network.automatic-ntlm-auth.trusted-uris,并输入您的内部应用程序的主机名或FQDN(如myserver或myserver.corp .domain.com)。您可以有多个条目,它是一个逗号分隔的列表。

相关文章

文章浏览阅读2.2k次,点赞6次,收藏20次。在我们平时办公工作...
文章浏览阅读1k次。解决 Windows make command not found 和...
文章浏览阅读3.2k次,点赞2次,收藏6次。2、鼠标依次点击“计...
文章浏览阅读1.3w次。蓝光版属于高清版的一种。BD英文全名是...
文章浏览阅读974次,点赞7次,收藏8次。提供了更强大的功能,...
文章浏览阅读1.4w次,点赞5次,收藏22次。如果使用iterator的...