Hello,&nbsp; <br><br>below is the log you request <br>======================================<br>May 20 10:23:05 [3652] DBG:ldap:ldap_connect: [inria]: LDAP bind successful (ldap_host [ldap://<a href="http://ldapmaster.inrialpes.fr">ldapmaster.inrialpes.fr</a>])<br>
May 20 10:25:36 [3652] DBG:core:parse_msg: SIP Request:<br>May 20 10:25:36 [3652] DBG:core:parse_msg:&nbsp; method:&nbsp; &lt;REGISTER&gt;<br>May 20 10:25:36 [3652] DBG:core:parse_msg:&nbsp; uri:&nbsp;&nbsp;&nbsp;&nbsp; &lt;sip:<a href="http://inrialpes.fr">inrialpes.fr</a>&gt;<br>
May 20 10:25:36 [3652] DBG:core:parse_msg:&nbsp; version: &lt;SIP/2.0&gt;<br>May 20 10:25:36 [3652] DBG:core:parse_headers: flags=2<br>May 20 10:25:36 [3652] DBG:core:parse_via_param: found param type 232, &lt;branch&gt; = &lt;z9hG4bK-d87543-1154d43f445f6e1a-3--d87543-&gt;; state=6<br>
May 20 10:25:36 [3652] DBG:core:parse_via_param: found param type 235, &lt;rport&gt; = &lt;n/a&gt;; state=17<br>May 20 10:25:36 [3652] DBG:core:parse_via: end of header reached, state=5<br>May 20 10:25:36 [3652] DBG:core:parse_headers: via found, flags=2<br>
May 20 10:25:36 [3652] DBG:core:parse_headers: this is the first via<br>May 20 10:25:36 [3652] DBG:core:receive_msg: After parse_msg...<br>May 20 10:25:36 [3652] DBG:core:receive_msg: preparing to run routing scripts...<br>
May 20 10:25:36 [3652] DBG:core:parse_headers: flags=100<br>May 20 10:25:36 [3652] DBG:maxfwd:is_maxfwd_present: value = 70<br>May 20 10:25:36 [3652] DBG:core:parse_headers: flags=8<br>May 20 10:25:36 [3652] DBG:core:parse_to: end of header reached, state=10<br>
May 20 10:25:36 [3652] DBG:core:parse_to: display={&quot;alali&quot;}, ruri={<a href="mailto:sip%3Aalali@inrialpes.fr">sip:alali@inrialpes.fr</a>}<br>May 20 10:25:36 [3652] DBG:core:get_hdr_field: &lt;To&gt; [33]; uri=[<a href="mailto:sip%3Aalali@inrialpes.fr">sip:alali@inrialpes.fr</a>]<br>
May 20 10:25:36 [3652] DBG:core:get_hdr_field: to body [&quot;alali&quot;&lt;<a href="mailto:sip%3Aalali@inrialpes.fr">sip:alali@inrialpes.fr</a>&gt;<br>]<br>May 20 10:25:36 [3652] DBG:uri:has_totag: no totag<br>May 20 10:25:36 [3652] DBG:core:parse_headers: flags=78<br>
May 20 10:25:36 [3652] DBG:core:get_hdr_field: cseq &lt;CSeq&gt;: &lt;1&gt; &lt;REGISTER&gt;<br>May 20 10:25:36 [3652] DBG:tm:t_lookup_request: start searching: hash=34958, isACK=0<br>May 20 10:25:36 [3652] DBG:tm:matching_3261: RFC3261 transaction matching failed<br>
May 20 10:25:36 [3652] DBG:tm:t_lookup_request: no transaction found<br>May 20 10:25:36 [3652] DBG:core:grep_sock_info: checking if host==us: 12==14 &amp;&amp;&nbsp; [<a href="http://inrialpes.fr">inrialpes.fr</a>] == [<a href="http://194.199.18.159">194.199.18.159</a>]<br>
May 20 10:25:36 [3652] DBG:core:grep_sock_info: checking if port 5060 matches port 5060<br>May 20 10:25:36 [3652] DBG:core:grep_sock_info: checking if host==us: 12==14 &amp;&amp;&nbsp; [<a href="http://inrialpes.fr">inrialpes.fr</a>] == [<a href="http://194.199.18.159">194.199.18.159</a>]<br>
May 20 10:25:36 [3652] DBG:core:grep_sock_info: checking if port 5060 matches port 5060<br>May 20 10:25:36 [3652] DBG:core:parse_headers: flags=ffffffffffffffff<br>May 20 10:25:36 [3652] DBG:core:get_hdr_field: content_length=0<br>
May 20 10:25:36 [3652] DBG:core:get_hdr_field: found end of header<br>May 20 10:25:36 [3652] DBG:auth:build_auth_hf: &#39;WWW-Authenticate: Digest realm=&quot;<a href="http://inrialpes.fr">inrialpes.fr</a>&quot;, nonce=&quot;48328c2cfe3d852ecb1ff2f1fc7e378022046d34&quot;<br>
&#39;<br>May 20 10:25:36 [3652] DBG:core:parse_headers: flags=ffffffffffffffff<br>May 20 10:25:36 [3652] DBG:core:check_via_address: params <a href="http://194.199.18.152">194.199.18.152</a>, <a href="http://194.199.18.152">194.199.18.152</a>, 0<br>
May 20 10:25:36 [3652] DBG:core:destroy_avp_list: destroying list (nil)<br>May 20 10:25:36 [3652] DBG:core:receive_msg: cleaning up<br>May 20 10:25:39 [3652] DBG:core:parse_msg: SIP Request:<br>May 20 10:25:39 [3652] DBG:core:parse_msg:&nbsp; method:&nbsp; &lt;REGISTER&gt;<br>
May 20 10:25:39 [3652] DBG:core:parse_msg:&nbsp; uri:&nbsp;&nbsp;&nbsp;&nbsp; &lt;sip:<a href="http://inrialpes.fr">inrialpes.fr</a>&gt;<br>May 20 10:25:39 [3652] DBG:core:parse_msg:&nbsp; version: &lt;SIP/2.0&gt;<br>May 20 10:25:39 [3652] DBG:core:parse_headers: flags=2<br>
May 20 10:25:39 [3652] DBG:core:parse_via_param: found param type 232, &lt;branch&gt; = &lt;z9hG4bK-d87543-4b05271d9943dd31-3--d87543-&gt;; state=6<br>May 20 10:25:39 [3652] DBG:core:parse_via_param: found param type 235, &lt;rport&gt; = &lt;n/a&gt;; state=17<br>
May 20 10:25:39 [3652] DBG:core:parse_via: end of header reached, state=5<br>May 20 10:25:39 [3652] DBG:core:parse_headers: via found, flags=2<br>May 20 10:25:39 [3652] DBG:core:parse_headers: this is the first via<br>May 20 10:25:39 [3652] DBG:core:receive_msg: After parse_msg...<br>
May 20 10:25:39 [3652] DBG:core:receive_msg: preparing to run routing scripts...<br>May 20 10:25:39 [3652] DBG:core:parse_headers: flags=100<br>May 20 10:25:39 [3652] DBG:maxfwd:is_maxfwd_present: value = 70<br>May 20 10:25:39 [3652] DBG:core:parse_headers: flags=8<br>
May 20 10:25:39 [3652] DBG:core:parse_to: end of header reached, state=10<br>May 20 10:25:39 [3652] DBG:core:parse_to: display={&quot;alali&quot;}, ruri={<a href="mailto:sip%3Aalali@inrialpes.fr">sip:alali@inrialpes.fr</a>}<br>
May 20 10:25:39 [3652] DBG:core:get_hdr_field: &lt;To&gt; [33]; uri=[<a href="mailto:sip%3Aalali@inrialpes.fr">sip:alali@inrialpes.fr</a>]<br>May 20 10:25:39 [3652] DBG:core:get_hdr_field: to body [&quot;alali&quot;&lt;<a href="mailto:sip%3Aalali@inrialpes.fr">sip:alali@inrialpes.fr</a>&gt;<br>
]<br>May 20 10:25:39 [3652] DBG:uri:has_totag: no totag<br>May 20 10:25:39 [3652] DBG:core:parse_headers: flags=78<br>May 20 10:25:39 [3652] DBG:core:get_hdr_field: cseq &lt;CSeq&gt;: &lt;2&gt; &lt;REGISTER&gt;<br>May 20 10:25:39 [3652] DBG:tm:t_lookup_request: start searching: hash=34955, isACK=0<br>
May 20 10:25:39 [3652] DBG:tm:matching_3261: RFC3261 transaction matching failed<br>May 20 10:25:39 [3652] DBG:tm:t_lookup_request: no transaction found<br>May 20 10:25:39 [3652] DBG:core:grep_sock_info: checking if host==us: 12==14 &amp;&amp;&nbsp; [<a href="http://inrialpes.fr">inrialpes.fr</a>] == [<a href="http://194.199.18.159">194.199.18.159</a>]<br>
May 20 10:25:39 [3652] DBG:core:grep_sock_info: checking if port 5060 matches port 5060<br>May 20 10:25:39 [3652] DBG:core:grep_sock_info: checking if host==us: 12==14 &amp;&amp;&nbsp; [<a href="http://inrialpes.fr">inrialpes.fr</a>] == [<a href="http://194.199.18.159">194.199.18.159</a>]<br>
May 20 10:25:39 [3652] DBG:core:grep_sock_info: checking if port 5060 matches port 5060<br>May 20 10:25:39 [3652] DBG:core:parse_headers: flags=ffffffffffffffff<br>May 20 10:25:39 [3652] DBG:core:get_hdr_field: content_length=0<br>
May 20 10:25:39 [3652] DBG:core:get_hdr_field: found end of header<br>May 20 10:25:39 [3652] DBG:core:parse_to_param: tag=e66a6272<br>May 20 10:25:39 [3652] DBG:core:parse_to: end of header reached, state=29<br>May 20 10:25:39 [3652] DBG:core:parse_to: display={&quot;alali&quot;}, ruri={<a href="mailto:sip%3Aalali@inrialpes.fr">sip:alali@inrialpes.fr</a>}<br>
May 20 10:25:39 [3652] DBG:ldap:ldap_url_search: LDAP URL parsed into session_name [inria], base [ou=People,dc=inrialpes,dc=fr], scope [1], filter [(uid=alali)]<br>May 20 10:25:39 [3652] DBG:ldap:lds_search: [inria]: performing LDAP search: dn [ou=People,dc=inrialpes,dc=fr], scope [1], filter [(uid=alali)], client_timeout [5000000] usecs<br>
May 20 10:25:39 [3652] DBG:ldap:ldap_params_search: [inria]: [1] LDAP entries found<br>May 20 10:25:39 [3652] DBG:auth:check_nonce: comparing [48328c2cfe3d852ecb1ff2f1fc7e378022046d34] and [48328c2cfe3d852ecb1ff2f1fc7e378022046d34]<br>
May 20 10:25:39 [3652] DBG:auth:check_response: our result = &#39;f2703eead969f071b5cbf724876b555c&#39;<br>May 20 10:25:39 [3652] DBG:auth:check_response: authorization failed<br>May 20 10:25:39 [3652] DBG:auth:build_auth_hf: &#39;WWW-Authenticate: Digest realm=&quot;<a href="http://inrialpes.fr">inrialpes.fr</a>&quot;, nonce=&quot;48328c2f395ff6d2cf662b281063ff20ac03b62f&quot;<br>
================================================<br><br>you can clearly see that the response generated by the server will not match the one received from UAC. i sniffed the network packets to see what is going on and i found that the LDAP server return the password in this formate ( {MD5} blablabla ). do not you think that the server took it all as password (including {MD5} string)? <br>
<br>regards,<br>Ahmed ALALI<br> <br><div class="gmail_quote">On Mon, May 19, 2008 at 9:26 PM, Daniel-Constantin Mierla &lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
I had a quick look at the code and the module should work with HA1 in the PV and calculate_ha1=0. Can you set the debug =5 and send the log to me for such case (the 3 in your list). It will help to troubleshoot quickly.<br>

<br>
Cheers,<br>
Daniel<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
<br>
On 05/19/08 15:05, Ahmed Huraimel wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
Hello,<br>
<br>
i am successfully integrated an openLDAP server with my openSER SIP proxy server. however i am facing a security problem. let me explain it briefly.<br>
<br>
**** Successful Registration with password save as clear in openLDAP DB ****<br>
<br>
* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Configration #<br>
- user name was stored in clear in openSER database<br>
- modparam(&quot;auth&quot;, &quot;calculate_ha1&quot;, 1) which means the server will assume that the &quot;password_spec&quot; pseudo-variable contains plaintext passwords and it will calculate HA1 strings on the fly.<br>

<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Senario #<br>
- after the UAC receives Authentication request he will build the response = MD5(username + MD5(passowrd) + realm + nonce)<br>
- then the server will build the challenge by searching the the user in the database and retrieving the password in clear then hash the password with MD5 build the challenge such that challenge=MD5(username + MD5(passowrd) + realm + nonce) . .<br>

- by comparing the the response the with the challenge the user will be authenticated.<br>
- *it works *<br>
&nbsp;<br>
**** Successful Registration with password save as MD5 in openLDAP DB ****<br>
<br>
* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Configration #<br>
- user name was stored in MD5 in openSER database<br>
- modparam(&quot;auth&quot;, &quot;calculate_ha1&quot;, 0) which means the server assumes the pseudo-variable contains the HA1 strings directly and will not calculate them.<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Senario #<br>
- after the UAC receives Authentication request he will build the response = MD5(username + MD5(password) + realm + nonce)<br>
- then the server will build the challenge by searching the the user in the database and retrieving the password in MD5 then challenge such that challenge=MD5(username + MD5(password) + realm + nonce) .<br>
- by comparing the the response the with the challenge the user will be authenticated.<br>
- *401 unauthorized !!!!<br>
<br>
***** CONCLUSION ****<br>
<br>
*there for possible scenarios:<br>
1- password clear + calculate_ha1= 0 ==&gt; 401 unauthorized !!!!<br>
2- password clear + calculate_ha1= 1 ==&gt; Authorized<br>
3- password MD5 &nbsp;+ calculate_ha1= 0 ==&gt; 401 unauthorized !!!!<br>
4- password MD5 &nbsp;+ calculate_ha1= 1 ==&gt; 401 unauthorized !!!!<br>
*<br>
*-----------------------------------------------------------------------------------------<br>
*<br>
asuumptions:<br>
<br>
*1- the password might be not hashed. if so then why &nbsp;modparam(&quot;auth&quot;, &quot;calculate_ha1&quot;, ) used? does it mean that the password might be received hashed or not?<br>
_2- in scenario(2) the sip server hash the password by setting calculate_ha1= 1. if the password is already hashed in the database then scenario(3) should work unless there is a conflict with the hash. is this might be related to hash type or size?_ or something else that i do not know!!!<br>

<br>
*question*:<br>
<br>
1- why scenario(3) does not work? where might be the problem?<br>
2- what to do if i want to change the hash algorithm used? for example i need to SSH1 instead of MD5 because nowadays MD5 &nbsp;is proved to be weak algorithm<br>
<br>
regards,<br>
Ahmed ALALI<br>
<br>
<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a><br>
<a href="http://lists.openser.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser.org/cgi-bin/mailman/listinfo/users</a><br>
 &nbsp;<br>
</blockquote>
<br>
-- <br>
<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
<br>
</blockquote></div><br>