cancel
Showing results for 
Search instead for 
Did you mean: 

How can we decrypt database password before get connection to database ?

Former Member
0 Kudos

Hi All , I need decrypt database password before get connection to database with private key. Anyone know what is the standard bean which do this? if no standard bean, how can i realize this? We can do it by overriding AbstractTenant Class , but is it recommended ?? thanks in advance.

Former Member
0 Kudos

Any updates anyone?

Former Member
0 Kudos

Waiting for this answer

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi , we are trying to use JNDI to have factory for encryption of DB password.

Former Member
0 Kudos

Till now i got following updates: Data Source Implementation is in AbstractTenant , but method are in Private , so we can not override that .Some methods of Datasource are private and the rest are protected or public. You may have to implement both Datasource and the factory that instantiates the Datasource as the factory class doesnt use DI.

What I think is there is not a way provided by Hybris to use encrypted values from local.properties. 2 possible solutions:

1) Use your deployment scripts to inject the passwords (token replacement) and lock down server access. If using jenkins you can use something like https://wiki.jenkins-ci.org/display/JENKINS/Mask+Passwords+Plugin

2)Use encrypt password in tomcat and use JNDI (http://www.jdev.it/encrypting-passwords-in-tomcat/)

Presently I am trying approach 1 will keep posted.