<?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: Question about RQL 'userIDGroupPairs[*]' from security group in Prisma Cloud Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/question-about-rql-useridgrouppairs-from-security-group/m-p/570078#M1131</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Testing this on an example resource in my lab you should be able to select multiple fields under the&amp;nbsp;ipPermissions array, as well as select AND, and OR for each items under that ray as you build out the RQL query.&amp;nbsp; I did notice an small syntax error at the beginning of the query.&amp;nbsp; Fix that and give it another attempt and try using the auto complete from the JSON rule viewer to help as well.&lt;BR /&gt;config from cloud.resource &lt;EM&gt;where&lt;/EM&gt; api.name = &lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2023 18:23:15 GMT</pubDate>
    <dc:creator>MDavis29</dc:creator>
    <dc:date>2023-12-15T18:23:15Z</dc:date>
    <item>
      <title>Question about RQL 'userIDGroupPairs[*]' from security group</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/question-about-rql-useridgrouppairs-from-security-group/m-p/569362#M1121</link>
      <description>&lt;P&gt;Hello. I am asking if you can give some help about creating a RQL for a custom policy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was trying to create a RQL about AWS security groups that tries to find if the description in &lt;STRONG&gt;userIdGroupPairs[*]&lt;/STRONG&gt; for each &lt;STRONG&gt;inbound or outbound rules&lt;/STRONG&gt;('ipPermissions' / 'ipPermissionsEgress') does not include these two strings, "SAC*" or "ACE*".&lt;/P&gt;
&lt;P&gt;(After each strings, it each has some unique numbers so we want to find by the common strings of each SAC and ACE)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see from the resource config and if you know how the RQL queries, the each of the &lt;STRONG&gt;Security Group Rules are separated with four fields (ipv4Ranges,&amp;nbsp;ipv6Ranges, prefixListIds,&amp;nbsp;userIdGroupPairs)&lt;/STRONG&gt; and the related information are &lt;STRONG&gt;just arranged under each fields&lt;/STRONG&gt;.(Check the example screenshot)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AmYoon_1-1702346131035.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/55835iD13C96DBCD652C62/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="AmYoon_1-1702346131035.png" alt="AmYoon_1-1702346131035.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to check if each of these lists&amp;nbsp; of descriptions one by one whether they contain SAC or ACE but from my RQL below,&lt;/P&gt;
&lt;P&gt;I could only check if either&amp;nbsp;or not 'userIdGroupPairs' contain&amp;nbsp;SAC or ACE from the whole list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The RQL example is like below :&lt;BR /&gt;&lt;EM&gt;config from cloud.resource api.name = 'aws-ec2-describe-security-groups' AND json.rule = (ipPermissions[*].userIdGroupPairs[*] is not empty and ipPermissions[?all(userIdGroupPairs[*].description does not contain SAC and userIdGroupPairs[*].description does not contain ACE)] exists) or (ipPermissionsEgress[*].userIdGroupPairs[*] is not empty and ipPermissionsEgress[?all(userIdGroupPairs[*].description does not contain SAC and userIdGroupPairs[*].description does not contain ACE)] exists)&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope you give some tips about this RQL or if there are some other useful operators can be used that I couldn't find.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&lt;LI-PRODUCT title="Prisma Cloud" id="Prisma_Cloud"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 02:05:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/question-about-rql-useridgrouppairs-from-security-group/m-p/569362#M1121</guid>
      <dc:creator>AmYoon</dc:creator>
      <dc:date>2023-12-12T02:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Question about RQL 'userIDGroupPairs[*]' from security group</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/question-about-rql-useridgrouppairs-from-security-group/m-p/570078#M1131</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Testing this on an example resource in my lab you should be able to select multiple fields under the&amp;nbsp;ipPermissions array, as well as select AND, and OR for each items under that ray as you build out the RQL query.&amp;nbsp; I did notice an small syntax error at the beginning of the query.&amp;nbsp; Fix that and give it another attempt and try using the auto complete from the JSON rule viewer to help as well.&lt;BR /&gt;config from cloud.resource &lt;EM&gt;where&lt;/EM&gt; api.name = &lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 18:23:15 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/question-about-rql-useridgrouppairs-from-security-group/m-p/570078#M1131</guid>
      <dc:creator>MDavis29</dc:creator>
      <dc:date>2023-12-15T18:23:15Z</dc:date>
    </item>
  </channel>
</rss>

