ODP: JDBC Realm Problems; Probably server.xml related...

2001-03-12 Thread Herchel Wojciech

and does not work for bunch of others...

vVolf


 -Oryginalna wiadomooe-
 Od: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]]
 Wysano: 12 marca 2001 09:53
 Do: '[EMAIL PROTECTED]'
 Temat: RE: JDBC Realm Problems; Probably server.xml related...
 
 
  looks like jdbcrealm is not tip-top finished - it's 
  malfunctioning all the
  time. 
 
 Thanks for you help... 
 
 but JDBCRealm works for a bunch of other people ( me too ).. 
 
 Your help will be highly appreciatted to help out in "tip-top" finish
 it..
 
 TIA
 
 Saludos ,
 Ignacio J. Ortega
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




ODP: JDBC Realm Problems; Probably server.xml related...

2001-03-12 Thread Herchel Wojciech

i'm sorry - i did not mean to offend you - my point was only that it is not
perfect.
i still have a problem with jdbcrealm and it wasn't me who first said that "
looks
like some of the code [jdbcRealm] in 3.2.1 is never called." 
anyways, keep up with the good work! :)

vVolf


 -Oryginalna wiadomooe-
 Od: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]]
 Wysano: 12 marca 2001 10:12
 Do: '[EMAIL PROTECTED]'
 Temat: RE: JDBC Realm Problems; Probably server.xml related...
 
 
 Well you can:
 
 * report a bug in http://nagoya.apache.org/bugzilla 
 
 * study JDBCRealm and related and send a patch ( trought a bug report
 I.e. ) to help us solve your problems.
 
 * Buy some other container... that resolves your problems.. :)
 
 Whichever way you elect to help yourself, will help us too... but only
 words can not help anybody
 
 TIA
 
 Saludos ,
 Ignacio J. Ortega
 
 
  -Mensaje original-
  De: Herchel Wojciech [mailto:[EMAIL PROTECTED]]
  Enviado el: lunes 12 de marzo de 2001 10:00
  Para: '[EMAIL PROTECTED]'
  Asunto: ODP: JDBC Realm Problems; Probably server.xml related...
  
  
  and does not work for bunch of others...
  
  vVolf
  
  
   -Oryginalna wiadomooec-
   Od: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]]
   Wyslano: 12 marca 2001 09:53
   Do: '[EMAIL PROTECTED]'
   Temat: RE: JDBC Realm Problems; Probably server.xml related...
   
   
looks like jdbcrealm is not tip-top finished - it's 
malfunctioning all the
time. 
   
   Thanks for you help... 
   
   but JDBCRealm works for a bunch of other people ( me too ).. 
   
   Your help will be highly appreciatted to help out in 
  "tip-top" finish
   it..
   
   TIA
   
   Saludos ,
   Ignacio J. Ortega
   
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, email: 
 [EMAIL PROTECTED]
   
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, email: [EMAIL PROTECTED]
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




ODP: JDBC Realm Problems; Probably server.xml related...

2001-03-11 Thread Herchel Wojciech

looks like jdbcrealm is not tip-top finished - it's malfunctioning all the
time. 
my idea is that tomcat tries to tell you that a connetionName is missing -
on the other hand docs say it's optional... anybody any ideas?

