• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Using JDBCRealm - Need help

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic