PHP 内网可以共享 Windows 登录吗?

Can a PHP intranet share Windows logins?(PHP 内网可以共享 Windows 登录吗?)
本文介绍了PHP 内网可以共享 Windows 登录吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我创建了一些需要用户登录的基于 PHP 的 Intranet 资源.用户创建自己的登录名,我使用 cookie 验证他们是否已登录.

I have created some PHP-based intranet resources that require users to log in. The users create their own logins, and I verify that they are logged in using a cookie.

有人问我是否可以将该登录名与他们的 Windows 登录名联系起来.我最初的回答是网页无法访问您的 Windows 登录名 - 这将是一个安全风险."但是我们的一个部门使用了 Sharepoint,它实际上将自己与 Windows 登录绑定在一起.

I've been asked if I can tie that login to their Windows login instead. My initial response was "a web page cannot access your Windows login - that would be a security risk." But one of our departments uses Sharepoint, and it does in fact tie itself to the Windows login.

这是怎么做到的?我可以用 PHP 做吗?如果是这样,为什么它不是一个可怕的安全漏洞?

How is that done? Can I do it in PHP? If so, why is it not a horrible security hole?

推荐答案

您正在寻找的是针对 PHP 网站的 NTLM 身份验证,这是完全可行的,但在 PHP 中似乎没有单一方法可以做到这一点.

What you are looking for is NTLM authentication against the PHP website, which is perfectly doable but seems there is no single way in PHP to do it.

看看http://siphon9.net/loune/2007/10/simple-lightweight-ntlm-in-php/

您还需要将站点添加到 IE 中的受信任站点(或您使用的任何浏览器中的等效站点),并在受信任站点的设置中,启用发送当前用户名和密码".

You also need to add the sites to your trusted sites in IE (or the equivalent in whichever browser you are using) and in the settings for trusted sites, turn on 'send current username and password'.

这不是一个可怕的安全漏洞,因为凭据不是通过网络直接发送的,并且最终用户已明确告诉浏览器将凭据发送到相关网站.

Its not a horrible security hole because the credentials are not sent en clair over the wire, and the end user has specifically told the browser to send credentials to the website in question.

这篇关于PHP 内网可以共享 Windows 登录吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)