此应用程序将在已在 Active Directory 中进行身份验证的客户端上运行。
问题:LDAP 协议(protocol)(或 Active Directory 设置)似乎需要用户名和密码。
目标:在 Java 中使用 LDAP 查询 Active Directory,而无需进行身份验证(询问用户名和密码)。
要点:运行此应用程序的所有客户端都已经登录。因此,他们已经通过 Active Directory 的身份验证(进入)/。
既然他们已经登录并可以在应用程序外部访问 AD,难道就不能“哄骗”他们已经通过身份验证这一事实并在我的应用程序中运行我的 LDAP 查询吗?
错误:试图通过身份验证时;我已经习惯了绑定(bind)错误,log4j 错误;以及 Stack Overflow、Oracle 和 Apache 上推荐的几乎所有内容。
尝试过的方法:我试过匿名绑定(bind)、Ldap api 的,nada!!
问题:
- 是否可以在不进行身份验证的情况下查询 Active Directory?
- 是否可以通过告诉服务器“嘿,我已经登录到 AD,继续我的查询”来查询 Active Directory?不提示用户输入用户名和密码?
最佳答案
Is it possible to query active directory without authentication?
我认为不可以,因为这会违反安全性。另一种方法可能是使用单点登录实用程序,让您登录,然后他们会为您提供详细信息。
Is it possible to query active directory by telling the server that "hey, I am already logged into AD, proceed with my queries?" without prompting the user for Username and password?
你可以试试http://spnego.sourceforge.net/或 http://jcifs.samba.org/src/docs/ntlmhttpauth.html使用 NTLM
关于java - LDAP。没有身份验证的 Java 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38580474/