Bug 1173947

Summary: Unable to add external event using API
Product: Red Hat Enterprise Virtualization Manager Reporter: Eli Mesika <emesika>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kubica <pkubica>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.5.0CC: ecohen, gklein, iheim, lpeer, lsurette, oourfali, pstehlik, rbalakri, Rhev-m-bugs, sherold, yeylon
Target Milestone: ---Keywords: Regression
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: org.ovirt.engine-root-3.5.0-26 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 17:08:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1164308, 1164311    

Description Eli Mesika 2014-12-14 11:23:46 UTC
Description of problem:
Unable to add external event using API

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


How reproducible:


Steps to Reproduce:
1. curl  -X POST --insecure -u admin@internal:abc123 -H "Content-Type: application/json" https://<ip>/ovirt-engine/api/events --data '{"origin":"thirdParty","severity":"normal","custom_id":"123","description":"hello external event."}'
2. The operation failed from canDoAction validation complaining that the user is not authorized to perform the operation


Actual results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[User is not authorized to perform this action.]</detail>
</fault>

Expected results:
Adding an external event should succeed 

Additional info:

This is a regression from 3.4

Comment 1 Petr Kubica 2014-12-29 09:32:57 UTC
Verified in rhevm-3.5.0-0.26.el6ev.noarch

curl  -X POST --insecure -u admin@internal:abc123 -H "Content-Type: application/json" https://<ip>/ovirt-engine/api/events --data '{"origin":"thirdParty","severity":"normal","custom_id":"123","description":"hello external event."}'

result:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<event href="/ovirt-engine/api/events/2723" id="2723">
    <description>hello external event.</description>
    <code>9801</code>
    <severity>normal</severity>
    <time>2014-12-29T10:29:00.674+01:00</time>
    <origin>thirdParty</origin>
    <custom_id>123</custom_id>
    <flood_rate>30</flood_rate>
</event>

Comment 2 Eyal Edri 2015-02-17 17:08:01 UTC
rhev 3.5.0 was released. closing.