How to pass keystore password to TomEE for PasswordCipher

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to pass keystore password to TomEE for PasswordCipher

sudhakarvm
I have implemented PasswordCipher to encrypt and decrypt the DB password
using AES algorithm. I want to store my AES key in a keystore or in a
secured place. If I store in a keystore then I need to pass the keystore
password. What is the best way to pass the keystore password.



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Reply | Threaded
Open this post in threaded view
|

Re: How to pass keystore password to TomEE for PasswordCipher

Romain Manni-Bucau
Hi,

you can use an environment var or a system property for that.

Alternatively you can use another resource or service in tomee.xml which is
configured as usual and injected into the datasource (PasswordCipher =
$myCipher or PasswordCipher = @myCipher).

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 22 juin 2018 à 10:48, sudhakarvm <[hidden email]> a écrit :

> I have implemented PasswordCipher to encrypt and decrypt the DB password
> using AES algorithm. I want to store my AES key in a keystore or in a
> secured place. If I store in a keystore then I need to pass the keystore
> password. What is the best way to pass the keystore password.
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>