tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakarta Tomcat Newsgroup (@Basebeans.com) <jakarta-...@basebeans.com>
Subject Re: HELP!! Container managed authentication problem with Apache 1.3 + Tomcat 4 + Warp
Date Tue, 02 Apr 2002 02:10:01 GMT
Subject: Re: HELP!! Container managed authentication problem with Apache 1.3 + Tomcat 4 + Warp
From: "Hyunjin Kim" <hyunjin@itline.biz>
 ===
uh oh...

I just found out that tomcat example application's security stuff works fine
from port 80. That means the apache-tomcat connection was not the problem...


I also found out that the username/password combination defined in
/jakarta-tomcat/conf/tomcat-users.xml works(go through the authentication
with role defined in that tomcat-users.xml file).

and that doesn't make sense....

here's my server.xml for the application i am developing:

<!-- Nano Enc Context -->
  <Context path="/nanoenc" docBase="nanoenc"
   debug="0" reloadable="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
     prefix="nanoenc_log." suffix=".txt"
     timestamp="true"/>

    <!-- Using JCBC Realm for security reasons.. -->
    <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
     driverName="com.jk.jdbc.Driver"
     connectionName="sa"
     connectionPassword="9999"
     connectionURL="jdbc:jk://211.333.999:1433/database=Nano"
     userTable="tblUSER" userNameCol="user_name" userCredCol="user_password"
     userRoleTable="tblUSER_ROLE" roleNameCol="role_name" />
  </Context>

I haven't deleted the
      <Realm className="org.apache.catalina.realm.MemoryRealm" />
section that came with server.xml file, but it said realm from lower level
would override the global one.. so.. this should work right?? (Of course it
works when called from stand alone tomcat...)


and my web.xml for my
application(jakarta-tomcat/webapp/nanoenc/WEB-INF/web.xml):

<security-constraint>
  <web-resource-collection>
   <web-resource-name>Intranet Security Constraint</web-resource-name>
   <url-pattern>/intranet/*</url-pattern>
  </web-resource-collection>
  <auth-constraint>
   <role-name>employee</role-name>
   <role-name>administrator</role-name>
  </auth-constraint>
 </security-constraint>

 <login-config>
 <auth-method>FORM</auth-method>
     <realm-name>default</realm-name>
     <form-login-config>
       <form-login-page>/login.jsp</form-login-page>
       <form-error-page>/loginerror.jsp</form-error-page>
     </form-login-config>
 </login-config>



I think I am very close... but no cigar yet..

I need to have apache understand that I am going to use different
authentication method for context "nanoenc". (it might be impossible for me
to fix this without changing code for warp or tomcat.. i guess..)

If you give me any idea or helping hand, I will really appreciate.
Thank you!!



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message