You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Tino Schwarze <ti...@in-chemnitz.de> on 2006/12/21 12:35:03 UTC

Implementing an alternative backend

Hi there,

I've got a pretty interesting project here: We would like to equip our
open-EIS knowledge management software with an embedded LDAP server.
I was pretty glad to find the Apache DS since everything seems to be in
place. My first goal is to allow user authentication against an existing
open-EIS user base which is stored in a DB.

Looking at the architecture I found that the best way would be to
implemnt a new backend and provide a DN<->category mapping (open-EIS
content is organized in categories) as well as a OID<->SQL mapping.

Do you have any hints or advice for me? Is this the right place to
start?

Bye,

Tino.

-- 
www.quantenfeuerwerk.de
www.spiritualdesign-chemnitz.de
www.lebensraum11.de

Fwd: Implementing an alternative backend

Posted by Emmanuel Lecharny <el...@gmail.com>.
Ooops, forget to say that you should also type this command :

mvn eclipse:eclipse

to generates the .project and .classpath for eclipse. Just launch eclipse
then, and import the existing projects from the directory where you have
built the code.

Emmanuel

---------- Forwarded message ----------
From: Tino Schwarze <ti...@in-chemnitz.de>
Date: Dec 21, 2006 7:00 PM
Subject: Re: Implementing an alternative backend
To: dev@directory.apache.org

Hi Alex,

On Thu, Dec 21, 2006 at 12:25:52PM -0500, Alex Karasulu wrote:

> > I've got a pretty interesting project here: We would like to equip our
> > open-EIS knowledge management software with an embedded LDAP server.
> > I was pretty glad to find the Apache DS since everything seems to be in
> > place. My first goal is to allow user authentication against an existing
> > open-EIS user base which is stored in a DB.
> >
> > Looking at the architecture I found that the best way would be to
> > implemnt a new backend and provide a DN<->category mapping (open-EIS
> > content is organized in categories) as well as a OID<->SQL mapping.
> >
> > Do you have any hints or advice for me? Is this the right place to
> > start?
>
> Sounds like a nice project to work on.  Yeah writing a custom partition
> would give you a lot of power.  It is the right place to start.
>
> First thing just take a look at the Partition interface in the partition
> package.  You'll have to implement this for your EIS application.
>
> Best thing to do might be to first stub out all the methods and set
> things up so you can just read a simple entry after installing the
> partition into the server.  Then you can move on to start building up
> your solution.

That's good news. :-) I'll let you know how I progress...

BTW: I had some difficulties with building Apache DS... what's the
easiest way to get a dev environment set up with Eclipse? I had to add a
lot of libs by hand... And there's a JBOSS depency in the sar-plugin
which made me struggle.

Bye,

Tino.

--
www.quantenfeuerwerk.de
www.spiritualdesign-chemnitz.de
www.lebensraum11.de


-- 
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Implementing an alternative backend

Posted by Emmanuel Lecharny <el...@gmail.com>.
Hi Tino

you have information about building the server here :

http://cwiki.apache.org/confluence/display/DIRxSRVx11/ApacheDS+v1.5+Developer%27s+Guide

and

http://cwiki.apache.org/confluence/display/DIRxSRVx11/Building+trunks

This is for version 1.5


For version 1.0, here you are :

http://cwiki.apache.org/confluence/display/DIRxSRVx10/Building

Hope it helps...

Emmanuel

On 12/21/06, Tino Schwarze <ti...@in-chemnitz.de> wrote:
>
> Hi Alex,
>
> On Thu, Dec 21, 2006 at 12:25:52PM -0500, Alex Karasulu wrote:
>
> > > I've got a pretty interesting project here: We would like to equip our
> > > open-EIS knowledge management software with an embedded LDAP server.
> > > I was pretty glad to find the Apache DS since everything seems to be
> in
> > > place. My first goal is to allow user authentication against an
> existing
> > > open-EIS user base which is stored in a DB.
> > >
> > > Looking at the architecture I found that the best way would be to
> > > implemnt a new backend and provide a DN<->category mapping (open-EIS
> > > content is organized in categories) as well as a OID<->SQL mapping.
> > >
> > > Do you have any hints or advice for me? Is this the right place to
> > > start?
> >
> > Sounds like a nice project to work on.  Yeah writing a custom partition
> > would give you a lot of power.  It is the right place to start.
> >
> > First thing just take a look at the Partition interface in the partition
> > package.  You'll have to implement this for your EIS application.
> >
> > Best thing to do might be to first stub out all the methods and set
> > things up so you can just read a simple entry after installing the
> > partition into the server.  Then you can move on to start building up
> > your solution.
>
> That's good news. :-) I'll let you know how I progress...
>
> BTW: I had some difficulties with building Apache DS... what's the
> easiest way to get a dev environment set up with Eclipse? I had to add a
> lot of libs by hand... And there's a JBOSS depency in the sar-plugin
> which made me struggle.
>
> Bye,
>
> Tino.
>
> --
> www.quantenfeuerwerk.de
> www.spiritualdesign-chemnitz.de
> www.lebensraum11.de
>



