Bug 1173947 - Unable to add external event using API
Summary: Unable to add external event using API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 3.5.0
Assignee: Eli Mesika
QA Contact: Petr Kubica
URL:
Whiteboard: infra
Depends On:
Blocks: rhev35rcblocker rhev35gablocker
TreeView+ depends on / blocked
 
Reported: 2014-12-14 11:23 UTC by Eli Mesika
Modified: 2016-02-10 19:40 UTC (History)
11 users (show)

Fixed In Version: org.ovirt.engine-root-3.5.0-26
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 17:08:01 UTC
oVirt Team: Infra


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 36149 master MERGED core: fix external events injection Never
oVirt gerrit 36154 ovirt-engine-3.5 MERGED core: fix external events injection Never

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.


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