Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
JSP - A mailing list about Java Server Pages specification and reference
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Howto Apache LDAP ACL pass to Tomcat ??

Howto Apache LDAP ACL pass to Tomcat ??

2006-11-20       - By Jack Yu

 Back
Try to pass apache ACL authenticated user credential to Tomcat, but failed.



System: FreeBSD 6.1, Apache 2.2.3, SUN jdk 1.4.2, Tomcat 5.5

Apache is setup to authenticate against LDAP server

<Directory />
   AuthLDAPURL ldap://ldap.jackyu.org/dc=jackyu,dc=org?uid
   AuthLDAPGroupAttributeIsDN off
   AuthLDAPGroupAttribute memberUid
   AuthLDAPBindDN cn=bind,ou=SystemAccounts,dc=jackyu,dc=org
   AuthLDAPBindPassword ******
   AuthType basic
   AuthName "AAA"
   AuthBasicProvider ldap
   require ldap-group cn=test,ou=Groups,dc=jackyu,dc=org
   AllowOverride None
   Order deny,allow
   Deny from all
   AuthzLDAPAuthoritative on
</Directory>

Users with LDAP group membership of test can authenticated themselves while
accessing the home page in apache, http://jackyu.org/index.html.



When apache ACL authenticated users go to http://jackyu.org/xyz/index.jsp,
the page will go through mod_jk and parse to tomcat server (on the same
host)

here is the mod_jk in httpd.conf.
# mod_jk.so settings
JkWorkersFile "/usr/local/etc/apache22/workers.properties"
JkLogFile "/var/log/mod_jk.log"
JkLogLevel debug
JkMount /xyz abc
JkMount /zyx/* abc
# end of mod_jk.so settings


here is the workers.propertises

worker.list=abc
worker.abc.port=8009
worker.abc.host=localhost
worker.abc.type=ajp13
worker.abc.lbfactor=1
worker.abc.cachesize=10
worker.abc.cache_timeout=600
worker.abc.socket_keepalive=1
worker.abc.recycle_timeout=300



I have also added tomcatAuthentication="false" to the server.xml in tomcat.

   <Connector port="8009"
           enableLookups="false" redirectPort="8443"
    protocol="AJP/1.3" tomcatAuthentication="false" />





in the tomcat webapp /xyz, added the following the the web.xml

<!-- Define a Security Constraint on this Application -->
 <security-constraint>
   <web-resource-collection>
     <web-resource-name> AAA </web-resource-name>
               <url-pattern>/*</url-pattern>
               <http-method>HTTP</http-method>
               <http-method>GET</http-method>
               <http-method>POST</http-method>
               <http-method>PUT</http-method>
               <http-method>DELETE</http-method>
   </web-resource-collection>
   <auth-constraint>
      <role-name>test</role-name>
   </auth-constraint>
 </security-constraint>

<!-- Define the Login Configuration for this Application -->
 <login-config>
   <auth-method>BASIC</auth-method>
   <realm-name>AAA</realm-name>
 </login-config>

 <!-- Security roles referenced by this web application -->
 <security-role>
   <description>
     The role that is required to log in to the AAA
   </description>
   <role-name>test</role-name>
 </security-role>



The apache authenticated user credential (with ldap group test) didn't pass
to tomcat properly. The log file displayed null for user.


Also, if users copy paste the url, http://jackyu.org/xyz/index.jsp, to a new
browser, no apache ACL login popup.


Anyone knows how to make this work?


Thanks


Jack Yu
jack@(protected)



-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.