-- 
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Implementing an alternative backend

Posted by Tino Schwarze <ti...@in-chemnitz.de>.
Hi Alex,

On Thu, Dec 21, 2006 at 12:25:52PM -0500, Alex Karasulu wrote:

> > I've got a pretty interesting project here: We would like to equip our
> > open-EIS knowledge management software with an embedded LDAP server.
> > I was pretty glad to find the Apache DS since everything seems to be in
> > place. My first goal is to allow user authentication against an existing
> > open-EIS user base which is stored in a DB.
> > 
> > Looking at the architecture I found that the best way would be to
> > implemnt a new backend and provide a DN<->category mapping (open-EIS
> > content is organized in categories) as well as a OID<->SQL mapping.
> > 
> > Do you have any hints or advice for me? Is this the right place to
> > start?
> 
> Sounds like a nice project to work on.  Yeah writing a custom partition
> would give you a lot of power.  It is the right place to start.
> 
> First thing just take a look at the Partition interface in the partition
> package.  You'll have to implement this for your EIS application.
> 
> Best thing to do might be to first stub out all the methods and set
> things up so you can just read a simple entry after installing the
> partition into the server.  Then you can move on to start building up
> your solution.

That's good news. :-) I'll let you know how I progress...

BTW: I had some difficulties with building Apache DS... what's the
easiest way to get a dev environment set up with Eclipse? I had to add a
lot of libs by hand... And there's a JBOSS depency in the sar-plugin
which made me struggle.

Bye,

Tino.

-- 
www.quantenfeuerwerk.de
www.spiritualdesign-chemnitz.de
www.lebensraum11.de

Re: Implementing an alternative backend

Posted by Tino Schwarze <ti...@in-chemnitz.de>.
On Thu, Dec 21, 2006 at 12:25:52PM -0500, Alex Karasulu wrote:

> > I've got a pretty interesting project here: We would like to equip our
> > open-EIS knowledge management software with an embedded LDAP server.
> > I was pretty glad to find the Apache DS since everything seems to be in
> > place. My first goal is to allow user authentication against an existing
> > open-EIS user base which is stored in a DB.

[...]

> First thing just take a look at the Partition interface in the partition
> package.  You'll have to implement this for your EIS application.
> 
> Best thing to do might be to first stub out all the methods and set
> things up so you can just read a simple entry after installing the
> partition into the server.  Then you can move on to start building up
> your solution.

I've come so far to have an ApacheDS running with to partitions:
ou=system and o=community4you.de, the latter being backed (kind of ;))
by open-EIS. To ease testing, I'd like to access my own partition via
JNDI. After everything is set up, I start the server using this code
snippet:

    Hashtable<String, Object> _environment = new Hashtable<String, Object>();

    _environment.put ("java.naming.security.authentication", "simple");
    _environment.put ("java.naming.security.principal", "uid=admin,ou=system");
    _environment.put ("java.naming.security.credentials", "secret");

    _environment.put ("java.naming.provider.url", "ou=system");
    _environment.put ("java.naming.factory.initial", "org.apache.directory.server.jndi.ServerContextFactory");
    _environment.put ("org.apache.directory.server.core.configuration.Configuration", _serverconfig);

    // this actually starts up the server
    InitialDirContext _idc = new InitialDirContext (_environment);

    Attributes _testattrs = _idc.getAttributes("uid=admin");

    System.out.println ("initialized: uid="+_testattrs.get("uid"));

But how do I get access to my o=community4you.de partition? I suppose,
creating another InitialDirCotext is not the way to go (I'd have to
provide all the internal stuff, object classes, attriute types etc
myself, I suppose), but everything I can do with that context I created,
is relative to it, so I can't actually access my own partition.

Any advice on this?

Thanks,

Tino.

-- 
www.quantenfeuerwerk.de
www.spiritualdesign-chemnitz.de
www.lebensraum11.de

Re: Implementing an alternative backend

Posted by Alex Karasulu <ak...@apache.org>.
Tino Schwarze wrote:
> Hi there,
> 
> I've got a pretty interesting project here: We would like to equip our
> open-EIS knowledge management software with an embedded LDAP server.
> I was pretty glad to find the Apache DS since everything seems to be in
> place. My first goal is to allow user authentication against an existing
> open-EIS user base which is stored in a DB.
> 
> Looking at the architecture I found that the best way would be to
> implemnt a new backend and provide a DN<->category mapping (open-EIS
> content is organized in categories) as well as a OID<->SQL mapping.
> 
> Do you have any hints or advice for me? Is this the right place to
> start?

Sounds like a nice project to work on.  Yeah writing a custom partition
would give you a lot of power.  It is the right place to start.

First thing just take a look at the Partition interface in the partition
package.  You'll have to implement this for your EIS application.

Best thing to do might be to first stub out all the methods and set
things up so you can just read a simple entry after installing the
partition into the server.  Then you can move on to start building up
your solution.

Regards,
Alex