vVolf


 -Oryginalna wiadomooe-
 Od: eric chacon [mailto:[EMAIL PROTECTED]]
 Wysano: 12 marca 2001 03:13
 Do: [EMAIL PROTECTED]
 Temat: JDBC Realm Problems; Probably server.xml related...
 
 
 I am trying to set up a JDBC Realm on tomcat 3.2.1. After 
 modifying the 
 server.xml file (shown below), tomcat will no longer start.
 
 I am quite new to tomcat and Linux, in genral.
 
 I have not modified any of the other xml files (the web.xml for my 
 application, for instance).
 
 I have set up my database (Postgresql) as described in the 
 JDBC Realms 
 How-To.
 I'm running on Linux (Corel, if it matters).
 I've added the mod_jk.so; Apache handles static HTML and 
 routes requests for 
 JSPs and Servlets to Tomcat. This appears to work fine.
 
 
 Here is my entry in the server.xml file
 
  RequestInterceptor
 className="org.apache.tomcat.request.JDBCRealm"
 debug="99"
 driverName="org.postgresql.Driver"
   
 connectionURL="jdbc:postgresql://localhost:5432/mysite_userdb"
 userTable="users"
 userNameCol="user_name"
 userCredCol="user_pass"
 userRoleTable="user_roles"
 roleNameCol="role_name" /
 
 Here is the error I get when I try to start Tomacat
 
 FATAL:java.lang.RuntimeException: JDBCRealm.start.readXml: 
 The user property 
 is missing. It is mandatory.
 java.lang.RuntimeException: JDBCRealm.start.readXml: The user 
 property is 
 missing. It is mandatory.
 at 
 org.apache.tomcat.request.JDBCRealm.contextInit(JDBCRealm.java,
 Compiled Code)
 at
 org.apache.tomcat.core.ContextManager.initContext(ContextManager.java,
 Compiled Code)
 at 
 org.apache.tomcat.core.ContextManager.init(ContextManager.java,
 Compiled Code)
 at 
 org.apache.tomcat.startup.Tomcat.execute(Tomcat.java, Compiled
 Code)
 at org.apache.tomcat.startup.Tomcat.main(Tomcat.java, 
 Compiled Code)
 
 I have all the necessary databases set up, I can connect to 
 postgres from 
 stand-alone programs. I have the JDBC drivers in the 
 classpath and in the 
 tomcat/lib directory.
 
 If I remove the connectionURL line or the driverName line, I 
 get appropriate 
 error messages telling me that these attributes are required.
 
 If I remove the RequestInterceptor entry for JDBC realms 
 entirely, tomcat 
 starts, and I can run servlets and JSPs.
 
 I'm not sure what a user property is... is this a simple 
 oversight that I'm 
 missing?
 
 Cheers, and thanks,
 
 Eric
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




ODP: JDBC Realm not triggering

2001-03-05 Thread Herchel Wojciech

form auth does work, only j_security_check is not found.

vVolf


 -Oryginalna wiadomooe-
 Od: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]]
 Wysano: 5 marca 2001 09:52
 Do: '[EMAIL PROTECTED]'
 Temat: RE: JDBC Realm not triggering
 
 
 Please revise http://localhost:8080/examples/jsp/security/protected ..
 
 The problem is that you need to access a protected resource for FORM
 auth to work.., not directly the Login formin the config below ..
 you need to acess a url with the form
 http://localhost:8080/context/pwAdmin/ i.e ( i dont know the 
 exact name
 of the context .. try substitute "context" with the right one 
 ).. after
 that Tomcat tries to authenticate the user prior to access 
 the resource
 ..  showing the login form.. when you make a correct 
 authentication.. it
 redirect the form the login page to the original protected resource ..
 does not have sense to try to access directly the login form..
 
 
 Saludos ,
 Ignacio J. Ortega
 
 
  -Mensaje original-
  De: Herchel Wojciech [mailto:[EMAIL PROTECTED]]
  Enviado el: lunes 5 de marzo de 2001 8:14
  Para: '[EMAIL PROTECTED]'
  Asunto: ODP: JDBC Realm not triggering
  
  
  same problem here - still don't know how to solve it :(
  
  vVolf
  
  
   -Oryginalna wiadomooec-
   Od: Mike Slinn [mailto:[EMAIL PROTECTED]]
   Wyslano: 2 marca 2001 18:59
   Do: [EMAIL PROTECTED]
   Temat: JDBC Realm not triggering
   
   
   I feel like I sailed off the edge of the known universe, 
   because there isn't
   much documentation for form-based authentication using JDBC 
  realms (at
   least, none that I could find, beyond the short 
   JDBCRealm.howto included in
   the TomCat docs).
   
   I am using Windows NT Server 4sp6 with JDK1.3 and Tomcat 3.2.1.
   
   I made the following changes to server.xml:
   
   !-- RequestInterceptor 
   className="org.apache.tomcat.request.SimpleRealm"
   debug="0" / --
   RequestInterceptor 
 className="org.apache.tomcat.request.JDBCRealm"
debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://blahblah.com:3306/database"
connectionName="secret"
connectionPassword="secret"
userTable="Users" userNameCol="userId" 
  userCredCol="userPassword"
