users@glassfish.java.net

Re: GlassFish Using LDAP for Container based (Authenication/Authorization)

From: <glassfish_at_javadesktop.org>
Date: Sun, 13 Apr 2008 04:33:36 PDT

Hello xyonanexus,

I think the last warning trace is saying that the Web application is authenticating with the "file" realm.

You should check that the "realm-name" element of "WEB-INF/web.xml" ("LDAPRealm"), matches with the realm name you have defined in Glassfish Configuration/Security/Realms (note: it is case sensitive, so don't use the incorrect name "LdapRealm" shown in the second link, because it won't work).

Also check with "ldapsearch" command that you can bind with simple authentication instead of SASL (-x):
- to the user's LDAP entry (with his password).
- to "search-bind-dn" with the "search-bind-password" (if you have configured these properties in the Glassfish's LDAP realm).

You may also want to add this line in "protected/welcome.jsp" file (between "selectOneMenu" items):

<f:selectItem itemValue="Protected" itemLabel="Protected"/>


I have tested the war, and it worked fine with Glassfish 9.1 b58g + JDK 1.6.0_04 on Ubuntu 7.04 + OpenLDAP 2.3.30.
(note: I may doesn't matter, but I had loaded openldap with an LDIFF file that had plain text password in "userPassword" attributes instead of "{CRYPT}cryptedPassword" format).

I hope I will also work for you.
[Message sent by forum member 'jmarine' (jmarine)]

http://forums.java.net/jive/thread.jspa?messageID=268949