模拟 LDAP 服务器?
由于多种原因,我不想托管实际的 LDAP 服务器。
相反,我想通过 PHP 模拟 LDAP 服务器的基本功能。
例如,我希望能够响应 ldap_search、ldap_connect、ldap_bind、ldap_unbind 等。
结果将来自 MySQL。
看起来 ldap_search 将返回与 LDAP URL 查询返回相同的响应,这就像 JSON 格式,但我不确定例如 ldap_bind。
现在我正在研究提供“模拟”LDAP 服务器的可行性。我非常感谢任何关于使用 PHP/MySQL 需要多少费用的想法。
提前致谢!
For a number of reasons, I do not want to host an actual LDAP server.
Instead, through PHP, I want to simulate the essential functions of an LDAP server.
So I want, for instance, to be able to respond to ldap_search, ldap_connect, ldap_bind, ldap_unbind, etc.
Results would come from MySQL.
It looks like ldap_search would be a matter of returning the same response that an LDAP URL Query would return, which is like a JSON format, but I am unsure about e.g. ldap_bind.
Right now I am just researching the feasibility of providing a "simulated" LDAP Server. I would greatly appreciate any thoughts on how much this would require, using PHP/MySQL.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您必须仔细阅读协议规范并基本上构建服务器实现。它会让您了解需要做什么,LDAP 客户端应用程序将非常严格地遵循协议规范。
规格:https://www.rfc-editor.org/rfc/rfc4510
I think you'll have to go through the protocol specifications and basically build a server implementation. It will give you an idea what you need to do, an LDAP client app will follow the protocol specs very closely.
Specs: https://www.rfc-editor.org/rfc/rfc4510