<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Krisztián,</DIV>
<DIV>It depends on the hash you store in LDAP. If the hash is MD5, you can use 
it directly in the digest algorithm. If its SSHA1 or something, you are 
basically stuck.&nbsp; Either store clear-text in LDAP, or forget about 
it.&nbsp; Of course, what you can do is to implement a conversion of SSHA when 
users are logging in. But this is only possible if you at one point actually has 
the clear-text password...</DIV>
<DIV>g-)</DIV>
<DIV>&nbsp;</DIV>
<DIV>---- Original Message ----<BR>From: Gyebnár Krisztián<BR>To: 
serusers@lists.iptel.org<BR>Sent: Sunday, July 03, 2005 06:09 AM<BR>Subject: 
[Serusers] SER+RADIUS+LDAP with encrypted passwords<BR><BR>&gt; Dear 
all,<BR>&gt; <BR>&gt; I'm new in SER and i have a serius problem about 
implementing the<BR>&gt; authentication system from LDAP; <BR>&gt; <BR>&gt; 
SER&lt;-&gt;freeRADIUS&lt;-&gt;LDAP(user/pass(encrypted));<BR>&gt; <BR>&gt; We 
have installed SER + Freeradius + LDAP system, the SER parts of<BR>&gt; 
configuration works fine. <BR>&gt; <BR>&gt; if any SIP client coming into the 
SER the auth_radius modul forward<BR>&gt; the request correctly to the 
freeradius: <BR>&gt; <BR>&gt; <BR>&gt; the problem is the following:<BR>&gt; 
<BR>&gt; rad_recv: Access-Request packet from host 127.0.0.1:50272, 
id=36,<BR>&gt; length=197 
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; User-Name = 
"test@test.hu"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Digest-Attributes = 
0x0a076779656269<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Digest-Attributes = 
0x010d667265656d61696c2e6875<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Digest-Attributes =<BR>&gt; 
0x022a34326337353933653330366534626363613836343837343332646635383363366139636364383038<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Digest-Attributes = 
0x04117369703a667265656d61696c2e6875<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Digest-Attributes = 
0x030a5245474953544552<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Digest-Response = 
"204aea65f72efb70b809ed425bec099c"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Service-Type = 
Sip-Session<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sip-Uri-User 
= "test"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAS-IP-Address 
= 127.0.0.1<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAS-Port = 
5060<BR>&gt;&nbsp;&nbsp; Processing the authorize section of 
radiusd.conf<BR>&gt; modcall: entering group authorize for request 
4<BR>&gt;&nbsp;&nbsp; modcall[authorize]: module "preprocess" returns ok for 
request 4<BR>&gt;&nbsp;&nbsp; modcall[authorize]: module "chap" returns noop for 
request 4<BR>&gt;&nbsp;&nbsp; rlm_eap: No EAP-Message, not doing 
EAP<BR>&gt;&nbsp;&nbsp; modcall[authorize]: module "eap" returns noop for 
request 4<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; rlm_digest: Converting 
Digest-Attributes to something 
sane...<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Digest-User-Name 
= "test"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Digest-Realm = 
"test.hu"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Digest-Nonce = 
"42c7593e306e4bcca86487432df583c6a9ccd808"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Digest-URI = 
"sip:test.hu"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Digest-Method = "REGISTER"<BR>&gt; rlm_digest: Adding Auth-Type = 
DIGEST<BR>&gt;&nbsp;&nbsp; modcall[authorize]: module "digest" returns ok for 
request 4<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; rlm_realm: Looking up realm "test.hu" 
for User-Name = test@test.hu<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; rlm_realm: No such 
realm "test.hu"<BR>&gt;&nbsp;&nbsp; modcall[authorize]: module "suffix" returns 
noop for request 4<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; users: Matched entry DEFAULT 
at line 160<BR>&gt;&nbsp;&nbsp; modcall[authorize]: module "files" returns ok 
for request 4<BR>&gt;&nbsp;&nbsp; modcall[authorize]: module "mschap" returns 
noop for request 4<BR>&gt; modcall: group authorize returns ok for request 
4<BR>&gt;&nbsp;&nbsp; rad_check_password:&nbsp; Found Auth-Type LDAP<BR>&gt; 
auth: type "LDAP"<BR>&gt;&nbsp;&nbsp; Processing the authenticate section of 
radiusd.conf<BR>&gt; modcall: entering group Auth-Type for request 4<BR>&gt; 
rlm_ldap: - authenticate<BR>&gt; rlm_ldap: Attribute "User-Password" is required 
for authentication.<BR>&gt;&nbsp;&nbsp; modcall[authenticate]: module "ldap" 
returns invalid for request 4<BR>&gt; modcall: group Auth-Type returns invalid 
for request 4<BR>&gt; auth: Failed to validate the user.<BR>&gt; Login 
incorrect: [test@test.hu/&lt;no User-Password attribute&gt;] (from<BR>&gt; 
client localhost port 5060) <BR>&gt; Delaying request 4 for 1 seconds<BR>&gt; 
<BR>&gt; so the ldap modul expect the "User-Password" attribute from 
radius<BR>&gt; client, but because of DIGEST authentication only get<BR>&gt; 
"DIGEST-ATTRIBUTES" from the SIP router,&nbsp; <BR>&gt; <BR>&gt; Anyway, how to 
possible to authenticate the users with DIGEST<BR>&gt; authentication, if the 
RADIUS can not see cleartext passwords in LDAP<BR>&gt; ?.&nbsp; <BR>&gt; I'm not 
expert in password math and calculations, and also read the<BR>&gt; sterman 
draft to explain this to me. <BR>&gt; <BR>&gt; So i suppose the following 
method:<BR>&gt; Radius get the RADIUS request.--&gt;Convert the 
DIGEST-ATTRIBUTES to<BR>&gt; readable format.--&gt;to calculate the DIGEST AUTH. 
values the RADIUS<BR>&gt; have to do LDAP lookup for the PASSWORD-&gt; Calculate 
the DIGEST AUTH.<BR>&gt; value and comapare it with the recieved one, if match 
the user<BR>&gt; authenticated.&nbsp;&nbsp;&nbsp; <BR>&gt; <BR>&gt; It's right 
?<BR>&gt; <BR>&gt; The radius authentication system works fine with 
DIGEST<BR>&gt; authentication, if I store the user/pass on local file system 
(in<BR>&gt; users file) and also works authenticate from LDAP without DIGEST 
auth<BR>&gt; (try with radtest).&nbsp;&nbsp; <BR>&gt; <BR>&gt; Has anybody 
experience with this problem, DIGEST auth with LDAP ?<BR>&gt; <BR>&gt; 
THX<BR>&gt; <BR>&gt; Krisztián<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; 
_______________________________________________<BR>&gt; Serusers mailing 
list<BR>&gt; serusers@lists.iptel.org<BR>&gt; 
http://lists.iptel.org/mailman/listinfo/serusers</DIV></BODY></HTML>