You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Thomas Cataldo <tc...@gmail.com> on 2010/03/08 22:57:59 UTC

client-api removed ? moved ?

Hi,

Looking at your source repository, client-api was removed recently
from directory-shared. I was trying to use it for some projects as a
replacement of sun jndi or novell jldap.

Is it gone for good ?

I couldn't get a simple search working against openldap but I tough
the bug was in my code (openldap didn't understand the filter
transmitted in my search, while being a simple (uid=*)).

May I ask why it was removed or moved (where?) ?

Any usable NIO based alternative to Sun JNDI ?

Regards,
Thomas.

Re: client-api removed ? moved ?

Posted by Kiran Ayyagari <ay...@gmail.com>.
hi Thomas,

> Looking at your source repository, client-api was removed recently
> from directory-shared. I was trying to use it for some projects as a
> replacement of sun jndi or novell jldap.
>
> Is it gone for good ?
>
> May I ask why it was removed or moved (where?) ?

No, it was moved to a different location
http://svn.apache.org/repos/asf/directory/clients/ldap/trunk

>
> Any usable NIO based alternative to Sun JNDI ?

We have started this client-api to make developing and working with
LDAP servers easy.

We appreciate any feedback on client-api during your usage.


Kiran Ayyagari

Re: first small ldap java design

Posted by Stefan Zoerner <st...@labeo.de>.
Cook, Lee (IS) (Contr) wrote:
> 2- authenticate simple mode LDAP username/password credentials
> 
>   LDAPAPI:
> 
>    uid = username,  userpassword = password
> 
>    ? user password stored in UNIX crypt format ?
> 
>    Bind ?
> 
>    Search user uid, userpassword?

It is very uncommon to search entries with a specific uid and password, 
because the password will in almost all cases not be readable.

Normally, you search an entry with a uid, and bind with the returned DN 
and the given password.

Note that a bind in JNDI is not a bind in LDAP. The bind in JNDI is an 
add in LDAP (just to reduce confusion).

Greetings from Hamburg,
     StefanZ


Re: first small ldap java design

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 3/11/10 7:23 PM, Cook, Lee (IS) (Contr) wrote:
> a simpler question.
> if i authenticate by getting an InitialDirContext with a user as principal,
> how can i use the context to pull this users attributes?
> Context.getAttributes() expects a Name, confused...
>    
You should have a look at 
http://java.sun.com/products/jndi/tutorial/trailmap.html.--

Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com



RE: first small ldap java design

Posted by "Cook, Lee (IS) (Contr)" <R....@ngc.com>.
a simpler question.
if i authenticate by getting an InitialDirContext with a user as principal,
how can i use the context to pull this users attributes?
Context.getAttributes() expects a Name, confused...
Lee!

________________________________

From: Cook, Lee (IS) (Contr) [mailto:R.Lee.Cook@ngc.com]
Sent: Wed 3/10/2010 9:42 PM
To: users@directory.apache.org
Subject: first small ldap java design



Hi,

Im new to LDAP Java and need to provide code for the following usecase.

Wondering if anyone might review my initial logic notes writen in novice terms

perhaps offer some advice, pseudo or even real LDAP Java code examples.

taking first baby steps...

Thks, Lee!



1- connect to the customer's LDAP Directory service

  LDAPAPI: 

   get a new InitialDirContext() with customer's LDAP Directory service

   hostname:port, Bind principal and Bind principal password

   ? supply base DN ?

   

2- authenticate simple mode LDAP username/password credentials

  LDAPAPI:

   uid = username,  userpassword = password

   ? user password stored in UNIX crypt format ?

   Bind ?

   Search user uid, userpassword?

   

3- if authenticated, retrieve membership of 3 possible role groups,

   and the personname attribute value

  LDAPAPI:

  Search and return attributes ?

 

4- Close the LDAP service connection

  LDAPAPI:

  Unbind

 *  




first small ldap java design

Posted by "Cook, Lee (IS) (Contr)" <R....@ngc.com>.
Hi,

Im new to LDAP Java and need to provide code for the following usecase.

Wondering if anyone might review my initial logic notes writen in novice terms

perhaps offer some advice, pseudo or even real LDAP Java code examples.

taking first baby steps...

Thks, Lee!

 

1- connect to the customer's LDAP Directory service

  LDAPAPI:  

   get a new InitialDirContext() with customer's LDAP Directory service

   hostname:port, Bind principal and Bind principal password

   ? supply base DN ?

    

2- authenticate simple mode LDAP username/password credentials

  LDAPAPI:

   uid = username,  userpassword = password

   ? user password stored in UNIX crypt format ?

   Bind ?

   Search user uid, userpassword?

    

3- if authenticated, retrieve membership of 3 possible role groups,

   and the personname attribute value

  LDAPAPI:

  Search and return attributes ?

  

4- Close the LDAP service connection

  LDAPAPI:

  Unbind 

 *   


Re: client-api removed ? moved ?

Posted by Thomas Cataldo <tc...@gmail.com>.
On Mon, Mar 8, 2010 at 11:33 PM, Emmanuel Lecharny <el...@gmail.com> wrote:
> On 3/8/10 10:57 PM, Thomas Cataldo wrote:
>>
>> Hi,
>>
>> Looking at your source repository, client-api was removed recently
>> from directory-shared. I was trying to use it for some projects as a
>> replacement of sun jndi or novell jldap.
>>
>> Is it gone for good ?
>>
>
> No, certainly not !
>
> In fact, we moved it so that it's more visible. t has its own project now,
> and will be released as 0.1 soon (probably this week).
>
> Have a look at svn.apache.org/repos/asf/directory/clients/ldap/trunk/

Thanks a lot, I did a git clone from the directory-clients repo and
this one does not seems up to date yet.

Re: client-api removed ? moved ?

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 3/8/10 10:57 PM, Thomas Cataldo wrote:
> Hi,
>
> Looking at your source repository, client-api was removed recently
> from directory-shared. I was trying to use it for some projects as a
> replacement of sun jndi or novell jldap.
>
> Is it gone for good ?
>    
No, certainly not !

In fact, we moved it so that it's more visible. t has its own project 
now, and will be released as 0.1 soon (probably this week).

Have a look at svn.apache.org/repos/asf/directory/clients/ldap/trunk/
> I couldn't get a simple search working against openldap but I tough
> the bug was in my code (openldap didn't understand the filter
> transmitted in my search, while being a simple (uid=*)).
>
> May I ask why it was removed or moved (where?) ?
>
> Any usable NIO based alternative to Sun JNDI ?
>    
Many, but we are currently working with OpenDS people to get something 
common.

There is a dedicated mailing list : api@directory.apache.org, and a 
dedicated wiki : http://cwiki.apache.org/confluence/display/DIRAPI/Index

As it's really a work in progress, if you feel like giving a hand, you 
are more than welcome !


PS: We are currently moving all our internal tests to use this API, as 
it's the best way to test it :)
> Regards,
> Thomas.
>
>    


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com