Implement LDAP Compliance

I work professionally on a php web application that contains contacts, among other data. I was wondering how difficult it would be to make this data available to external programs using the LDAP protocol.

Are there specific tools for this? I could not find anything, but I can not imagine that I am the first to think about it.


Edit 1: I am looking for a way to use an application (such as an email client) to use the standard ldap search to find contacts from my data.

There are no restrictions on using third-party software or a separate ldap server on my side, but I want clients to simply be able to use the built-in ldap features for their choice.

What I can see is an ldap server that uses my database or service in my application to serve data, as if my application was an ldap server. I would prefer such a solution because I do not think it is right to inflate the application using ldap functions if I can use an external server for this.

+4
source share
3 answers

The LDAP server protocol is large, and I don't think there is a PHP server. I would suggest starting an LDAP server and clicking on entries.

I like OpenLDAP, but there are many servers there, depending on your platform. Even ActiveDirectory is an LDAP server.

Typically, LDAP objects have internal tracking attributes. For example, OpenLDAP has modifyTimestamp , which looks something like 20080306214429Z . They are not returned by the server unless you specifically request them in your request.

It would be simple enough to write crontab to compare modified times in LDAP and your database. If the LDAP modifyTimestamp older than your database, update the entry.

+3
source

Instead of trying to force the LDAP server to use your database, I would recommend storing your data on an LDAP server. You can create custom fields for anything that doesn't match the standard LDAP fields.

+1
source

Do you want to implement an LDAP server in PHP or just exchange data?

You might consider implementing something like LDIF if you just want to exchange data.

0
source

Source: https://habr.com/ru/post/1277609/


All Articles