简体   繁体   English

JavaScript:获取NTLM用户名?

[英]JavaScript: get NTLM username?

Can JavaScript get the NTLM username of a user viewing a webpage? JavaScript可以获取查看网页的用户的NTLM用户名吗?

I'm writing a web app that I want to use as part of an intranet, but I'd like to host it in the cloud (behind an Apache password). 我正在编写一个Web应用程序,希望将其用作Intranet的一部分,但我想将其托管在云中(在Apache密码后面)。

Security isn't a big issue: convenience is. 安全性不是一个大问题:便利性是。 I'd like to pick up my intranet users' NTLM usernames directly from the browser, without asking them to reconfigure their browsers or install any extra software. 我想直接从浏览器中获取Intranet用户的NTLM用户名,而不要求他们重新配置其浏览器或安装任何其他软件。 (Note that I don't need passwords, just usernames.) (请注意,我不需要密码,只需要用户名即可。)

Or would this be a giant security hole? 还是这将是一个巨大的安全漏洞?

Thanks! 谢谢!

I think, this will not work without a web-application in between because if i remember correctly NTLM is sent in a html header which you could access through javascript i think. 我认为,如果没有Web应用程序,这将无法正常工作,因为如果我没记错的话,NTLM是通过html标头发送的,您可以通过我认为的javascript访问。 But you won't get the username because ntlm uses a Challenge-Response method to ensure that the user is trusted. 但是您不会获得用户名,因为ntlm使用质询-响应方法来确保用户受到信任。 And if this would be possible, everyone could use javascript to fake the username and access your protected data. 并且,如果有可能,每个人都可以使用JavaScript伪造用户名并访问您的受保护数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM