DelphiFAQ Home Search:

How to store Tomcat JDBCRealm passwords encrypted

 

comments10 comments. Current rating: 3 stars (2 votes). Leave comments and/ or rate it.

Question:

I am using Tomcat's JDBCRealm to store user names, passwords and roles in a mysql database. The passwords are stored in clear text. How can I change this?

Answer:

This is quite easy. Below you see the definition of your realm in tomcat/conf/server.xml
You probably do not have the line that says
digest=MD5

Add this line and tomcat expects passwords to be stored as an MD5 hash of the original password.

You also need to update any code that you have that inserts/ updates users and passwords. If you choose MD5 as suggested in the example, you can use mysql's built-in MD5() function.

insert into users(username,password) values ("mike",md5("secret"))

<Realm className="org.apache.catalina.realm.JDBCRealm" driverName="org.gjt.mm.mysql.Driver"
         connectionName="XXX" connectionPassword="YYY"
         connectionURL="jdbc:mysql://localhost/mydb"
         digest="MD5"
         userTable="users" userNameCol="username" userCredCol="password"
         userRoleTable="user_roles" roleNameCol="rolename"/>

Content-type: text/html

Comments:

2012-06-18, 21:53:17
anonymous from Colombia  
One alleged victim would routinely throw away his underwear to hide [url= http://www.louisvui..net/]Louis Vuitton Bags[/url] the supposed abuse. Week two of the trial began with a final prosecution witness. The mother of Victim No. 9 took the [url= http://www.chanelou..et/]Chanel Purses[/url] stand Monday to detail her son’s cover-up of the alleged sordid acts he suffered at Sandusky’s hands. “I [url= http://www.guccibel..rg/]Hermes Belts[/url] always wondered why he never had any underwear in the laundry,” she testified. “He just told me he had an [url= http://www.beltsout...org/]Mens Belts[/url] accident and he threw them out.” Indeed, she testified that he started becoming “sick” more often after [url= http://www.topbelts..org/]Gucci Belts[/url] spending time with the ex-Penn State coach. Victim No. 9 supposedly slept over at the Sandusky residence more than 100 times.Victim No. 9 testified [url= http://www.louisvui..net/]Louis Vuitton Handbags[/url] last Thursday that he screamed during one episode of alleged abuse, hoping that [url= http://www.beltsonl..com/]Louis Vuitton Belts[/url] Sandusky’s wife, who he said was always upstairs, would hear. “I think the basement is soundproof,” he said [url= http://www.chanels-..om/]Chanel Handbags[/url] tearfully, noting that Sandusky’s wife Dottie never did come down.Lead defense attorney Joe Amendola has also [url= http://www.chanelba..om/]Chanel Handbag[/url] suggested previously that the accusers and the Attorney General’s office might be colluding. Lead prosecutor Joe [url= http://www.lvshopos..net/]Louis Vuitton Purses[/url] McGettigan has often queried the alleged victims while on the stand: “Have I ever, ever, ever told you what to say?” which they’ve answered with resounding denials. But it could be a larger issue for Kline and the other subpoenaed attorneys to defend themselves against a [url= http://www.louisvui..com/]Louis Vuitton Purse[/url]
charge of violating the gag order issued by Judge Cleland, which bars any representative from either side from discussing the case with the media.


2012-06-18, 21:56:26
anonymous from Colombia  
One alleged victim would routinely throw away his underwear to hide [url= http://www.louisvui..net/]Louis Vuitton Bags[/url] the supposed abuse. Week two of the trial began with a final prosecution witness. The mother of Victim No. 9 took the [url= http://www.chanelou..et/]Chanel Purses[/url] stand Monday to detail her son’s cover-up of the alleged sordid acts he suffered at Sandusky’s hands. “I [url= http://www.guccibel..rg/]Hermes Belts[/url] always wondered why he never had any underwear in the laundry,” she testified. “He just told me he had an [url= http://www.beltsout...org/]Mens Belts[/url] accident and he threw them out.” Indeed, she testified that he started becoming “sick” more often after [url= http://www.topbelts..org/]Gucci Belts[/url] spending time with the ex-Penn State coach. Victim No. 9 supposedly slept over at the Sandusky residence more than 100 times.Victim No. 9 testified [url= http://www.louisvui..net/]Louis Vuitton Handbags[/url] last Thursday that he screamed during one episode of alleged abuse, hoping that [url= http://www.beltsonl..com/]Louis Vuitton Belts[/url] Sandusky’s wife, who he said was always upstairs, would hear. “I think the basement is soundproof,” he said [url= http://www.chanels-..om/]Chanel Handbags[/url] tearfully, noting that Sandusky’s wife Dottie never did come down.Lead defense attorney Joe Amendola has also [url= http://www.chanelba..om/]Chanel Handbag[/url] suggested previously that the accusers and the Attorney General’s office might be colluding. Lead prosecutor Joe [url= http://www.lvshopos..net/]Louis Vuitton Purses[/url] McGettigan has often queried the alleged victims while on the stand: “Have I ever, ever, ever told you what to say?” which they’ve answered with resounding denials. But it could be a larger issue for Kline and the other subpoenaed attorneys to defend themselves against a [url= http://www.louisvui..com/]Louis Vuitton Purse[/url]
charge of violating the gag order issued by Judge Cleland, which bars any representative from either side from discussing the case with the media.


2012-06-18, 22:00:59
anonymous from Colombia  
One alleged victim would routinely throw away his underwear to hide [url= http://www.louisvui..net/]Louis Vuitton Bags[/url] the supposed abuse. Week two of the trial began with a final prosecution witness. The mother of Victim No. 9 took the [url= http://www.chanelou..et/]Chanel Purses[/url] stand Monday to detail her son’s cover-up of the alleged sordid acts he suffered at Sandusky’s hands. “I [url= http://www.guccibel..rg/]Hermes Belts[/url] always wondered why he never had any underwear in the laundry,” she testified. “He just told me he had an [url= http://www.beltsout...org/]Mens Belts[/url] accident and he threw them out.” Indeed, she testified that he started becoming “sick” more often after [url= http://www.topbelts..org/]Gucci Belts[/url] spending time with the ex-Penn State coach. Victim No. 9 supposedly slept over at the Sandusky residence more than 100 times.Victim No. 9 testified [url= http://www.louisvui..net/]Louis Vuitton Handbags[/url] last Thursday that he screamed during one episode of alleged abuse, hoping that [url= http://www.beltsonl..com/]Louis Vuitton Belts[/url] Sandusky’s wife, who he said was always upstairs, would hear. “I think the basement is soundproof,” he said [url= http://www.chanels-..om/]Chanel Handbags[/url] tearfully, noting that Sandusky’s wife Dottie never did come down.Lead defense attorney Joe Amendola has also [url= http://www.chanelba..om/]Chanel Handbag[/url] suggested previously that the accusers and the Attorney General’s office might be colluding. Lead prosecutor Joe [url= http://www.lvshopos..net/]Louis Vuitton Purses[/url] McGettigan has often queried the alleged victims while on the stand: “Have I ever, ever, ever told you what to say?” which they’ve answered with resounding denials. But it could be a larger issue for Kline and the other subpoenaed attorneys to defend themselves against a [url= http://www.louisvui..com/]Louis Vuitton Purse[/url]
charge of violating the gag order issued by Judge Cleland, which bars any representative from either side from discussing the case with the media.


2012-07-23, 22:41:08
anonymous from United States  
2013-02-10, 21:33:17
 
rating
txcbqmvd <a href=' http://paydayloansvba.com/ '>fast payday loan</a> 3231 <a href=' http://paydayloansvba.ca/ '>pay day loans</a> 2942 <a href=' http://paydayloansvba.co.uk/ '>payday loans UK</a> 7950
2013-02-20, 09:11:22
 
rating
ydhdvq <a href=' http://genericviagrafsb.com/ '>generic cheap viagra online</a> 8]]] <a href=' http://genericcialisfsb.com/ '>generic cialis online</a> =-]
2014-07-14, 18:22:53
anonymous from Indonesia  
kami sekeluarga tak lupa mengucapkan puji syukur kepada ALLAH S,W,T
dan terima kasih banyak kepada AKI atas nomor togel.nya yang AKI
berikan 4 angka 9259 alhamdulillah ternyata itu benar2 tembus AKI.
dan alhamdulillah sekarang saya bisa melunasi semua utan2 saya yang
ada sama tetangga.dan juga BANK BRI dan bukan hanya itu AKI. insya
allah saya akan coba untuk membuka usaha sendiri demi mencukupi
kebutuhan keluarga saya sehari-hari itu semua berkat bantuan AKI..
sekali lagi makasih banyak ya AKI… bagi saudara yang suka main togel
.
yang ingin merubah nasib seperti saya silahkan hubungi AKI SOLEH,,di
0823 1333 6747,, insya allah anda bisa seperti saya…menang togel 275
juta, wassalam.


