You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alain Ketterlin <al...@dpt-info.u-strasbg.fr> on 2000/07/07 23:10:47 UTC

LdapProcessor and JNDI relative names

Hi all,

It seems that the LDAP processor adopts JNDI's default mechanism of
returning *relative* names (as I understood in
http://java.sun.com/products/jndi/tutorial/ldap/search/result.html).

E.g., if you use searchbase="o=whatever", and the entry with DN
"cn=X,ou=people,o=whatever" fits the search, its DN will be returned
(via searchresult/@ID) as "cn=X,ou=people".

My application uses dn-typed attributes (providing some kind of
linking between entries), so I really dislike this behavior. (Of
course I understand this is JNDI's choice, not Cocoon's.) I can
imagine a XSL-based solution, but I would prefer to avoid messing up
my stylesheets.

So my questions are:

1. Is it possible to provide an empty searchbase? ("" doesn't seem to
   work, nor omitting searchbase in <ldap-query>. "" doesn't event
   work with JNDI outside Cocoon.)

2. Is this behavior desirable with LDAP? What could be the use of
   getting relative DNs?

3. I'll probably hack something in LdapProcessor.java. It appears that
   it would be enough to change one line there, (in
   LdapProcessor.processQuery, line 159 in my copy, from
   Cocoon-1.7.4.tar.gz). (I didn't try yet :-). Does anybody see any
   bad side effect on that change? Any chance to get this as default
   in future releases?

I just started working with LDAP/JNDI/Cocoon, so please, tell me if
I'm missing something obvious.

Thanks in advance for your advices,

-- Alain.

Re: LdapProcessor and JNDI relative names

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 7 Jul 2000, Alain Ketterlin wrote:

> 3. I'll probably hack something in LdapProcessor.java. It appears that
>    it would be enough to change one line there, (in
>    LdapProcessor.processQuery, line 159 in my copy, from
>    Cocoon-1.7.4.tar.gz). (I didn't try yet :-). Does anybody see any
>    bad side effect on that change? Any chance to get this as default
>    in future releases?

James Birchfield (author of the LDAP processor) hasn't been active here in
a while, so as long as your changes make sense to others on the list (and
James doesn't object) I'll be happy to commit them for you. I am _not_ an
LDAP expert, so I have no other advice for you :(

- donald