<div dir="auto">Yes, Im agree that anyhow it will be on local, but only root user have the right to read this file. <div dir="auto">So how can I change the permission of my.cnf file to be able to read it from kamailio only when I start or reboot?</div><div dir="auto">Thank you.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié., 18 nov. 2020 17:18, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div>
    <p><br>
    </p>
    <div>On 18.11.20 16:45, Daniel-Constantin
      Mierla wrote:<br>
    </div>
    <blockquote type="cite">
      
      <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>
    </blockquote>
    <p><br>
    </p>
    <p>Obviously, instead of removing, the permissions kamailio.cfg can
      be changed after starting kamailio -- adding this after seeing in
      another message being mentioned the option with mysql my.cfg,
      user/password is in a local file anyhow.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <blockquote type="cite">
      <p> </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>On 18.11.20 15:27, David Villasmil
        wrote:<br>
      </div>
      <blockquote type="cite">
        
        <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" target="_blank" rel="noreferrer">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" rel="noreferrer">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" rel="noreferrer">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" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
                      <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">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" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
              <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
            </blockquote>
          </div>
        </div>
        -- <br>
        <div dir="ltr" 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" rel="noreferrer">david.villasmil.work@gmail.com</a></div>
            <div>phone: +34669448337</div>
          </div>
        </div>
        <br>
        <fieldset></fieldset>
        <pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" rel="noreferrer">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
      </blockquote>
      <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" rel="noreferrer">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" rel="noreferrer">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" rel="noreferrer">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank" rel="noreferrer">https://www.paypal.me/dcmierla</a></pre>
    </blockquote>
    <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" rel="noreferrer">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" rel="noreferrer">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" rel="noreferrer">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank" rel="noreferrer">https://www.paypal.me/dcmierla</a></pre>
  </div>

_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>