dijamin 100% jebol saya sudah buktikan...sendiri....







Apakah anda termasuk dalam kategori di bawah ini !!!!


1'Dikejar-kejar hutang

2'Selaluh kalah dalam bermain togel

3'Barang berharga anda udah habis terjual Buat judi togel


4'Anda udah kemana-mana tapi tidak menghasilkan solusi yg tepat


5'Udah banyak Dukun togel yang kamu tempati minta angka jitunya
tapi tidak ada satupun yang berhasil..







Solusi yang tepat jangan anda putus aza....AKI SOLEH akan membantu
anda semua dengan Angka ritwal/GHOIB:
butuh angka togel 2D3D4D SGP / HKG / MALAYSIA / TOTO MAGNUM / dijamin
100% jebol
Apabila ada waktu
silahkan Hub: AKI SOLEH DI NO: (((082313336747))) ATAU <b><a href=' http://angkaramalan..gspot.com' rel='nofollow'>KLIK DISINI</a></b>



angka GHOIB: singapur 2D/3D/4D/



angka GHOIB: hongkong 2D/3D/4D/



angka GHOIB; malaysia



angka GHOIB; toto magnum 4D/5D/6D/



angka GHOIB; laos




2014-12-26, 04:11:46
anonymous  
c391c281c391e2809ac391c692c390c2b4c390c2b8c391c28c390c2b7c390c2b2c391c692c390c2 ac390c2bec390c2b7c390c2b0c390c90c2bfc390c2b8c391c281c390c2b8c391e282acc390c2b5c390c2b4c390 2b0c390c2bac391e2809ac390c2b8cb8c391e282acc390c2bec390c2b2c390c2b0c390c2bdc390c2b8c390c2b5 c390c2bcc391c692c390c2b7c391e280b9c390c2bac390c2b8c390c2b7c390c2b2c391c692c390c2 ac390c2bec391e282acc390c2b5c39c390c2b6c390c2b8c391c281c391c281c391c692c391e282acc390c2b0, steinberg csbaue, Samplitude, Pro Tools, Logic 9, plug in, vst, alals I was recommended this website by my cousin. I'm not sure whether this post is written by him as no one else know such detailed about my difficulty. You are incredible! Thanks! your article about c391c281c391e2809ac391c692c390c2b4c390c2b8c391c28c390c2b7c390c2b2c391c692c390c2 ac390c2bec390c2b7c390c2b0c390c90c2bfc390c2b8c391c281c390c2b8c391e282acc390c2b5c390c2b4c390 2b0c390c2bac391e2809ac390c2b8cb8c391e282acc390c2bec390c2b2c390c2b0c390c2bdc390c2b8c390c2b5 c390c2bcc391c692c390c2b7c391e280b9c390c2bac390c2b8c390c2b7c390c2b2c391c692c390c2 ac390c2bec391e282acc390c2b5c39c390c2b6c390c2b8c391c281c391c281c391c692c391e282acc390c2b0, steinberg csbaue, Samplitude, Pro Tools, Logic 9, plug in, vst, alalsBest Regards SchaadAndy
2015-01-30, 23:53:47
anonymous from Venezuela  
I as well as my friends were foilnwlog the nice information and facts from the blog then unexpectedly developed a terrible suspicion I never thanked the web blog owner for those secrets. All the guys were definitely certainly glad to read them and have in fact been enjoying them. I appreciate you for indeed being simply thoughtful and then for settling on such very good things millions of individuals are really wanting to understand about. Our sincere apologies for not expressing gratitude to earlier.
2015-02-13, 14:42:16
anonymous  
blindsided http://insurance-pal.net some state risks http://viagrasss.com suffer buy viswiss http://cilaisabc.com factors related http://pharamacy.com terrestris damiana

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: