Solved

how to override jdbc realm to read my tables for authentication

Posted on 2002-06-12
5
478 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

615 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