-
1. Re: Encrypt datasource password
grgrzybek Sep 5, 2016 2:39 AM (in response to gfuhr2016)Hello Gustavo
Encrypting property in etc/*.cfg file is one thing. The other is to decrypt it where it's actually needed.
If you're defining your datasource in blueprint XML file (and I guess you do), please read "Using encrypted property placeholders" section of http://karaf.apache.org/manual/latest-3.0.x/#_encryption_service. Even if it's about Karaf 3.0.x, it should work with Fuse as well.
best regards
Grzegorz Grzybek
-
2. Re: Encrypt datasource password
gfuhr2016 Sep 5, 2016 10:12 AM (in response to grgrzybek)Hi Grzegorz
Thanks for your answer
I'm not using blueprint, the datasource is used from java code (running in Karaf as a bundle). I think not possible to make a blueprint, because it's a legacy code (jar) integrated in a camel processor, and we need to use this code as black-box.
The datasource is being accesed like a standard JNDI datasource from this legacy Java code:
....
....
Context context = new InitialContext();
dataSource = (DataSource)context.lookup("osgi:service/jdbc/cmmConfigDS");
Connection connection = dataSource.getConnection();
....
....
Thanks again
Regards