Windwos Authentication using local window xp users and Tomcat (Prompt window to the users)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ramesh_James
Posted On:   Thursday, January 14, 2010 02:29 PM

In simple words I want to acheive this: · User opens Internet explorer and write the URL to the page hosted on the Tomcat server · Tomcat asks for user authentication · Browser prompts user for Windows user name and pwd in dialog box · Browser sends username and pwd to tomcat· Tomcat recieves user/pwd and validate againest the Windows XP local user account. . Windows Domain server responds 'user good' . Tomcat considers user authenticated, send requested page to browser. Please find the below steps that I done to achive above. I made changes in server.xml and create new JNDI realm. Please find the below code for server.xml connectionURL="   More>>

In simple words I want to acheive this:

· User opens Internet explorer and write the URL to the page hosted on the Tomcat server
· Tomcat asks for user authentication
· Browser prompts user for Windows user name and pwd in dialog box
· Browser sends username and pwd to tomcat· Tomcat recieves user/pwd and validate againest the Windows XP local user account.
. Windows Domain server responds 'user good'
. Tomcat considers user authenticated, send requested page to browser.




Please find the below steps that I done to achive above.

I made changes in server.xml and create new JNDI realm.

Please find the below code for server.xml


connectionURL="ldap://servername.r1-core.r1.xyz.net:389"
connectionName="USERNAME@R1-CORE"
connectionPassword="*******"
referrals="follow"
userPattern="cn={0},DC=r1-core,DC=r1,DC=aig,DC=net"
userSearch="(sAMAccountName={0})"
userRoleName="memberOf"
userSubTree="true"
/>

Here R1-CORE is domin.

I am already user on R1-CORE domain so I have given my name userid & pwd for R1-Core Domain for connectionName & connectionPassword.

Please find the below code for web.xml.

Example Security Constraint

Sample

/*




Users





BASIC
JNDIRealm




Users


After that I have restarted the tomcat and hit the url http://localhost:8080/Sample/index.html. window throw popup for login. I entered username (R1-COREusrname) & pwd(********) and tomcat has thrown below error.

an 14, 2010 11:48:32 AM org.apache.catalina.realm.JNDIRealm authenticate
SEVERE: Exception performing authentication
javax.naming.InvalidNameException: cn=R1-COREusrname,DC=r1-core,DC=r1,DC=xyz,DC=net: [LDAP: error code 34 - 0000208F: LdapErr: DSID-0C090654, comment: Error processing name, data 0, vece

After that I have restarted the tomcat and hit the url http://localhost:8080/Sample/index.html. window throw popup for login. I entered username (usrname) without domin R1-CORE & pwd(********) and tomcat has not doing any thing. I mean stop all the activity, I could b't see any log on tomcat server console.

Please suggest the best !!

   <<Less
About | Sitemap | Contact