Обсуждение: SQL schema to LDAP schema ?

Поиск
Список
Период
Сортировка

SQL schema to LDAP schema ?

От
Jerome Alet
Дата:
Hi,

I've implemented a tool which actually uses PostgreSQL as the
backend, but some people ask me for an LDAP backend too.

Unfortunately I don't know how to create and LDAP directory, so
I wondered if any of you know of a tool which would take a
set of PostgreSQL commands or an existing PostgreSQL database
and would dump the SQL schema in a form reuseable to
create an LDAP directory with the same functionnalities.

I've already read some doc on creating an LDAP schema from
an existing realtionnal database, but it is actually still
very obscure to me...

Any link or help appreciated.

Thanks in advance

Jerome Alet


Re: SQL schema to LDAP schema ?

От
"scott.marlowe"
Дата:
On Sat, 26 Apr 2003, Jerome Alet wrote:

> Hi,
>
> I've implemented a tool which actually uses PostgreSQL as the
> backend, but some people ask me for an LDAP backend too.
>
> Unfortunately I don't know how to create and LDAP directory, so
> I wondered if any of you know of a tool which would take a
> set of PostgreSQL commands or an existing PostgreSQL database
> and would dump the SQL schema in a form reuseable to
> create an LDAP directory with the same functionnalities.
>
> I've already read some doc on creating an LDAP schema from
> an existing realtionnal database, but it is actually still
> very obscure to me...
>
> Any link or help appreciated.

We pump a Postgresql database to produce LDAP records and then insert them
directly into the LDAP server.

Basically, LDAP is a non-relational database, it is hierarchical (sp?) if
I remember correctly.  So, there's often no direct mapping from Postgresql
to LDAP for everything you want.  Also, the schema in LDAP is well
defined, and much of it is pre-defined before you get it.  You might find
yourself needing to create your own schema objects, not a simple task in
LDAP, but not as hard as you may have been led to believe.

One thing to look at is OpenLDAP 2.1, which now officially supports
Postgresql as it's official SQL backend.  If you got that up and running,
it might give a nice window into the way OpenLDAP uses Postgresql as a
datastore and offer up some clues on how to do some of this.

If you just need a script to grab data from Postgresql and get it into
LDAP, I can help, but all our code to do that is in PHP, so you'll either
need to set up that language or convert it into Perl or something a little
more ubiquitous.


Re: SQL schema to LDAP schema ?

От
Jerome Alet
Дата:
On Mon, Apr 28, 2003 at 09:01:13AM -0600, scott.marlowe wrote:
>
> We pump a Postgresql database to produce LDAP records and then insert them
> directly into the LDAP server.
>
> Basically, LDAP is a non-relational database, it is hierarchical (sp?) if
> I remember correctly.  So, there's often no direct mapping from Postgresql
> to LDAP for everything you want.  Also, the schema in LDAP is well
> defined, and much of it is pre-defined before you get it.  You might find
> yourself needing to create your own schema objects, not a simple task in
> LDAP, but not as hard as you may have been led to believe.

This is what makes me a bit afraid. I know I'll have to create my
own schema, or better add informations to an existing one. My problem
is not to insert data in the new schema or retrieve it.

> One thing to look at is OpenLDAP 2.1, which now officially supports
> Postgresql as it's official SQL backend.  If you got that up and running,
> it might give a nice window into the way OpenLDAP uses Postgresql as a
> datastore and offer up some clues on how to do some of this.

Well maybe, or maybe I'll have to buy some books on the subject.

> If you just need a script to grab data from Postgresql and get it into
> LDAP, I can help, but all our code to do that is in PHP, so you'll either
> need to set up that language or convert it into Perl or something a little
> more ubiquitous.

No that's not what I wanted. This is for people who wants to use
the tool I've written with their existing LDAP backend instead of
with a PostgreSQL backend that they don't want to install for
some reason (I can't see any ;-)

Thanks for all.

Jerome Alet