Re: [Users] Authentication for REST APIs?

2012-10-03 Thread Itamar Heim
On 10/03/2012 07:56 PM, Brian Vetter wrote: On Oct 3, 2012, at 12:55 AM, Itamar Heim wrote: snip ... So based upon what I see in this log file, it would seem that the connect API wants to make sure that I am an admin and not a regular user. Which gets me back to my original question: Do the R

Re: [Users] Authentication for REST APIs?

2012-10-03 Thread Brian Vetter
On Oct 3, 2012, at 12:55 AM, Itamar Heim wrote: >> snip ... >> >> So based upon what I see in this log file, it would seem that the >> connect API wants to make sure that I am an admin and not a regular user. >> >> Which gets me back to my original question: Do the REST API and the >> ovirt-shel

Re: [Users] Authentication for REST APIs?

2012-10-02 Thread Itamar Heim
On 10/03/2012 05:40 AM, Brian Vetter wrote: The "error: 'str' object has no attribute 'product_info'" was a red herring (mistyped url). The 401 errors for non-admins though is still quite real. Detailed response inside ... On Oct 2, 2012, at 1:48 PM, Michael Pasternak wrote: Hi Brian, On 10/

Re: [Users] Authentication for REST APIs?

2012-10-02 Thread Brian Vetter
The "error: 'str' object has no attribute 'product_info'" was a red herring (mistyped url). The 401 errors for non-admins though is still quite real. Detailed response inside ... On Oct 2, 2012, at 1:48 PM, Michael Pasternak wrote: > Hi Brian, > > On 10/02/2012 05:52 PM, Brian Vetter wrote: >>

Re: [Users] Authentication for REST APIs?

2012-10-02 Thread Michael Pasternak
Hi Brian, On 10/02/2012 05:52 PM, Brian Vetter wrote: > I also tried a simple connect to the home of the ovirt server in the > ovirt-shell: > > [oVirt shell (disconnected)]# connect https://ovirtserver > > error: 'str' object has no attribute 'product_info' this could happen if you t

Re: [Users] Authentication for REST APIs?

2012-10-02 Thread Brian Vetter
I also tried a simple connect to the home of the ovirt server in the ovirt-shell: [oVirt shell (disconnected)]# connect https://ovirtserver error: 'str' object has no attribute 'product_info' [oVirt shell (disconnected)]# So this happens without trying to get to the api/vms. As to your que

Re: [Users] Authentication for REST APIs?

2012-10-02 Thread Itamar Heim
On 10/02/2012 05:20 PM, Brian Vetter wrote: 3.1 added support for non admin to use the api. i.e., this should work. which specific version are you using? From the about box in the admin web app: oVirt Engine Version:3.1.0-2.fc17 The curl command I send is: curl --cacert $CA_FILE -X

Re: [Users] Authentication for REST APIs?

2012-10-02 Thread Brian Vetter
> 3.1 added support for non admin to use the api. > i.e., this should work. > which specific version are you using? From the about box in the admin web app: oVirt Engine Version: 3.1.0-2.fc17 The curl command I send is: curl --cacert $CA_FILE -X GET -H "Filter: true" -u user@domain:password ht

Re: [Users] Authentication for REST APIs?

2012-10-02 Thread Itamar Heim
On 10/02/2012 04:52 PM, Brian Vetter wrote: Adding the "Filter:true" header to the curl request doesn't change anything. If the user account is not an admin account, I get a 401 status result. So my question still stands, can the REST API be used by a mere, non-admin "mortal" or is it only for

Re: [Users] Authentication for REST APIs?

2012-10-02 Thread Brian Vetter
Adding the "Filter:true" header to the curl request doesn't change anything. If the user account is not an admin account, I get a 401 status result. So my question still stands, can the REST API be used by a mere, non-admin "mortal" or is it only for administrative functions? I'm in the process

Re: [Users] Authentication for REST APIs?

2012-10-02 Thread Itamar Heim
On 10/02/2012 03:56 PM, Steve Gordon wrote: - Original Message - From: "Itamar Heim" To: "Brian Vetter" Cc: users@ovirt.org Sent: Tuesday, October 2, 2012 3:15:34 AM Subject: Re: [Users] Authentication for REST APIs? On 10/02/2012 06:28 AM, Brian Vetter w

Re: [Users] Authentication for REST APIs?

2012-10-02 Thread Steve Gordon
- Original Message - > From: "Itamar Heim" > To: "Brian Vetter" > Cc: users@ovirt.org > Sent: Tuesday, October 2, 2012 3:15:34 AM > Subject: Re: [Users] Authentication for REST APIs? > > On 10/02/2012 06:28 AM, Brian Vetter wrote: > > I&#x

Re: [Users] Authentication for REST APIs?

2012-10-02 Thread Itamar Heim
On 10/02/2012 06:28 AM, Brian Vetter wrote: I've done two different things. First, I associated one of my groups in my directory with being a VMUser which gave members access to a particular VM. If I login with one of those users via the User portal, I can see their VM (or VMs if I do more tha

Re: [Users] Authentication for REST APIs?

2012-10-01 Thread Brian Vetter
I've done two different things. First, I associated one of my groups in my directory with being a VMUser which gave members access to a particular VM. If I login with one of those users via the User portal, I can see their VM (or VMs if I do more than one). If I use the REST API (or ovirt-shell)

Re: [Users] Authentication for REST APIs?

2012-10-01 Thread Yair Zaslavsky
Hi Brian, I looked at the wiki - I assume you're referring to the "showVm" part. Have you assigned any permissions to the user that is supposed to view the VMs? I assume you created the VMs with the administrator user, so any other user will require to have a proper permissions in order to view

[Users] Authentication for REST APIs?

2012-10-01 Thread Brian Vetter
I was trying to use both the rest api to view a user's vm information. I found that the REST APIs always returned an authentication error if the account I had logged into was not an ovirt administrator. I am guessing that either (a) I am using the wrong URL in the REST api or (b) you must be som