wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Using JDBCRealm - Need help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Using JDBCRealm - Need help " Watch "Using JDBCRealm - Need help " New topic
Author

Using JDBCRealm - Need help

Leticia Barbalho
Ranch Hand

Joined: Sep 02, 2005
Posts: 37
Hello everyone,

I'd like to know how I can use the JDBCRealm in my situation. Let me try to explain the tables I have:

- USERS: User, Password, UserGroup
- GROUPS: Group, Description
- MODULES: Module, name
- RIGHTS: UserGroup, Module, Edit, Insert, Delete, Print

I got this really nice tutorial: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/JDBCRealm-howto.html but still, it seems that it won't be useful for me because I need to store users and groups, not only users. My rights are defined by group (which means I will use the GROUPS table in the config) and I'll often need to retrieve the user from the session (and apparently this information won't be stored).

Does anyone know how I should do it with this kind of table structure?

Something else: What if I have my own encrypt algorithm and do not wanna use MD5, SHA or anything else?
Simon Good
Ranch Hand

Joined: Sep 19, 2002
Posts: 30
If I was you I'd write my own implementation of a javax.security.auth.spi
LoginModule.

If you want some simple examples to mess about with and get some ideas of what to do look at these http://free.tagish.net/jaas/index.jsp.

Hope that's enough to get you started
 
Don't get me started about those stupid light bulbs.
 
subject: Using JDBCRealm - Need help
 
Similar Threads
Do I re-use existing declarative role-based data structures for user authorization?
Tomcat security problem????
JDBCRealm login authentication in TOMCAT
Need help viewing the Tomcat Manager
What server for W2000