Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to expose LDAP "compliant" data through a REST API without an LDAP server?

Tags:

c#

wcf

ldap

Let me first state that I know next to nothing about LDAP and this question is more conceptual in nature than anything else. Since this is a long post, here is the question in it's simplest form:

how can I expose contact data in an existing SQL Server database to LDAP clients in the easiest way possible?

SCENARIO

The organization I work for has developed a very simple internal CRM system - actually it's more of a glorified contact management system than CRM, but full of contact's information nonetheless - and they now want the ability to easily expose all of the contact information to other desktop and mobile clients like Outlook and/or iOS devices and I've been assigned to figure out how to do this.

The first thing I did was open Outlook and see what kind of Internet address books can be added; in Outlook 2007, the only option I'm seeing is LDAP. Next, I looked at an iOS device and it also supports LDAP address books. Thus, it seems like LDAP is what is needed to accomplish this goal...

RESEARCHING LDAP

As stated in the beginning, I know next to nothing about LDAP and researching it for this purpose didn't get me very far. I certainly do not want to setup an entire LDAP server and I have no need for LDAP security, etc. (at least as I understand it, I don't), all I need to do is expose contact information from the existing CRM database "the LDAP way."

The consensus I seem to be seeing in my research is to install an LDAP server such as OpenLDAP and configure it to use SQL Server (i.e., the existing CRM database) as the backing store thus effectively exposing the database records to LDAP clients. This just seems overly complex and I'm hoping that there's an easier way to expose contact records in LDAP form.

THE REST IDEA

The idea I have - which is looking like a lost cause - is to expose each user's contacts via a simple REST (or REST-like) API that returns contact information in the LDAP form that is usable by Outlook, iOS and any other client/device that supports LDAP.

The end goal is to instruct individuals in my organization to open Outlook or their iOS device settings and type in a URI as simple as:

https://www.ourinternalcrm.com/{username}/contacts

AM I WASTING MY TIME?

Is this even remotely possible and worth investigating further or am I missing the whole point of LDAP and the way exposing data in LDAP form works?

If this is possible, can someone please help to point me in the right direction? I need to implement all of this using C# and (most likely) WCF.

like image 713
sellmeadog Avatar asked Sep 14 '11 00:09

sellmeadog


People also ask

Does LDAP have an API?

The LDAP APIs are designed to provide a suite of functions that can be used to develop directory enabled applications. Directory-enabled applications typically connect to one or more directories and perform various directory-related operations, such as: Adding entries.

Does LDAP rest?

LDAP is a standard protocol defined by a series of RFC (check RFC 4510 for the complete reference). REST is a software architecture style for designing web applications, so it relies on HTTP. If you do not understand what is LDAP and what are its design principles, use the REST interfaces. It will be easier for you.


2 Answers

LDAP is a protocol in itself and is not over HTTP or another web service protocol.

If you want to develop an LDAP server that would be more complicated than using an existing LDAP server technology.

You could implement an Active Directory Application Mode (ADAM) server now called Active Directory Lightweight Directory Services (AD LDS) and build your application or a sync service to push contact details to it, thereby eliminating the requirement to create one.

like image 101
Bernie White Avatar answered Nov 03 '22 08:11

Bernie White


LDAP already has a well defined URL filter syntax, just use that. See RFC 4516.

like image 21
user207421 Avatar answered Nov 03 '22 07:11

user207421