Accessing an LDAP directory via HTTP?

不打扰是莪最后的温柔 提交于 2019-12-24 13:10:21

问题


I'm attempting to access an LDAP directory from devices that do not natively support the protocol. I want to be able to send requests via HTTP actions, run LDAP queries, and return the results in JSON. I attempted to do this via a Node.js server that acts like an LDAP client. You can view the Gist here.

A few questions:

  1. Is this even possible?

  2. What are some best practices for authentication?

Thank you!


回答1:


Writing a custom http-to-whatever bridge is always possible as long as your stack supports both - http and whatever.

You may have a look at opendj-rest2ldap-servlet which provides a generic LDAP-HTTP/REST bridge. Some version of the source code available at: https://svn.forgerock.org/opendj/trunk/opendj/opendj-rest2ldap/




回答2:


Yes, it's possible, but not necessarily with node.js. I did it by writing a Java Servlet that accepts the appropriate request parameters, does the LDAP lookup accordingly, and writes back whatever you need as HTML.

I did this for serving up jpegPhoto attributes as images.



来源:https://stackoverflow.com/questions/31236761/accessing-an-ldap-directory-via-http

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!