Bug 1323631 - Closing a connection should not require 'filter' header.
Summary: Closing a connection should not require 'filter' header.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 3.6.3
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.0.0-beta
: 4.0.0
Assignee: Juan Hernández
QA Contact: Gonza
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-04 10:00 UTC by Ondra Machacek
Modified: 2016-07-05 07:59 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-05 07:59:22 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 57275 0 master NEW restapi: Don't require admin/filter to access root service 2016-05-09 15:51:28 UTC

Description Ondra Machacek 2016-04-04 10:00:47 UTC
Description of problem:
When user who is using user level api wants to close connection he need to use 'Filter' header. 'Filter' header 
should not be required, to close connection.

Version-Release number of selected component (if applicable):
3.6

How reproducible:
always

Steps to Reproduce:
1. Add user who is permitted to use only user resources, not admin resources. (for example user with UserRole on vm)
2. 

import ovirtsdk4 as sdk

connection = sdk.Connection(
    url='http://localhost:8080/ovirt-engine/api',
    username='user1@internal',
    password='password',
    ca_file='ca.pem',
    debug=True,
)
...
connection.close()

Actual results:
Error is returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <detail>query execution failed due to insufficient permissions.</detail>
   <reason>Operation Failed</reason>
</fault>

Expected results:
Should succeed.

Additional info:

Comment 1 Gonza 2016-06-24 14:09:26 UTC
Verified with:
python-ovirt-engine-sdk4-4.0.0-0.0.a3.el7ev.x86_64

>>> import ovirtsdk4 as sdk
>>> connection = sdk.Connection(url='http://localhost:8080/ovirt-engine/api', username='my_user@internal', password='123456', ca_file='ca.pem', debug=True)
>>> connection.close()
* About to connect() to localhost port 80 (#0)
* Trying 10.34.61.176...
* Connected to localhost (10.34.61.176) port 80 (#0)
> GET /ovirt-engine/services/sso-logout?scope=ovirt-app-api&token=None HTTP/1.1
> Host: localhost
> User-Agent: PythonSDK/4.0.0a3
> Accept: application/json
> Content-Length: 0
> Content-Type: application/x-www-form-urlencoded
< HTTP/1.1 200 OK
< Date: Fri, 24 Jun 2016 14:06:22 GMT
< Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips
* Added cookie locale="en_US" for domain localhost, path /, expire 3614260829
< Set-Cookie: locale=en_US; path=/; HttpOnly; Max-Age=2147483647; Expires=Wed, 12-Jul-2084 17:20:29 GMT
< Content-Type: application/json
< Content-Length: 3
< Vary: Accept-Encoding
< 
< { }
* Connection #0 to host localhost left intact

Comment 2 Sandro Bonazzola 2016-07-05 07:59:22 UTC
oVirt 4.0.0 has been released, closing current release.


Note You need to log in before you can comment on or make changes to this bug.