Domino LDAP and Java JNDI

Does anyone know if I can use Java JNDI to add users to the Domino LDAP?

If this is possible, will this create person document in names.nsf?

Anyone with an example on this?

Thanks

Dimtiris

Subject: Domino LDAP and Java JNDI

Dimtiris, I do not have an exact example to answer your question about writing to the Domino Directory using JNDI. Here is a link to a short code example provided by Sun that I was able to customize to do an LDAP lookup (read only though):

http://java.sun.com/products/jndi/tutorial/basics/directory/src/GetattrsAll.java

Here is the root url to the tutorial if you want to investigate writing to the directory:

http://java.sun.com/products/jndi/tutorial/

Subject: RE: Domino LDAP and Java JNDI

You may be able to create a person document using JNDI; I have never tried that. But, keep in mind that when your application binds to Domino, you need to supply credentials with the correct auth level. Another issue is if you want to specify an Internet password in the new person document, how are you going to encode it using JNDI?

Subject: RE: Domino LDAP and Java JNDI

I was hopping that domino will encode the password when (and if) creates a new person document.

Subject: Domino LDAP and Java JNDI

Does anyone know if I can use Java JNDI to add users to the Domino LDAP?

Yes, this is possible. The Domino directory team folks do it all the time.

If this is possible, will this create person document in names.nsf?

Yes. While this is possible, it is not the same a “registering” a person - he won’t get a certificate issued, etc. For that, you need to use the Java registration class in Notes.jar (I forget what it’s called).

If you want to create a dominoPerson object (i.e., a Person document), you need to understand what a dominoPerson object looks like. The easiest way to do this is to ldapsearch an existing Person document and when you make the appropriate JNDI calls, create his objectclass accordingly.

2 [C:] ldapsearch -h ldapx “cn=ken lin”

CN=Ken Lin,O=ldapx

mail=klin@ldapx.com

objectclass=dominoPerson

objectclass=inetOrgPerson

objectclass=organizationalPerson

objectclass=person

objectclass=top

dominocertificate=03002802 356CDAC4 07G01612 G0024F30

givenname=Ken

sn=Lin

cn=Ken Lin

uid=klin

uid=klin@ldapx.com

maildomain=ldapx

Also remember to enable your Domino LDAP for writes.

Anyone with an example on this?

No exact example, but you can see the ND6 Directory FAQ’s “How do I access the Domino Directory via Java?” for search examples. Just follow the JNDI Tutorial’s examples for add.

http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllThreadedweb/5c4bf25f844b9ac785256e4c005998b7?OpenDocument

Another issue is if you want to specify an Internet password in the new person document, how are you going to encode it using JNDI?

The Domino LDAP server will hash the password you supply in your add operation.