<div dir="ltr">Oh, forgot the environment:<div><br></div><div>ovirt-engine-backend-3.5.1-0.0.master.20141112062025.git2c24911.el6.noarch<br></div><div>ovirt-engine-restapi-3.5.1-0.0.master.20141112062025.git2c24911.el6.noarch<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-11 15:18 GMT+08:00 plysan <span dir="ltr">&lt;<a href="mailto:plysab@gmail.com" target="_blank">plysab@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>When I try to add an external event to ovirt using curl, I get permission issue:</div><div><br></div><div><div>$ curl  -X POST --insecure -u admin@internal:abc123 -H &quot;Content-Type: application/json&quot; <a href="https://192.168.3.226/ovirt-engine/api/events" target="_blank">https://192.168.3.226/ovirt-engine/api/events</a> --data &#39;{&quot;origin&quot;:&quot;thirdParty&quot;,&quot;severity&quot;:&quot;normal&quot;,&quot;custom_id&quot;:&quot;123&quot;,&quot;description&quot;:&quot;hello external event.&quot;}&#39;</div><div>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;</div><div>&lt;fault&gt;</div><div>    &lt;reason&gt;Operation Failed&lt;/reason&gt;</div><div>    &lt;detail&gt;[User is not authorized to perform this action.]&lt;/detail&gt;</div><div>&lt;/fault&gt;</div></div><div><br></div><div>The engine.log says:</div><div><br></div><div><div>2014-12-11 14:52:33,725 INFO  [org.ovirt.engine.core.bll.aaa.LoginUserCommand] (ajp--127.0.0.1-8702-7) Running command: LoginUserCommand internal: false.</div><div>2014-12-11 14:52:33,732 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp--127.0.0.1-8702-7) Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: User admin logged in.</div><div>2014-12-11 14:52:33,750 INFO  [org.ovirt.engine.core.bll.AddExternalEventCommand] (ajp--127.0.0.1-8702-7) [6947ffae] No permission found for user fdfc627c-d875-11e0-90f0-83df133b58cc or one of the groups he is member of, when running action AddExternalEvent, Required permissions are: Action type: ADMIN Action group: INJECT_EXTERNAL_EVENTS Object type: System  Object ID: aaa00000-0000-0000-0000-123456789aaa.</div><div>2014-12-11 14:52:33,751 WARN  [org.ovirt.engine.core.bll.AddExternalEventCommand] (ajp--127.0.0.1-8702-7) [6947ffae] CanDoAction of action AddExternalEvent failed. Reasons:USER_NOT_AUTHORIZED_TO_PERFORM_ACTION</div><div>2014-12-11 14:52:33,765 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp--127.0.0.1-8702-7) Operation Failed: [User is not authorized to perform this action.]</div><div>2014-12-11 14:52:33,779 INFO  [org.ovirt.engine.core.bll.aaa.LogoutBySessionCommand] (ajp--127.0.0.1-8702-7) [21c639e1] Running command: LogoutBySessionCommand internal: false.</div><div>2014-12-11 14:52:33,780 INFO  [org.ovirt.engine.core.bll.aaa.LogoutUserCommand] (ajp--127.0.0.1-8702-7) [6de8f467] Running command: LogoutUserCommand internal: false.</div><div>2014-12-11 14:52:33,790 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp--127.0.0.1-8702-7) [6de8f467] Correlation ID: 6de8f467, Call Stack: null, Custom Event ID: -1, Message: User admin logged out.</div></div><div><br></div><div>Is this the expected behavior? Or is there anything i missed? </div><div><br></div><div>thanks</div></div>
</blockquote></div><br></div>