<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
I have finally got it:<br>
<br>
I have found 1 error in lib/mads/one_auth_mad.rb<br>
<br>
...<br>
def action_authenticate(request_id, user_id, user, password,
token)<br>
<a class="moz-txt-link-abbreviated" href="mailto:auth=@authenticate.auth">auth=@authenticate.auth</a>(user_id, user, password, token)<br>
if auth==true<br>
send_message('AUTHENTICATE', RESULT[:success],
request_id, user, token)<br>
else<br>
send_message('AUTHENTICATE', RESULT[:failure],<br>
request_id, auth)<br>
end<br>
end<br>
...<br>
<br>
the problem is the line <br>
send_message('AUTHENTICATE', RESULT[:success],
request_id, user, token)<br>
<br>
where there are 5 parameters while send_message needs only 4. If I
leave these 5 parameters, one fails and the one daemon dies, but
when I remove the last one (token), it works both for simple and
ldap authentication.<br>
<br>
Neither simple or ldap were working before because of the exception
of the "send_message" function.<br>
<br>
The code that I am using (it works for me) is:<br>
<br>
...<br>
def action_authenticate(request_id, user_id, user, password,
token)<br>
<a class="moz-txt-link-abbreviated" href="mailto:auth=@authenticate.auth">auth=@authenticate.auth</a>(user_id, user, password, token)<br>
if auth==true<br>
send_message('AUTHENTICATE', RESULT[:success],
request_id, user)<br>
else<br>
send_message('AUTHENTICATE', RESULT[:failure],
request_id, auth)<br>
end<br>
end<br>
...<br>
<br>
Regards,<br>
Carlos A.<br>
<br>
<br>
<br>
El 16/06/11 13:11, Tino Vazquez escribió:
<blockquote
cite="mid:BANLkTikfUokkuHRDM3z5=p6BMhMxciyQjg@mail.gmail.com"
type="cite">Hi Carlos,
<div><br>
</div>
<div>Let's try the driver by hand again, but also with the
authentication part:</div>
<div><br>
</div>
<div>
<meta charset="utf-8">
<span class="Apple-style-span" style="border-collapse: collapse;
font-family: arial,sans-serif; font-size: 13px;"># ruby -dw
$ONE_LOCATION/lib/mads/one_</span><span
class="Apple-style-span" style="border-collapse: collapse;
font-family: arial,sans-serif; font-size: 13px;">auth_mad.rb</span></div>
<div><span class="Apple-style-span" style="border-collapse:
collapse; font-family: arial,sans-serif; font-size: 13px;">
<meta charset="utf-8">
AUTHENTICATE 0 -1 <LDAP_DN> -
<LDAP_DN:plain:LDAP_PASSWORD></span></div>
<div><span class="Apple-style-span" style="border-collapse:
collapse; font-family: arial,sans-serif; font-size: 13px;"><br>
</span></div>
<div><span class="Apple-style-span" style="border-collapse:
collapse; font-family: arial,sans-serif; font-size: 13px;">this
will tell if the failure is in the driver or the core.</span></div>
<div><span class="Apple-style-span" style="border-collapse:
collapse; font-family: arial,sans-serif; font-size: 13px;"><br>
</span></div>
<div><span class="Apple-style-span" style="border-collapse:
collapse; font-family: arial,sans-serif; font-size: 13px;">Regards,</span></div>
<div><span class="Apple-style-span" style="border-collapse:
collapse; font-family: arial,sans-serif; font-size: 13px;"><br>
</span></div>
<div><span class="Apple-style-span" style="border-collapse:
collapse; font-family: arial,sans-serif; font-size: 13px;">-Tino</span></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span
class="Apple-style-span" style="border-collapse: collapse;"><br
clear="all">
</span></font>--<br>
Constantino Vázquez Blanco, MSc <br>
OpenNebula Major Contributor<br>
<a moz-do-not-send="true" href="http://www.OpenNebula.org"
target="_blank">www.OpenNebula.org</a> | @tinova79<br>
</div>
</blockquote>
<br>
</body>
</html>