Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Spring DataSource Defination With Secured Password

Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to acheive the following
1. In the Creation of the DATASOURCE Bean in Spring Configuration file , the password should be encrypted.

Now we have a way to encrypt/decrypt the password. Now the problem is to how we should set the same in the DataSource Defination.

I looked into the API and found out the following
a) DriverManagerDataSource. The issue is that it dosen't supports the Connection Pool.

Also the other way which I was possibly trying to do is to read the ENCRYPTED password from the Spring file and decrypt the same and store it in Some Statis Fields (At the Application Level) and wire this in the bean attribute.
Can you guide me as to how we can define the Application Level Variable in Spring and How to attach the same to a BEan's property.

Or is there any other way to get the ENCRYPTED Password implementation in Spring
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once we had this requirement we hardcoded md5() in the sql statement itself to save the encrypted password & also did similar changes in the applicationSecurity.xml having code as

I hope thats what problem was , if possibly if I have misinterpreted the problem kindly pardon me & would request for more detailed explanantion.
Run away! Run away! Here, take this tiny ad with you:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic