6 Replies Latest reply on Jan 13, 2005 3:18 PM by anil.saldhana

    JBossDirectory: JNDI Based Ldap Server

    anil.saldhana

      JBossDirectory: Jndi Based Ldap Server
      For a month or so, this thought has been lingering in my mind-to build a simple jndi based Ldap Server on top of JBossCache( TreeCache).

      I agree that it is not as simple as that, to provide ldap based services, but what I am looking at it is a ldap server which can provide jndi based functionality at first. I should be able to store/retrieve, search, delete etc using JNDI ldap API.

      Dec.27 was a holiday for me - I whipped up a simple prototype which provides Jndi based ldap store/retrieve an object. In the background, I just store it in a treecache.

      This is interesting to me because I can reap all the features JBossCache provides - cacheloader to persistence, replication, lazy loading etc.

      As long as the map between Jndi and JBossCache can be taken care of plus a mechanism to map ldap namespace strings like 'uid=xxx,ou=people,o=jboss" to TreeCache '/jboss/people/uid', there may be some potential.

      Things to consider later:
      a) Export/Import via LDIF.
      b) DSML.
      c) Support Ldap DIT.
      d) Ldap Synchronization.
      e) Ldap Replication. (JGroups will be helpful).

      Why is JBossDirectory important?
      * Will provide a good testing engine for ldap related needs. Eg: JBossSX.
      * Will be useful for the JBoss Identity Management project and its needs like SSO, federated identity, liberty alliance etc.

      Regards,
      Anil

        • 1. Re: JBossDirectory: JNDI Based Ldap Server
          starksm64

          I would like to see support for javax.naming.directory.DirContext and javax.naming.ldap.LdapContext added to the naming service. I don't know that I want this coupled to TreeCache. That should be an implementation detail or quality of service selection. Both the DirContext and LdapContext could be added to the existing implementation, although I'm not sure the LdapContext would be worthwhile in that case.

          The existing HAJNDI implementation also clearly intersects here.

          • 2. Re: JBossDirectory: JNDI Based Ldap Server
            anil.saldhana

            In the prototype I have hacked together, the DirContext is not tied to TreeCache. All it does is create sockets to a backend DirectoryServer socket service( which is married to TreeCache). The Directory Server deals with parsing, backend storage etc (typical ldap server tasks).

            I have the implementation for javax.naming.directory.DirContext in a new module called "directory", which comes with testcases. Do you want me to import the module into HEAD?

            • 3. Re: JBossDirectory: JNDI Based Ldap Server
              starksm64

              There already is a jnp module for the existing naming service. This should evolve into the next gen naming service using the org.jboss.naming package as the root. You can create a new directory module for the combined naming/directory service.

              • 4. Re: JBossDirectory: JNDI Based Ldap Server
                anil.saldhana

                http://incubator.apache.org/directory/subprojects/eve/

                Apache Eve is a ldap server written in Java. Need to look at prospects of integrating it into JBoss.

                • 5. Re: JBossDirectory: JNDI Based Ldap Server
                  klaasjan

                  Is the source code for the prototype publicly available?
                  I could use some code that shows how to add an ldap protocol service to jboss. If possible I'm willing to help extend your code.

                  • 6. Re: JBossDirectory: JNDI Based Ldap Server
                    anil.saldhana

                    I have not imported the source code into the JBoss source repository. Will do so in the next few days. Currently the prototype does not do any fancy things and uses only the Jboss feature of "JBossCache/TreeCache".

                    Klaasjan, I welcome you to join the JBossDirectory project. Can you expand on what your requirements are? This way, I can tell whether your requirements and my plans have any common points.