Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

Devender Narula

Greenhorn
+ Follow
since Sep 10, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Devender Narula

HI Gurus

i have configured LDAP Authentication on tomcat 6.0 and it is running perfectly fine for me . my configuration is mention below .. but i got only one problem when ever i try to go on page where i have set ldap base authentication it automatically try to authentication me first and if i fail then give me login and password windows .. is there is any possibility i can stop that auto authentication ,as soon as anybody go on that page first things comes to them is basic login/password screen .

please let me know if you need more info
configuration in server.xml

<Realm className="org.apache.catalina.realm.JNDIRealm"
connectionURL="ldap://test:389";
alternateURL="ldap://test1:389";
connectionName="CN=test,DC=ac,DC=uk"
connectionPassword="tttt"
userRoleName="member"
userBase="DC=ac,DC=uk"
roleBase="DC=ac,DC=uk"
userPattern="cn={0},DC=ac,DC=uk"
roleName="cn"
roleSearch="(member={0})"
roleSubtree="true"
debug="99"
/>

configuration in web.xml


<security-constraint>
<display-name>portal</display-name>
<web-resource-collection>
<web-resource-name>portal</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>test</role-name>
</auth-constraint>
</security-constraint>
<login-config> <auth-method>BASIC</auth-method> <realm-name>ACCESS CURRENTLY RESTRICTED</realm-name> </login-config>
<security-role>
<role-name>test</role-name>
</security-role>
9 years ago
Hi tim

thanks for this detail info .. i will try to follow this ..

will update you what will be the outcome.

Regards,

Devender
10 years ago
HI Tim

thanks for reply.. i tried following the documentation for JNDI but its really confusing for me .. being having very little knowledge of tomcat not sure where i am wrong.. if anybody got small steps documented somewhere which i can follow that will be great.. any steps or set of instructions will really help me allot

Regards,

Dev

10 years ago
HI Jai

thanks for reply.. no they don't belong to my application .. actually i want to implement security for one page in my application .. if anybody try to access that page they should first authenticated via ldap server and then should able to see it

i am following

http://craeser.wordpress.com/2010/07/21/java-tomcat-security-protected-example/

link ..

please see if you have any other way to implement security in tomcat without changing devlopers code.

Regards,

Devender
10 years ago
HI guys

i implementing security via ldap in tomcat 6 .. to do this i need to copy login.jsp,index.jsp and error of jsp . but i am not able to figure out in which folder i should copy this

in

webapps/myapplication/WEB-INF/ folder

or Apacheserver/conf folder

or any other folder..

if anybody has implemented security in tomcat6 please help me .

Regards,

dev
10 years ago