[one-dev] Fwd: XML-RPC authentication

Carlos Martín Sánchez cmartin at opennebula.org
Wed Sep 17 02:18:35 PDT 2014


Hi,

On Sat, Sep 13, 2014 at 8:03 PM, D. Strout <dstrout at dstrout.net> wrote:

> I am trying to understand how to authorize to the OpenNebula XML-RPC API.
> I have read the docs, and from them tried two different things. First, I
> did HTTP basic authentication with an admin username and password. This
> gave me an HTTP 401 unauthorized error. Next I tried passing the username
> and password as a parameter to the API in the form username:password, but I
> still got the 401 error. How is authentication supposed to work?
>

You only need to set the first xml-rpc parameter to the string
"username:password". Maybe the oned.log file contains more information
about the failed requests...
See the ruby [1] and java [2] clients for a reference.

Regards.

[1]
https://github.com/OpenNebula/one/blob/master/src/oca/ruby/opennebula/client.rb#L156
[2]
https://github.com/OpenNebula/one/blob/master/src/oca/java/src/org/opennebula/client/Client.java#L81

--
Carlos Martín, MSc
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org <http://www.opennebula.org/> | cmartin at opennebula.org |
@OpenNebula <http://twitter.com/opennebula> <cmartin at opennebula.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/dev-opennebula.org/attachments/20140917/cbd4dd31/attachment.htm>


More information about the Dev mailing list