<div dir="ltr"><div>If auth_ephemeral gets deprecated, what would be a recommended approach to replace it?<br></div><div><br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 24 Feb 2022 at 21:46, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
it should be reviewed properly if does not work before removing. The<br>
entire auth_ephemeral is deprecated from specs point of view, as the<br>
ietf draft never made it to rfc, but it is still useful to use at least<br>
for PoC. I don't have access to some old deployments using mode 0 to see<br>
if they were changed meanwhile.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 24.02.22 10:39, Henning Westerholt wrote:<br>
> Hello,<br>
><br>
> yes, if it is not working and also deprecated, if probably should be removed. You could open an issue for that or create (even better) a pull request.<br>
><br>
> Cheers,<br>
><br>
> Henning<br>
><br>
> -- <br>
> Henning Westerholt – <a href="https://skalatan.de/blog/" rel="noreferrer" target="_blank">https://skalatan.de/blog/</a><br>
> Kamailio services – <a href="https://gilawa.com" rel="noreferrer" target="_blank">https://gilawa.com</a><br>
><br>
> -----Original Message-----<br>
> From: sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>> On Behalf Of Vlasis Chatzistavrou<br>
> Sent: Sunday, February 20, 2022 8:07 PM<br>
> To: <a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>; Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
> Subject: Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri<br>
><br>
> Hi Daniel,<br>
><br>
> Just an update, I tested this with username_format set to 1 and set the<br>
> To: and From: headers to be the phone's username (ie without the timestamp). This worked without problems.<br>
><br>
> However, setting the username_format to 0 (the deprecated option) does not work even with the correct To: and From: headers. Since this option is already deprecated perhaps it could be removed in future versions to avoid confusion?<br>
><br>
> On 25/1/2022 11:38, Vlasis Chatzistavrou wrote:<br>
>> Thank you Daniel,<br>
>><br>
>> I will give this a try.<br>
>><br>
>> On 25/1/2022 11:11, Daniel-Constantin Mierla wrote:<br>
>>> Hello,<br>
>>><br>
>>> as far as I remember, the format with "user:timestamp" is only for <br>
>>> authentication username field, respectively the username attribute in <br>
>>> Proxy-/Authorization header. The subscriber address is still <br>
>>> user@domain, so that has to be used in From/To headers.<br>
>>><br>
>>> Cheers,<br>
>>> Daniel<br>
>>><br>
>>> On 02.01.22 20:36, Vlasis Chatzistavrou wrote:<br>
>>>> Hello,<br>
>>>><br>
>>>> I have a problem with Kamailio 5.4.6 and auth_ephemeral. I have the <br>
>>>> following in the Kamailio configuration<br>
>>>><br>
>>>> loadmodule "auth_ephemeral"<br>
>>>>          modparam( "auth_ephemeral", "sha_algorithm", 3 )<br>
>>>>          modparam( "auth_ephemeral", "username_format", 0 )<br>
>>>>          modparam( "auth_ephemeral", "secret", 1234 )<br>
>>>><br>
>>>> as per<br>
>>>><br>
>>>> <a href="https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html#" rel="noreferrer" target="_blank">https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html#</a><br>
>>>> auth_eph.p.username_format<br>
>>>><br>
>>>><br>
>>>><br>
>>>> and registrations fail. In the logs we see:<br>
>>>><br>
>>>> Jan  2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 <br>
>>>> REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:777]:<br>
>>>> check_parse_uris(): looking up From header Jan  2 18:21:10 <br>
>>>> enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER <br>
>>>> rhaqgafd7boteg24jp5db0} sanity [sanity.c:817]:<br>
>>>> check_parse_uris(): parsing From URI Jan  2 18:21:10 enswitch43 <br>
>>>> /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER <br>
>>>> rhaqgafd7boteg24jp5db0} <core><br>
>>>> [core/parser/parse_uri.c:1296]: parse_uri(): bad port in uri (error <br>
>>>> at char 5 in state 2) parsed: <sip:3518929:16411>(17) <br>
>>>> /<<a href="mailto:sip%3A3518929%3A1641150726@192.168.2.99" target="_blank">sip:3518929:1641150726@192.168.2.99</a>> (35) Jan  2 18:21:10 <br>
>>>> enswitch43 /sbin/kamailio[37501]: WARNING: {1 545 REGISTER <br>
>>>> rhaqgafd7boteg24jp5db0} sanity [sanity.c:820]:<br>
>>>> check_parse_uris(): failed to parse From uri<br>
>>>><br>
>>>><br>
>>>> Apparently Kamailio is confused by the timestamp following the <br>
>>>> username separated by the : character. The REGISTER message is below:<br>
>>>><br>
>>>> REGISTER sip:192.168.2.99 SIP/2.0<br>
>>>> Via: SIP/2.0/WSS 192.0.2.202;branch=z9hG4bK5452321<br>
>>>> Max-Forwards: 70<br>
>>>> To: "3518929" <<a href="mailto:sip%3A3518929%3A1641148397@192.168.2.99" target="_blank">sip:3518929:1641148397@192.168.2.99</a>><br>
>>>> From: "3518929" <<a href="mailto:sip%3A3518929%3A1641148397@192.168.2.99" target="_blank">sip:3518929:1641148397@192.168.2.99</a>>;tag=ht76o8b2b6<br>
>>>> Call-ID: phkj9mi2n3s3ju7uu3qq2f<br>
>>>> CSeq: 274 REGISTER<br>
>>>> Contact:<br>
>>>> <<a href="mailto:sip%3Aedh7mmti@192.0.2.202" target="_blank">sip:edh7mmti@192.0.2.202</a>;transport=wss>;reg-id=1;+sip.instance="<ur<br>
>>>> n:uuid:ca5e9372-dfa1-459a-b6ba-4398d23bd896>";expires=300<br>
>>>><br>
>>>> Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER<br>
>>>> Supported: path, gruu, outbound<br>
>>>> User-Agent: Raspberry Phone (SipJS - 0.11.6)<br>
>>>> Content-Length: 0<br>
>>>><br>
>>>> and Kamailio parses it as sip:<username>:<port> instead of <br>
>>>> sip:<username>:<timestamp>.<br>
>>>><br>
>>>> Is this a bug that should be reported or is there any setting that I <br>
>>>> am missing?<br>
>>>><br>
>>>><br>
>>>> __________________________________________________________<br>
>>>> Kamailio - Users Mailing List - Non Commercial Discussions<br>
>>>>   * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>>>> Important: keep the mailing list in the recipients, do not reply <br>
>>>> only to the sender!<br>
>>>> Edit mailing list options or unsubscribe:<br>
>>>>   * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
><br>
> __________________________________________________________<br>
> Kamailio - Users Mailing List - Non Commercial Discussions<br>
>   * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
> Edit mailing list options or unsubscribe:<br>
>   * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
> __________________________________________________________<br>
> Kamailio - Users Mailing List - Non Commercial Discussions<br>
>   * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
> Edit mailing list options or unsubscribe:<br>
>   * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
-- <br>
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" rel="noreferrer" target="_blank">www.asipto.com</a><br>
<a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - Online<br>
  March 28-31, 2022 (Europe Timezone)<br>
  * <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" rel="noreferrer" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a><br>
<br>
<br>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>