userRoleTable="UserPriv" roleNameCol="privLevel" /
   
   The database tables exist, exactly as shown in 
   RequestInterceptor, since
   mySql is case-sensitive w.r.t. table names.
   
   Here is a piece of my web.xml:
   
 security-constraint
   web-resource-collection
 web-resource-namedeveloper/web-resource-name
 url-pattern/pwAdmin/*/url-pattern
 url-pattern/pwModerator/*/url-pattern
 url-pattern/pwNormal/*/url-pattern
 url-pattern/pwPortal/*/url-pattern
 url-pattern/pwTest/*/url-pattern
 http-methodget/http-method
 http-methodpost/http-method
   /web-resource-collection
   
   auth-constraint
 role-namedeveloper/role-name
   /auth-constraint
   
   user-data-constraint
 transport-guaranteeNONE/transport-guarantee
   /user-data-constraint
 /security-constraint
   
 login-config
   auth-methodFORM/auth-method
   realm-nameJDBC/realm-name
   form-login-config
 form-login-page/index.html/form-login-page
 form-error-page/register.jsp/form-error-page
   /form-login-config
 /login-config
   
 security-role
   role-namedeveloper/role-name
 /security-role
   
   
   Here is the authentication form:
   form method="POST" action="j_security_check"
  Login id: input type="text" name="j_username" size="8"
   class=formStylebr
  Password: input type="password" name="j_password" size="8"
   class=formStylebr
input type="submit" value="  Log In  " name="LogIn"
   class=formStyle
   /form
   
   
   When I press the submit button, I get the following error:
   HTTP 404 - File not found
   The url reported is http://localhost:8080/j_security_check
   
   Somehow the form action is not being picked up by the 
  TomCat security
   mechanism.  What have I missed?
   
   A few more questions:
- If I omit transport-guarantee, does it default to NONE?
- Is it possible to use * for http-method to specify 
  that all HTTP
   methods are to be subject to security?
- I would like to use a numeric column in the database to 
   store the user
   authentication level, rather than a text string.  Can the 
   JDBC realm be set
   up to work this way?
- I found very little documentation regarding form-based 
   authentication
   using JDBC realms. Can you point me to some more?
   
   ... thanks
   Mike
   
   
   
  
 ---

ODP: JDBC Realm not triggering

2001-03-05 Thread Herchel Wojciech


 JDBRealm  has *nothing* to do with FORM or BASIC or web.xml 
 settings..,
 it's ONLY a way to store user details inside a DB, .

very much so. but the problem is with the form, not with jdbc or anything
else. tomcat cannot exceute action j_security_check, thus throwing a 404
error. i did revised examples files though, and did exactly as told. 
still no luck.

regards,
vVolf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




ODP: JDBC Realm not triggering

2001-03-04 Thread Herchel Wojciech

same problem here - still don't know how to solve it :(

vVolf


 -Oryginalna wiadomooe-
 Od: Mike Slinn [mailto:[EMAIL PROTECTED]]
 Wysano: 2 marca 2001 18:59
 Do: [EMAIL PROTECTED]
 Temat: JDBC Realm not triggering
 
 
 I feel like I sailed off the edge of the known universe, 
 because there isn't
 much documentation for form-based authentication using JDBC realms (at
 least, none that I could find, beyond the short 
 JDBCRealm.howto included in
 the TomCat docs).
 
 I am using Windows NT Server 4sp6 with JDK1.3 and Tomcat 3.2.1.
 
 I made the following changes to server.xml:
 
 !-- RequestInterceptor 
 className="org.apache.tomcat.request.SimpleRealm"
 debug="0" / --
 RequestInterceptor className="org.apache.tomcat.request.JDBCRealm"
  debug="99"
  driverName="org.gjt.mm.mysql.Driver"
  connectionURL="jdbc:mysql://blahblah.com:3306/database"
  connectionName="secret"
  connectionPassword="secret"
  userTable="Users" userNameCol="userId" userCredCol="userPassword"
  userRoleTable="UserPriv" roleNameCol="privLevel" /
 
 The database tables exist, exactly as shown in 
 RequestInterceptor, since
 mySql is case-sensitive w.r.t. table names.
 
 Here is a piece of my web.xml:
 
   security-constraint
 web-resource-collection
   web-resource-namedeveloper/web-resource-name
   url-pattern/pwAdmin/*/url-pattern
   url-pattern/pwModerator/*/url-pattern
   url-pattern/pwNormal/*/url-pattern
   url-pattern/pwPortal/*/url-pattern
   url-pattern/pwTest/*/url-pattern
   http-methodget/http-method
   http-methodpost/http-method
 /web-resource-collection
 
 auth-constraint
   role-namedeveloper/role-name
 /auth-constraint
 
 user-data-constraint
   transport-guaranteeNONE/transport-guarantee
 /user-data-constraint
   /security-constraint
 
   login-config
 auth-methodFORM/auth-method
 realm-nameJDBC/realm-name
 form-login-config
   form-login-page/index.html/form-login-page
   form-error-page/register.jsp/form-error-page
 /form-login-config
   /login-config
 
   security-role
 role-namedeveloper/role-name
   /security-role
 
 
 Here is the authentication form:
 form method="POST" action="j_security_check"
