Sun Directory Server (LDAP) + Sun One Application server configuration

Hi,

I am trying to configure Sun Directory Server (IPlanet) LDAP with SUNOne Application server. I need the step-by-step process for Configuring LDAP. I tried the following steps but they dont seem to work. Moreover, how do I make sure that the authentication is through LDAP. Or even the configuration i'm doing is correct.

1. I have installed Sun One Directory server.

2. I have created a domainitdom.local on my laptop [name of the machine islaptop2]

3. iPlanet console says the toplevel itdom.local under it there is a tree starting fromlaptop2.itdom.local

4. I created a few users in theitdom.local [root level] by going to the tabl Users and Group

5. I installed Sun One Application server 7

6. I deployed my web applicaiton on "Server1" which is the default server instance.

7. Under the security node of the Server1 i setDefault Realm =ldap [in the general tab]

8. In "Configure Directory service" tab i enteredBase Dn ="dc=itdom, dc=local"

9. In "Configure Directory service" tab when i enteredBind DN = nothing andPassword = nothing (empty strings which means anonymous access) and i click save changes then it says Directory service configuration has been updated.

10 If i try enterBind DN =adminPassword=<password> it says pleasecheck Bind DN & password. I tried entering a lot of things in the Bind Dn but it doesn't work. i tried different users, dn names.

11 What am i supposed to enter inBind DN?

12 Then in the LDAP node under the Realms node (having configured the service to be anonymous which is allowing save changes properly) i went to ldap then in properties i entereddirectory=ldap://localhost:389,base-dn="dc=itdom,dc=local", jaas-context=ldapRealms

13 I applied changes and restarted the server.

14 I access my application and it doesn't ask me anything, what i was expecting is a dialog box asking me the LDAP id and password, then I would have gotten the userid from the classcom.iplanet.ias.security.auth.realm.ldap.LDAPRealm. Now i'm directly taken to the home page of my application which was supposed to be secured and password should've been asked by the server itself before servicing the request completely.

Where am i going wrong, the problem is i do not know what to put in Bind DN/Password in the configuration directory service tab. Plus is there any extra propety that i need to add in the ldap->properties. Plus what is the indication that my configuration is working fine, will it not show me the dialog box when i'm accessing my application for the first time through a browser?

[2837 byte] By [Mirza_92] at [2007-11-26 8:07:50]
# 1
Have you configured the security settings in the web.xml/sun-web.xml files of your application that you deployed to the appserver ? Check the sample applications that are shipped with the appserver<appserver_root>/samples/webapps/securityCheers
pts_forum at 2007-7-6 20:47:57 > top of Java-index,Application & Integration Servers,Application Servers...
# 2

hi i'm a colleague of Mirza.

We have modified the web.xml and now server is asking for password. We dont want to specify a particular role name in authorization-constraint. We need all our authenticated users to access the application. When i remove the auth-constraint tag from the web.xml it does not not allow the user to acess the application and gives me the error "Access to the specified resource has been forbidden". To remedy this we have created a group called "authenticated" in our ldap directory server and put all the users in that group. Now even though i'm specifying in auth-constraint .. the role-name to be "authenticated" but its still not granting the user permission to the access the application.

here is the snippet of my web.xml

<security-constraint>

<web-resource-collection>

<web-resource-name>PAMS</web-resource-name>

<url-pattern>/*</url-pattern>

<http-method>GET</http-method>

<http-method>POST</http-method>

</web-resource-collection>

<auth-constraint>

<role-name>authenticated</role-name>

</auth-constraint>

</security-constraint>

<login-config>

<auth-method>BASIC</auth-method>

<realm-name> ldap</realm-name>

</login-config>

<security-role>

<role-name>authenticated</role-name>

</security-role>

I need to know what ever I am doing is correct.

AliIqbal at 2007-7-6 20:47:57 > top of Java-index,Application & Integration Servers,Application Servers...