[one-ecosystem] [rOCCI server]: Authentication & Response format

John Samonakis samon at ucnet.uoc.gr
Fri Nov 2 03:17:50 PDT 2012


Hi!

 

thanks a lot Florian. Your help is always helpful.

Now I get text/plain responses and I can make

requests without providing credentials.

 

I have also made a request at  <https://github.com/gwdg/rOCCI-server/issues>
https://github.com/gwdg/rOCCI-server/issues

 

thanks a lot

John

 

 

 

From: Feldhaus, Florian [mailto:florian.feldhaus at gwdg.de] 
Sent: Wednesday, October 31, 2012 11:46 AM
To: <samon at ucnet.uoc.gr> <samon at ucnet.uoc.gr>
Cc: <ecosystem at lists.opennebula.org>
Subject: Re: [one-ecosystem] [rOCCI server]: Authentication & Response
format

 

Hi John,

 

Am 31.10.2012 um 10:24 schrieb <samon at ucnet.uoc.gr>

 <samon at ucnet.uoc.gr>:





 

Hi!  

 

I need some help with rOCCI server.

 

In older version of occi server (Server: Ruby OCCI Framework/0.4 OCCI/1.1,
downloaded

from  <http://dev.opennebula.org/projects/ogf-occi/>
http://dev.opennebula.org/projects/ogf-occi/ ) I use curl in order to get
the vms without

providing authentication credentials. For example  I submit:

 

curl  -v -X GET  http://mydomain:3000/compute/

 

I use the occi-server.conf to provide username/password. Specifically,
inside this file I write:

ONE_USER=myuser

ONE_PASSWORD=mypass

 

However, in rOCCI server, I use now, (Server: rOCCI/0.5.0 OCCI/1.1)  I can't
find where to place

username/password and thus, I have to submit the requests with credentials
like this:

 

curl  -u myuser:mypass -v -X GET  http://mydomain:3000/compute/

 

Is it possible to place username/password in a file so as not to have to
provide credential

in my requests?  I use java to make request on occi server, and now, I have
to find out

how to provide username/password .

 

We changed the way to handle authentication to allow different methods.
There is still a default authentication, but currently you can't configure
it. Could you please create an issue here describing your request:

https://github.com/gwdg/rOCCI-server/issues

 

A quick fix would be to replace the user 'anonymous' in line 103 of file
lib/occi/server.rb with the user you like to use by default when no
authentication is provided.

 

One more question: I notice that responses of rOCCI server (Server:
rOCCI/0.5.0 OCCI/1.1)  

are in XML format.  Are other formats supported? If not, I have to modify my
java code to handle this

format. The current version of my code handle http responses, like those I
receive

from older version of occi server (Server: Ruby OCCI Framework/0.4
OCCI/1.1.)

 

Just add the content type you would like to get in the HTTP Accept header.
e.g. using

 

curl  -v -H 'Accept: text/plain' -X GET  http://mydomain:3000/compute/

 

rOCCI-server supports

text/plain

text/occi

application/occi+json (rendering in rOCCI-server 0.5 not yet compatible with
latest draft of JSON specification)

application/occi+xml (not specified yet)

 

Cheers,

Florian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/ecosystem-opennebula.org/attachments/20121102/c7939f1f/attachment.htm>


More information about the Ecosystem mailing list