<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello Jurijs,<div class=""><br class=""></div><div class="">Thank you for the link, Docker secrets is definitely something that would be an option, and yes, holding anything in a variable or somewhere it can be easily queried isn’t going to work.</div><div class=""><br class=""></div><div class="">We’ll see what happens.</div><div class=""><br class=""></div><div class="">Cheers - Robert...</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 16 Nov 2017, at 10:41, Jurijs Ivolga <<a href="mailto:jurijs.ivolga@gmail.com" class="">jurijs.ivolga@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class="">Hi,<br class=""><br class=""></div>Not sure that this helps, but below is how I solved similar issue by generating include file inside Docker file using env variables, but this is not a good approach for sensitive data.<br class=""></div><div class=""><pre class=""><span class="gmail-m_-5049828624229244701gmail-nb">echo</span> <span class="gmail-m_-5049828624229244701gmail-s2">"\</span>
<a name="m_-5049828624229244701_Dockerfile-26" class=""></a><span class="gmail-m_-5049828624229244701gmail-s2">modparam(\"http_client\", \"httpcon\", \"apiserver=>https://</span><span class="gmail-m_-5049828624229244701gmail-nv">$apiurl</span><span class="gmail-m_-5049828624229244701gmail-s2">\"<wbr class="">); \</span>
<a name="m_-5049828624229244701_Dockerfile-27" class=""></a><span class="gmail-m_-5049828624229244701gmail-s2">"</span> >> /kamailio.apiurl</pre></div>I believe you can use docker secrets, as described below, but I never used them so I can't help much:</div><div class=""><br class=""></div><div class=""><a href="https://medium.com/@basi/docker-environment-variables-expanded-from-secrets-8fa70617b3bc" class="">https://medium.com/@basi/docker-environment-variables-expanded-from-secrets-8fa70617b3bc</a><br class=""></div><div class=""><br class=""></div>With kind regards,<br class=""><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail-m_-5049828624229244701gmail_signature"><div dir="ltr" class="">Jurijs<br class=""></div></div></div>
<br class=""><div class="gmail_quote">On Thu, Nov 16, 2017 at 11:34 AM, Daniel Tryba <span dir="ltr" class=""><<a href="mailto:d.tryba@pocos.nl" target="_blank" class="">d.tryba@pocos.nl</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Nov 15, 2017 at 08:46:58AM +0100, Daniel-Constantin Mierla wrote:<br class="">
> > I???m working for a UK high street bank and our Kamailio implementation has been challenged because we???ve got database passwords held in clear in the configuration file.<br class="">
...<br class="">
<span class="">> > My requirement is simple, I need to be able to supply a password via means such as loading a variable from a run-once script at start up, or a module. The ideal would be to be able to read in a Docker secret :)<br class="">
> ><br class="">
</span><span class="">> you can define a for a token to be used inside kamailio.cfg by using -A<br class="">
> command line parameter. So when you start kamailio, fetch the password<br class="">
> from your secure system by what so ever meaning, then build the database<br class="">
> url based on it and run kamailio with:<br class="">
><br class="">
> kamailio - A DBURL='<a href="mysql://user:passwd@dbh" class="">mysql://user:passwd@dbh</a><wbr class="">ost/kamailio' ...<br class="">
<br class="">
</span>My guess is the next problem will be the password being visible to all<br class="">
users querying the processlist :)<br class="">
<br class="">
Is including a file (import_file) with passwords an option? Generate the<br class="">
file just before startup, remove it (ofcourse in a secure way (shred the<br class="">
file and overwrite all freespace with a multiple patters a few dozen<br class="">
times (ask the auditors for the exact specifications that make them<br class="">
happy))) after kamailio is running.<br class="">
<div class="gmail-m_-5049828624229244701HOEnZb"><div class="gmail-m_-5049828624229244701h5"><br class="">
<br class="">
______________________________<wbr class="">_________________<br class="">
Kamailio (SER) - Users Mailing List<br class="">
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" class="">sr-users@lists.kamailio.org</a><br class="">
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank" class="">https://lists.kamailio.org/cgi<wbr class="">-bin/mailman/listinfo/sr-users</a><br class="">
</div></div></blockquote></div><br class=""></div></div>
_______________________________________________<br class="">Kamailio (SER) - Users Mailing List<br class=""><a href="mailto:sr-users@lists.kamailio.org" class="">sr-users@lists.kamailio.org</a><br class="">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users<br class=""></div></blockquote></div><br class=""></div></body></html>