<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Security rule for creating ReloadTask with a schedule trigger in Management &amp; Governance</title>
    <link>https://community.qlik.com/t5/Management-Governance/Security-rule-for-creating-ReloadTask-with-a-schedule-trigger/m-p/1770951#M17114</link>
    <description>&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;For (2), are you after only allowing users to create tasks to apps where they have publish rights on the stream?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Yes. That is correct.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I opted for plan B, allowing all PowerUsers to see and edit all task triggers.&amp;nbsp; (It is not avaiable through the UI, only through the API directly, and strictly no sensitive information may be revealed.&amp;nbsp; They may cause havoc, but in my case, that is an acceptable risk.)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For anyone in a similar situation. I had to create&amp;nbsp; 4 security rules to&amp;nbsp;&lt;/P&gt;&lt;P&gt;To allow a PowerUser to create a task, from the /qmc/tasks page&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Resource:&amp;nbsp;ReloadTask_*&lt;BR /&gt;Actions: Create, Read, Update, Delete&lt;BR /&gt;Condition:&amp;nbsp;((user.roles="PowerUser"))&lt;/P&gt;&lt;P&gt;(They can see all apps, but cannot press 'Apply' if&amp;nbsp; user is missing Publish to the selected app .)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Allow a PowerUser to only see and update tasks connected to apps where he/she has Pubilsh rights.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Resource:&amp;nbsp;ReloadTask_*&lt;BR /&gt;Actions: Read, Update, Delete&lt;BR /&gt;Condition:&amp;nbsp;((user.roles="PowerUser" and resource.app.stream.HasPrivilege("publish")))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Allow a PowerUser to create and edit ALL task triggers.&lt;BR /&gt;(Don't do this yourself before you can verify that this is an acceptable security glitch.)&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Resource: SchemaEvent_*,CompositeEvent_*&lt;BR /&gt;Actions: Create, Read, Update, Delete&lt;BR /&gt;Condition:&amp;nbsp;((user.roles="PowerUser"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Allow the PowerUser to refresh the tasks table&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Resource: ExecutionResult*,ExecutionSession*&lt;BR /&gt;Actions: Read&lt;BR /&gt;Condition:&amp;nbsp;((user.roles="PowerUser"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PS! I also found an article listing the content of the resource 'app' and 'task':&lt;BR /&gt;&lt;A href="https://support.qlik.com/articles/000076134" target="_blank"&gt;https://support.qlik.com/articles/000076134&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Dec 2020 10:30:55 GMT</pubDate>
    <dc:creator>vegard_bakke</dc:creator>
    <dc:date>2020-12-29T10:30:55Z</dc:date>
    <item>
      <title>Security rule for creating ReloadTask with a schedule trigger</title>
      <link>https://community.qlik.com/t5/Management-Governance/Security-rule-for-creating-ReloadTask-with-a-schedule-trigger/m-p/1769757#M17085</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have several departments that shall not see each other streams or apps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each department has a PowerUser that is allowed to run and create reload tasks for apps in their own stream.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We've got most working. The PowerUser can create the task, and for their own apps only.&amp;nbsp; BUT, when creating the Trigger, I get the error message: 'The operation failed due to insufficient privileges'.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QMC Create Task Trigger Failes.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/45896i4E523A6F08A623A7/image-size/large?v=v2&amp;amp;px=999" role="button" title="QMC Create Task Trigger Failes.png" alt="QMC Create Task Trigger Failes.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(Failing on: POST&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://qlik.company.com/dev/qrs/ReloadTask/update" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https&lt;/A&gt;&lt;/SPAN&gt;&lt;A href="https://qlik.company.com/dev/qrs/ReloadTask/update" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;://qlik.company.com/dev/qrs/ReloadTask/update&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The same POST works a litte earlier, but with a different content. 'schemaEvents' is empty, and 'task' has content.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QMC Create Task Trigger.png" style="width: 917px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/45895iBB04561E6FB3BDB5/image-size/large?v=v2&amp;amp;px=999" role="button" title="QMC Create Task Trigger.png" alt="QMC Create Task Trigger.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The setup&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The developers get publish access to their stream, with a SAML attribute (similar to an&amp;nbsp; AD-group).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;One PowerUser get a Qlik Role 'PowerUser'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What have we done?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In addition to the QMC rule: Resouree: 'QMCSection_App, QMCSection_Task', Condition:&amp;nbsp;((user.roles="PowerUser"))&lt;BR /&gt;We created the security rule:&lt;/P&gt;&lt;P&gt;Resource:&amp;nbsp;ReloadTask_*,SchemaEvent*&lt;BR /&gt;Action: Create, Read, Update, Delete&lt;BR /&gt;Condition:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   ((user.roles="PowerUser"
   and resource.app.stream.HasPrivilege("publish")
   ))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Context: QMC Only&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think maybe it is the&amp;nbsp; '&lt;/SPAN&gt;&lt;SPAN&gt;resource.app.stream.HasPrivilege("publish")' that breaks the rule, when we are saving the task trigger (the SchemaEvent ? ). Is seems to be working when saving the reload task itself.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But what is inside the 'resource' object, when 'resource.resourcetype' is "SchemaEvent"?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The&amp;nbsp;&lt;A href="https://github.com/levi-turner/Qonnections2018-Rules#backend-rules" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;GitHub - levi-turner/Qonnections2018-Rules&lt;/A&gt;&amp;nbsp;is great for existing examples.&amp;nbsp; But I cannot find any resources telling me the hierarchy within the 'resource'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A very similar rule works very well for letting the PowerUser delete, import, export app, that the normal developers can only publish:&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Condition: ((user.roles="PowerUser"&amp;nbsp; and resource.stream.HasPrivilege("publish")))&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Any nice xmas helpers out there...?&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":santa_claus:"&gt;🎅&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;(PS This is a double post, since I initially posted in the QlikView forum. I've closed that thread.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:55:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Security-rule-for-creating-ReloadTask-with-a-schedule-trigger/m-p/1769757#M17085</guid>
      <dc:creator>vegard_bakke</dc:creator>
      <dc:date>2024-11-16T00:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Security rule for creating ReloadTask with a schedule trigger</title>
      <link>https://community.qlik.com/t5/Management-Governance/Security-rule-for-creating-ReloadTask-with-a-schedule-trigger/m-p/1769866#M17093</link>
      <description>&lt;P&gt;I guess I'd have two thoughts about the issue.&lt;/P&gt;&lt;P&gt;1. As far as the relationships, it can be a bit difficult to suss this out without calling the underlying QRS APIs. But if you were to call /qrs/schemaevent/full you would&amp;nbsp;&lt;STRONG&gt;not&lt;/STRONG&gt; see the associated app. Compare this to something like /qrs/app/object/full where you have the app (and its stream) exposed. Suffice it to say, triggers have no logical relationship to apps. So inheritance across that demarcation isn't going to be possible.&lt;/P&gt;&lt;P&gt;2. As far as building this rule, I'd honestly break out the read / update / delete rights from the create right. The rationale here is that something cannot fulfill the condition (e.g. the task cannot belong to an app which is in a stream which the user has Publish rights to before it exists).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For (2), are you after only allowing users to create tasks to apps where they have publish rights on the stream?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 17:01:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Security-rule-for-creating-ReloadTask-with-a-schedule-trigger/m-p/1769866#M17093</guid>
      <dc:creator>Levi_Turner</dc:creator>
      <dc:date>2020-12-21T17:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Security rule for creating ReloadTask with a schedule trigger</title>
      <link>https://community.qlik.com/t5/Management-Governance/Security-rule-for-creating-ReloadTask-with-a-schedule-trigger/m-p/1769952#M17096</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;As far as the relationships, it can be a bit difficult to suss this out without calling the underlying QRS APIs.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I agree. Would be nice if you could drop the Qlik documentation team a hint about this.&amp;nbsp; The examples they provide are good, but only as long as you are doing something similar to the examples. (Then again, having just documentation about the details, without the examples, is equally difficult. So I'll have the cake and eat it too, please... : )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;Suffice it to say, triggers have no logical relationship to apps. So inheritance across that demarcation isn't going to be possible.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I was afraid that might be the case.&lt;BR /&gt;&lt;BR /&gt;I'll try playing around with the QRS API.&amp;nbsp; At least that is the basis for what I can use in the security rules conditions. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As a Plan B, I could consider giving PowerUsers full access to &lt;EM&gt;any&lt;/EM&gt; SchemaEvent.&amp;nbsp; It's a small and limited number of PowerUsers.&amp;nbsp; And as long as the users don't&amp;nbsp;&lt;EM&gt;see&lt;/EM&gt; all schemaevents, only those that belong to the tasks that I have managed the access restrictions.&amp;nbsp; &amp;nbsp;I'm willing to accept that as good-enough, in this scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Schema events and Composite events&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Reading&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/sense-developer/November2020/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Event-Triggers.htm" target="_blank" rel="noopener"&gt;Event Triggers&lt;/A&gt;&amp;nbsp; I see that I probably need to allow for CompositeEvents as well.&amp;nbsp; Do they behave any differently from Schema Eents (in this context)?&lt;BR /&gt;&lt;BR /&gt;Basically, we would like to allow PowerUsers to create triggers to tasks.&amp;nbsp; (Didn't realize that Qlik treated "event triggers" and "scheduled triggers" as two different object types and separate rules.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&lt;EM&gt;2. As far as building this rule, I'd honestly break out the read / update / delete rights from the create right.&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I see your point. I'll do that, and keep that in mind for the future.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 08:49:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Security-rule-for-creating-ReloadTask-with-a-schedule-trigger/m-p/1769952#M17096</guid>
      <dc:creator>vegard_bakke</dc:creator>
      <dc:date>2020-12-29T08:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Security rule for creating ReloadTask with a schedule trigger</title>
      <link>https://community.qlik.com/t5/Management-Governance/Security-rule-for-creating-ReloadTask-with-a-schedule-trigger/m-p/1770951#M17114</link>
      <description>&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;For (2), are you after only allowing users to create tasks to apps where they have publish rights on the stream?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Yes. That is correct.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I opted for plan B, allowing all PowerUsers to see and edit all task triggers.&amp;nbsp; (It is not avaiable through the UI, only through the API directly, and strictly no sensitive information may be revealed.&amp;nbsp; They may cause havoc, but in my case, that is an acceptable risk.)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For anyone in a similar situation. I had to create&amp;nbsp; 4 security rules to&amp;nbsp;&lt;/P&gt;&lt;P&gt;To allow a PowerUser to create a task, from the /qmc/tasks page&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Resource:&amp;nbsp;ReloadTask_*&lt;BR /&gt;Actions: Create, Read, Update, Delete&lt;BR /&gt;Condition:&amp;nbsp;((user.roles="PowerUser"))&lt;/P&gt;&lt;P&gt;(They can see all apps, but cannot press 'Apply' if&amp;nbsp; user is missing Publish to the selected app .)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Allow a PowerUser to only see and update tasks connected to apps where he/she has Pubilsh rights.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Resource:&amp;nbsp;ReloadTask_*&lt;BR /&gt;Actions: Read, Update, Delete&lt;BR /&gt;Condition:&amp;nbsp;((user.roles="PowerUser" and resource.app.stream.HasPrivilege("publish")))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Allow a PowerUser to create and edit ALL task triggers.&lt;BR /&gt;(Don't do this yourself before you can verify that this is an acceptable security glitch.)&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Resource: SchemaEvent_*,CompositeEvent_*&lt;BR /&gt;Actions: Create, Read, Update, Delete&lt;BR /&gt;Condition:&amp;nbsp;((user.roles="PowerUser"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Allow the PowerUser to refresh the tasks table&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Resource: ExecutionResult*,ExecutionSession*&lt;BR /&gt;Actions: Read&lt;BR /&gt;Condition:&amp;nbsp;((user.roles="PowerUser"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PS! I also found an article listing the content of the resource 'app' and 'task':&lt;BR /&gt;&lt;A href="https://support.qlik.com/articles/000076134" target="_blank"&gt;https://support.qlik.com/articles/000076134&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 10:30:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Security-rule-for-creating-ReloadTask-with-a-schedule-trigger/m-p/1770951#M17114</guid>
      <dc:creator>vegard_bakke</dc:creator>
      <dc:date>2020-12-29T10:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Security rule for creating ReloadTask with a schedule trigger</title>
      <link>https://community.qlik.com/t5/Management-Governance/Security-rule-for-creating-ReloadTask-with-a-schedule-trigger/m-p/1949783#M22590</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;I'm trying to get this rule work:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Resource: SchemaEvent_*,CompositeEvent_*&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Actions: Create, Read, Update, Delete&lt;BR /&gt;Condition:&amp;nbsp;resource.reloadTask.HasPrivilege("update")&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;What I'm doing wrong?&lt;/P&gt;
&lt;P&gt;Using Qlik-Cli-Windows cmdlet with&amp;nbsp;Get-QlikRelations command&amp;nbsp;I get:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CompositeEvent.externalProgramTask &amp;gt; ExternalProgramTask
CompositeEvent.operational &amp;gt; CompositeEventOperational
CompositeEvent.reloadTask &amp;gt; ReloadTask
CompositeEvent.userSyncTask &amp;gt; UserSyncTask
CompositeEvent.Rule.externalProgramTask &amp;gt; ExternalProgramTask
CompositeEvent.Rule.operational &amp;gt; CompositeEventRuleOperational
CompositeEvent.Rule.reloadTask &amp;gt; ReloadTask
CompositeEvent.Rule.userSyncTask &amp;gt; UserSyncTask
SchemaEvent.externalProgramTask &amp;gt; ExternalProgramTask
SchemaEvent.operational &amp;gt; SchemaEventOperational
SchemaEvent.reloadTask &amp;gt; ReloadTask
SchemaEvent.userSyncTask &amp;gt; UserSyncTask&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;With REST API&lt;SPAN&gt;/qrs/schemaevent/full&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;I also see that&amp;nbsp;&lt;SPAN&gt;schemaevent and compositeevent linked to reloadTask.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 14:37:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Security-rule-for-creating-ReloadTask-with-a-schedule-trigger/m-p/1949783#M22590</guid>
      <dc:creator>BuTbka</dc:creator>
      <dc:date>2022-06-29T14:37:13Z</dc:date>
    </item>
  </channel>
</rss>

