Barun
Barun

Reputation: 513

Encrypting Parameters in persistence.xml

We have a batch application using OpenJPA. We are specifying all the DB connection parameters in persistence.xml. Although its a functional setup it looks very insecure to have all the ip,username,password in clear text and a serious concern in production.

As it is a standalone batch app we cant use server configurations etc. Is there a way to may JPA read the properties from an encrypted file...or at the least something like MD5 hashing the parameter values?

Upvotes: 1

Views: 3090

Answers (1)

Markus Knittig
Markus Knittig

Reputation: 631

At least passwords can be encrypted. Since OpenJPA 1.3.0 your can set an EncryptionProvider in OpenJPAConfiguration. See also the manual.

Upvotes: 3

Related Questions