File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Multiple Realm Possible? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Multiple Realm Possible?" Watch "Multiple Realm Possible?" New topic
Author

Multiple Realm Possible?

M. Siddiqui
Greenhorn

Joined: Dec 12, 2006
Posts: 3
Using MySQL 5.0 and Tomcat 5.5.20.

Currently I have:
1. Security Constraint on a folder (WebApps -> Protected).
2. Realm under server.xml so I can authenticate users listed in MySQL database.

Everything stated above still works fine, however, now I have another MySQL database (To Avoid Confustion lets call it PersonalDB) for which I have to write an application. For obvious reasons, I have to protect the application, so I decided to use security constraint to authenticate users.

Here is the problem:
1. The username and password are listed in the PersonalDB
2. I am already using a Realm for my first application
3. I am not sure if it's possible to add another Realm

I don't know how I can properly authenticate the users for my second application. Any help or information will be greatly appreciated.
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
I do not think configuration of multiple releams is possible , but you can always have a custom releam that would check the second database for authentication information if it doesnot find the required information in the first one.


Rahul Bhattacharjee
LinkedIn - Blog
M. Siddiqui
Greenhorn

Joined: Dec 12, 2006
Posts: 3
Thanks for the reply Rahul.

How can I cutomize realm?
Is there a link to a tutorial or an example I can refer to.
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by M. Siddiqui:
Thanks for the reply Rahul.

How can I cutomize realm?
Is there a link to a tutorial or an example I can refer to.


You have to write your own relean , not customer.
Look in the tomcat homepage or google about custom releams for Tomcat.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29261
    
140

Moving to our Tomcat forum


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple Realm Possible?
 
Similar Threads
How to avoid role authentication in LDAP?
How to determine user with Tomcat JDBC Realm
Problem in LDAP authentication for Tomcat
Container Managed Security on Tomcat - configuring different auth-methods
Tomcat with more than one Applications in WEBAPPS folder