Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple Realm Possible?

 
M. Siddiqui
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
M. Siddiqui
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our Tomcat forum
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic