<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>One alternative is to pass user/password via environment
      variables and then use #!substdef in configuration file, with the
      replacement using the corresponding $env(...) variables.</p>
    <p>If the goal is protecting the configuration file content in long
      term against being read in the future, two other options:</p>
    <p>  - remove kamailio.cfg after starting kamailio, it is not needed
      at runtime<br>
    </p>
    <p>  - encrypt kamailio.cfg and pipe its decrypted content to
      kamailio at startup, like:</p>
    <p>decryptapp kamailio-encrypted.cfg | kamailio -f - ...<br>
    </p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 18.11.20 15:27, David Villasmil
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFGRPVqzoiShXEC-U1DLo-U-aFCH0gHsWjz9yCm0LTE043crJw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">I just get the params from AWS Parameter Store and
        pass it to Kamailio on startup. Downsize is you can see them in
        “ps”.</div>
      <div><br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Wed, 18 Nov 2020 at
            12:40, Alexandru Covalschi <<a
              href="mailto:568691@gmail.com" moz-do-not-send="true">568691@gmail.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
            <div dir="ltr">Alternative way is to use unixodbc, but it
              just means you put the password into another file.</div>
            <br>
            <div class="gmail_quote">
              <div dir="ltr" class="gmail_attr">ср, 18 нояб. 2020 г. в
                14:35, Alexandru Covalschi <<a
                  href="mailto:568691@gmail.com" target="_blank"
                  moz-do-not-send="true">568691@gmail.com</a>>:<br>
              </div>
            </div>
            <div class="gmail_quote">
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
                <div dir="ltr">Don't use databases. Create an API and
                  use it to access the data you need. Won't work for
                  every possible usage, but in general API-driven
                  SIP-routing is very possible with Kamailio, especially
                  with KEMI.</div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">ср, 18 нояб. 2020 г.
                    в 11:32, Ahmed Marsou <<a
                      href="mailto:amarsou1988@gmail.com"
                      target="_blank" moz-do-not-send="true">amarsou1988@gmail.com</a>>:<br>
                  </div>
                  <blockquote class="gmail_quote" style="margin:0px 0px
                    0px
0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
                    <div dir="ltr">Hi;
                      <div>I want to remove all plain text usernames an
                        passwords from kamailio.cfg file. Like
                        modparam("auth_db", "db_url", "dbdriver://<span
                          style="background-color:rgb(241,194,50)">username:password</span>@dbhost/dbname")</div>
                      <div>or this 
                        modparam("sqlops","sqlcon","ca=>dbdriver://<span
                          style="background-color:rgb(241,194,50)">username:password</span>@dbhost/dbname")</div>
                      <div>Can you help me with some ideas of how can I
                        handle that?<br>
                        Thank you.<br>
                      </div>
                    </div>
                    _______________________________________________<br>
                    Kamailio (SER) - Users Mailing List<br>
                    <a href="mailto:sr-users@lists.kamailio.org"
                      target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
                    <a
                      href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
                      rel="noreferrer" target="_blank"
                      moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                  </blockquote>
                </div>
                <br clear="all">
                <div><br>
                </div>
                -- <br>
                <div dir="ltr">
                  <div dir="ltr">
                    <div>
                      <div dir="ltr">
                        <div>
                          <div dir="ltr">Alexandru Covalschi<br>
                            <div>VoIP engineer and system administrator<br>
                              tel: +37367398493<br>
                              <br>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
            <br clear="all">
            <div><br>
            </div>
            -- <br>
            <div dir="ltr">
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div>
                      <div dir="ltr">Alexandru Covalschi<br>
                        <div>VoIP engineer and system administrator<br>
                          tel: +37367398493<br>
                          <br>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            _______________________________________________<br>
            Kamailio (SER) - Users Mailing List<br>
            <a href="mailto:sr-users@lists.kamailio.org" target="_blank"
              moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
            <a
              href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
          </blockquote>
        </div>
      </div>
      -- <br>
      <div dir="ltr" class="gmail_signature"
        data-smartmail="gmail_signature">
        <div dir="ltr">
          <div>Regards,</div>
          <div><br>
          </div>
          David Villasmil
          <div>email: <a href="mailto:david.villasmil.work@gmail.com"
              target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
          <div>phone: +34669448337</div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
  </body>
</html>