May 19th, 2009, 07:05 AM
Recommended options to Encrypt datasource password
i am looking at recommendations for encrypting passwords in job xml or property files that it reads so that passwords are not in plain text..
In org.springframework.batch-2.0.0.RELEASE\samples\org.springframework.batch.sa mples\src\main\resources\batch-oracle.properties the value for batch.jdbc.password=spring is in clear.. what would be approach to encrypt password and make it available within batch framework..
Thanks in advance...
May 19th, 2009, 12:33 PM
If it were me, I would use a FactoryBean to wrap the dataSource, and unencrypt the password there. There may be a better way though. In terms of performing the actual encryption, that's a bit out of scope for this forum, and there's a ton of different ways to do it.
May 19th, 2009, 12:47 PM
did you fix this problem?
Even myself need to encrypt and decrypt my db2 password that I hard coded in batch-db2zos.properties.
As I'm planning to deploy this as a client application in websphere can I configure datasource there and pick the password directly?
Is it possible for client applications?
In case enc/dec is the right options, can you suggest a little more details on this?
May 19th, 2009, 01:15 PM
Use jasypt. I blogged about this about six months ago...