[one-users] Problem with ldap authentication

Carlos A. caralla at upv.es
Thu Jun 16 08:15:06 PDT 2011


Hello,

I have finally got it:

I have found 1 error in lib/mads/one_auth_mad.rb

...
     def action_authenticate(request_id, user_id, user, password, token)
         auth=@authenticate.auth(user_id, user, password, token)
         if auth==true
             send_message('AUTHENTICATE', RESULT[:success], request_id, 
user, token)
         else
             send_message('AUTHENTICATE', RESULT[:failure],
                 request_id, auth)
         end
     end
...

the problem is the line
             send_message('AUTHENTICATE', RESULT[:success], request_id, 
user, token)

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.

Neither simple or ldap were working before because of the exception of 
the "send_message" function.

The code that I am using (it works for me) is:

...
     def action_authenticate(request_id, user_id, user, password, token)
         auth=@authenticate.auth(user_id, user, password, token)
         if auth==true
             send_message('AUTHENTICATE', RESULT[:success], request_id, 
user)
         else
             send_message('AUTHENTICATE', RESULT[:failure], request_id, 
auth)
         end
     end
...

Regards,
Carlos A.



El 16/06/11 13:11, Tino Vazquez escribió:
> Hi Carlos,
>
> Let's try the driver by hand again, but also with the authentication part:
>
> # ruby -dw $ONE_LOCATION/lib/mads/one_auth_mad.rb
> AUTHENTICATE 0 -1 <LDAP_DN> - <LDAP_DN:plain:LDAP_PASSWORD>
>
> this will tell if the failure is in the driver or the core.
>
> Regards,
>
> -Tino
>
> --
> Constantino Vázquez Blanco, MSc
> OpenNebula Major Contributor
> www.OpenNebula.org <http://www.OpenNebula.org> | @tinova79

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110616/4836b6ab/attachment-0002.htm>


More information about the Users mailing list