views:

695

answers:

6

I often hear things like "Can we load our employee info using LDAP?" Yet, the title "Lightweight Directory Access Protocol" makes me think of it as a protocol rather than a physical database management system like Oracle or MSSQL.

So could someone please explain to me what LDAP is, how it's used, and how it basically works? Is LDAP simply a standard protocol for extracting data from a variety of DBMSs? In an architecture diagram, would LDAP be simply an arrow drawn between the DB and the application server?

+6  A: 

LDAP is a protocol for querying user directories. For example, Active Directory or Novell eDirectory both support LDAP. It is also, to a degree a syntax for doing such queries, like how SQL is a querying language for querying databases.

An LDAP command could look like

(givenName=Mike)

And it would return all Mikes in the directory.

Serapth
+1  A: 

LDAP IS a protocol, but many people I know like to overload its meaning to include "any store capable of responding to LDAP queries." Active Directory is such a store, and there are many others. It is used when architects don't really care what the store is. It's used in the same as if you were to say "Store it in the SQL" when you don't care whether it's MySql or Oracle or SQL Server.

Alan McBee
+2  A: 

LDAP is a protocol created in response to the complexity of the X.500 family of protocols. It is intended to represent a hierarchical directory structure. The X.500 standard was originally intended to be used over a complete OSI layer stack and was created to fulfill the requirements of the telecom industry. LDAP was designed to use TCP/IP to provide similar functionality without the extra overhead. You can find information on X.500, OSI and LDAP on wikipedia. X.500 and OSI are both covered in most data communications textbooks as well.

codeelegance
Good answer, you can enhance it by providing the mentioned links to wikipedia directly in your answer.
lothar
A: 

LDAP is usually used as authentication database. Let's say you have CMS product you sell as Software-as-a-Service. So user gets CMS and you maintain it etc.

So, you install it to examplecustomer1.com, examplecustomer2.org, examplecustomer3.net (one software per domain). Now you have THREE user databases to maintain. So you add yourself to all systems as admin and customers accounts as well.

Then you discover LDAP. You add LDAP support to your product and now you have one central database of users. You can login as admin to all systems with your own ONE username and password. CMS system still contains user database and rights for each user but username is now used as reference to LDAP database and password field is deleted from CMS database schema.

raspi
+4  A: 

I think this link says it all http://blogs.sun.com/raghuvir/entry/ldap

Thunderboltz
I liked that, thanks.
Cuga
+1: excellent article!
marc_s
+3  A: 

Yes, LDAP (Lightweight Directory Access Protocol) is a protocol that runs on TCP/IP.

It is used to access directory services, like Microsoft's Active Directory, or Sun ONE Directory Server.

A directory service is a kind of database or data store, but not necessarily a relational database. The structure is usually much simpler, storing hierarchical collections of name-value pairs, e.g. lastName=Smith, firstName=John.

wire science
+1 for mentioning TCP/IP
Cuga
One important thing: LDAP is very much like a relational database but unlike relational databases, it's optimized for reading thus it's usually a better central location to store password vs an ordinary RDBMS.
Omar