<div dir="ltr"><div><div>Hi Robert,<br><br></div>I'm not security expert and I'm quite new in docker, but I think password in Docker container which will be in clear text saved somewhere should not be a problem, as far as you do not save this password to image or git and etc...<br></div><div><br></div><div>I think best way for you is to use docker secret and generate then config file for Kamailio using this docker secrets and then start Kamailio and for all of this you need to write some kind of Entrypoint script. Here is example how something similar do Homer Sipcapture, they set environment variables in docker-compose and then generate config file based on this, but you can use probably docker secrets instead of environment variables:</div><div><br></div><div><a href="https://github.com/sipcapture/homer-docker/tree/master/kamailio">https://github.com/sipcapture/homer-docker/tree/master/kamailio</a></div><div><br></div><div>I found one more interesting link regarding docker secrets:<br></div><div><br></div><div><a href="https://blog.mikesir87.io/2017/05/using-docker-secrets-during-development/">https://blog.mikesir87.io/2017/05/using-docker-secrets-during-development/</a><br></div><div><br></div><div>With kind regards,<br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Jurijs<br></div></div></div>
<br><div class="gmail_quote">On Thu, Nov 16, 2017 at 11:58 PM, Robert <span dir="ltr"><<a href="mailto:robert@vooey.co.uk" target="_blank">robert@vooey.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That’d presumably leave the clear text footprint I'm trying to avoid, albeit in a non-Kamailio file. I’ve made a start on an approach to read from a file, Docker secrets are basically just files, but the Docker platform handles them securely.<br>
<br>
Thanks - Robert...<br>
<span class="im HOEnZb"><br>
> On 16 Nov 2017, at 21:46, Bastian Triller <<a href="mailto:bastian.triller@gmail.com">bastian.triller@gmail.com</a>> wrote:<br>
><br>
> isn't using a group in the db URL an option? Generate some .cnf in<br>
> /etc/mysql/conf.d (or where MySQL searches its configuration in a<br>
> Docker container) from the secret and use the group in your db URL in<br>
> kamailio.cfg.<br>
><br>
> <a href="http://www.kamailio.org/docs/modules/5.0.x/modules/db_mysql.html#idp419" rel="noreferrer" target="_blank">http://www.kamailio.org/docs/<wbr>modules/5.0.x/modules/db_<wbr>mysql.html#idp419</a><br>
> 97212<br>
<br>
<br>
</span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
</div></div></blockquote></div><br></div>