Shelly:
Let me help with number 3
The typical standard for anonymous binding is to specify a name and password of
"" "" for both. I am not sure if JNDI will pass this ok-give it a try.
3. How to use an anonymous password for binding instead of using
connectionName/connectionPassword?
Shelly wrote:
> Hello,
>
> I'm running Tomcat 4 on Unix and trying to use JNDIRealm for
> authentication.
> I use Netscape DAP server, and the hierarchy of entries in the directory
> is
>
> o=My Company
> |
> +---------------+---------------+
> | | |
> ou=People ou=Groups ...
> |
> +-------+-------+
> | |
> ou=Employee ...
> |
> +-----+-----+
> | | |
> enum=001 ... enum=111
>
> However, the logic attribute is uid.
>
> When I do a search for a valid uid, it returns null.
>
> If I use DirContext.listBindings("") to get name-to-objects, no object
> returns; (Please see code below).
> If I use DirContext.listBindings("o=My Company") to get name-to-objects,
> it returns (Name: ClassName: Object):
> ou=Resources: com.sun.jndi.ldap.LdapCtx:
> com.sun.jndi.ldap.LdapCtx@586fd3
> ou=People: com.sun.jndi.ldap.LdapCtx: com.sun.jndi.ldap.LdapCtx@586jhk
> ...
>
> Hash table en = new Hash table();
> env.put(Context.INITIAL_CONTEXT_FACTORY, context Factory);
> if (connection Name != null)
> env.put(Context.SECURITY_PRINCIPAL, connection Name);
> if (connection Password != null)
> env.put(Context.SECURITY_CREDENTIALS, connection Password);
> if (connection URL != null)
> env.put(Context.PROVIDER_URL, connection URL);
> context = new InitialDirContext(env);
>
> try {
> // Get listing of context
> Naming Enumeration bindings = context.listBindings("");
> // Go through each item in list
> while (bindings.hasMore()) {
> Binding bd = (Binding)bindings.next();
> log(bd.getName() + ": " + bd.getClassName() + ": " +
> bd.getObject());
> }
> } catch (Naming Exception e) {
> log("List Bindings failed: " + e);
> }
>
> If I bind dn."", I got "HTTP Status 500 - Internal Server Error" message
> when I access the secured page.
>
> I'm wondering if anyone knows the answers to any of the following
> questions:
>
> 1. How to get a dn from uid when uid is not part of the dn?
> 2. Does SHA digest been supported? When DAP server use SHA digest for
> userPassword, how do I encrypt SHA digest?
> 3. How to use an anonymous password for binding instead of using
> connectionName/connectionPassword?
>
> Thanks
>
> Shelly
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>