Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to override jdbc realm to read my tables for authentication

Posted on 2002-06-12
5
Medium Priority
?
485 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Files go missing when using DFS (Distributed File System) Replication and how to recover them and fix it.
What we learned in Webroot's webinar on multi-vector protection.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

719 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