Login id: input type="text" name="j_username" size="8"
 class=formStylebr
Password: input type="password" name="j_password" size="8"
 class=formStylebr
  input type="submit" value="  Log In  " name="LogIn"
 class=formStyle
 /form
 
 
 When I press the submit button, I get the following error:
 HTTP 404 - File not found
 The url reported is http://localhost:8080/j_security_check
 
 Somehow the form action is not being picked up by the TomCat security
 mechanism.  What have I missed?
 
 A few more questions:
  - If I omit transport-guarantee, does it default to NONE?
  - Is it possible to use * for http-method to specify that all HTTP
 methods are to be subject to security?
  - I would like to use a numeric column in the database to 
 store the user
 authentication level, rather than a text string.  Can the 
 JDBC realm be set
 up to work this way?
  - I found very little documentation regarding form-based 
 authentication
 using JDBC realms. Can you point me to some more?
 
 ... thanks
 Mike
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




ODP: jdbc realm

2001-03-04 Thread Herchel Wojciech

basically it is used to authenticate users against data-base, it;s more
flexible that simplerealm, based on a file (tomcat-users.xml) stored in
memory.

vVolf


 -Oryginalna wiadomooe-
 Od: mikhail malamud [mailto:[EMAIL PROTECTED]]
 Wysano: 5 marca 2001 05:22
 Do: [EMAIL PROTECTED]
 Temat: jdbc realm
 
 
 Hello -
 What is the purpose of a jdbc realm. Configuring it into server.xml
 seems rather easy but what is the practical usage? Can anyone show how
 he/she uses jdbc realm. Thanks.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




ODP: jdbc realm

2001-03-04 Thread Herchel Wojciech

 JDBC Realm has a couple of problems, for those of you using it.
 
 1) It has to change pretty radically between 3.2.1 and 3.3.1. 
  It looks
 like some of the
 code in 3.2.1 is never called.
^^
most likely. i'm using tomcat 3.2.1 and after mySQL closes the connection,
tomcat tries to reconnect, but for no apparent reason is not providing any
password but changing connection String to 
"jdbc:mysql://localhost/database?user=meamp;password=secret" does the
trick. however, now after reconnection tomcat cannot get a role associated
with a user. anybody knows why?
this is what tomcat logs:
--
2001-03-02 08:04:53 - ContextManager: JDBCRealm: Auth ok, user=user1
2001-03-02 08:04:53 - ContextManager: JDBCRealm: Controled access for user1
R(  + /protected/panel.jsp + null) Ct
(jsp(org.apache.jasper.servlet.JspServlet/null) )
2001-03-02 08:04:53 - ContextManager: JDBCRealm: There was an SQLException
while in getUserRoles: user1
2001-03-02 08:04:53 - ContextManager: JDBCRealm: SQLException:
java.sql.SQLException: Communication link failure: java.io.IOException
2001-03-02 08:04:53 - ContextManager: JDBCRealm: Auth ok, user has no roles
2001-03-02 08:04:53 - ContextManager: JDBCRealm: UnAuthorized test
2001-03-02 08:06:26 - ContextManager: JDBCRealm: The database connection is
null 

would you recommend upgrading tomcat?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]