<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="monospace">Hi Volkan,<br>
      <br>
      Normally, in the auth reply, you need to use the realm received in
      the challenge. So, if you want to be 100% RFC compliant, you
      should not keep the HA1, but calculate it each time, with the
      received realm.<br>
      If you still want to use pre-computed HA1 and go around the
      variable realms, you may simply load the HA1 via sql_ops and feed
      into pv_auth function - no need for auth_db <br>
      <br>
      Regards,<br>
    </font>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
  <a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
    <div class="moz-cite-prefix">On 02.07.2025 13:50, Volkan Oransoy
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAM_EGOGeMw1Z8w=PQ3jd9Bs0gz+Y8KRDyBeNbmJocOhn2+4HwA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hi all</div>
        <div><br>
        </div>
        <div>I store user authentication data on a subscriber table with
          precalculated hashes for obvious reasons.  Lately we are
          having issues with these new AI conversations services. They
          send requests with random realms, especially with IP
          addresses. What I understand, if I store the plain text
          password and calculate ha1 at request time, I can accept these
          requests even if the realm is different. But I don't want to
          do that. I tried to tweak auth_db, when I set `use_domain` to
          0, Opensips does not add the realm to the query but still
          use is on ha1 challenge since the RFC requires I think. </div>
        <div>Is there a best practice to handle this issue? </div>
        <div><br>
        </div>
        <div>Best regards</div>
        <div><br>
        </div>
        <span class="gmail_signature_prefix">-- </span><br>
        <div dir="ltr" class="gmail_signature"
          data-smartmail="gmail_signature">
          <div dir="ltr">Volkan Oransoy</div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>