You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by koch <ma...@averbis.com> on 2020/11/23 12:33:06 UTC

Docker Secrets

Hi

We are trying to get docker a docker secret in out database configuration.
We added the property 
'org.apache.felix.configadmin.plugin.interpolation.secretsdir' to the 
custom.properties file.

org.apache.felix.configadmin.plugin.interpolation.secretsdir=${env:SECRETS_DIR:-/run/secrets/} 
Then we adjusted the password property in our database jdbc config file 
(org.ops4j.datasource-foobar.cfg): 
password=${secret:database_password:-foobar} It seems like he is taking 
the default value and not our configured secret. What are we doing 
wrong? Kind regards, Matthias


Re: Docker Secrets

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi,

Which Karaf version are you using ?

I added the interpolation plugin in Karaf 4.3.0.

So, if you use 4.2.x, it won’t work (or you have to wait 4.2.10).

Regards
JB

> Le 23 nov. 2020 à 13:33, koch <ma...@averbis.com> a écrit :
> 
> Hi 
> 
> We are trying to get docker a docker secret in out database configuration. 
> We added the property 'org.apache.felix.configadmin.plugin.interpolation.secretsdir' to the custom.properties file.
> 
> org.apache.felix.configadmin.plugin.interpolation.secretsdir=${env:SECRETS_DIR:-/run/secrets/}
> 
> Then we adjusted the password property in our database jdbc config file (org.ops4j.datasource-foobar.cfg):
> 
> password=${secret:database_password:-foobar}
> 
> It seems like he is taking the default value and not our configured secret.
> 
> What are we doing wrong? 
> 
> Kind regards,
> Matthias
>