Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to override jdbc realm to read my tables for authentication

Posted on 2002-06-12
5
Medium Priority
?
487 Views
Last Modified: 2008-03-17
hi all,

i would like to know how to override tomcat jdbc realm to read my authentication table to get the appropriate info.

jdbc realm expects 3 tables, user, role and user_role and the passwords are not encrypted. i have my own table and the passwords are encrypted. how do i change tomcat jdbc realm to read my table and encrpyt the incoming password and do the comparision. can i inherit the realm classes and if so which method to override.

thanks.
0
Comment
Question by:ahuen
5 Comments
 
LVL 6

Expert Comment

by:kotan
ID: 7074601
The things you should do is configure the server.xml, no need to inherif the realm classess and override method.

As I know jdbc realm only expects 2 tables, user and user_role.

You can change <Realm> in server.xml to connect to ur own database, as well as encrpty the password.

Here is the references,

For server.xml configuration,
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html#JDBCRealm


For password encrption,
See "Digested password" section under the same page.
0
 

Author Comment

by:ahuen
ID: 7075423
kotan,

"You can change <Realm> in server.xml to connect to ur own database, as well as encrpty the password."

Suggest that i have to use tomcat's encryption. which is not what i want.

Anyway i got it working last night by inheriting the realm classes and override -ed the authenticate method and it is all good now.

thanks.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7099008
ahuen: since you were able to solve this on your own, you should probably delete it or request it to be PAQd.  So you can save your points for other help if you require it in the future :-)

CJ
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 9560061
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

"To be PAQd/Points refunded."
 
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Kuldeepchaturvedi
EE Cleanup Volunteer
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 9610627
PAQed, with points refunded (150)

Computer101
E-E Admin
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Aerodynamic noise is the cause of the majority of the noise produced by helicopters. The inordinate amount of noise helicopters produce is a major problem in the both a military and civilian setting. To remedy this problem the use of an aerogel coat…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question