<?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: API AWS query question in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/API-AWS-query-question/m-p/521945#M9312</link>
    <description>&lt;P&gt;Mfa hasn't been extracted until after the rex (that extracts it), so try something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"search index="aws" (userIdentity.type="Root" eventName="ConsoleLogin" earliest=-10d | rex field=_raw MFAUsed\D\D\s\D(?P&amp;lt;Mfa&amp;gt;\D?\S) | where Mfa="No*" | rex field=_raw principalId\D:\s\D(?P&amp;lt;principalId&amp;gt;\d*)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 09:53:29 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2020-09-29T09:53:29Z</dc:date>
    <item>
      <title>API AWS query question</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/API-AWS-query-question/m-p/521941#M9311</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;This is my API AWS query:&lt;/P&gt;&lt;P&gt;"search index=aws userIdentity.type=Root eventName=ConsoleLogin earliest=-10d&amp;nbsp; | rex field=_raw MFAUsed\D\D\s\D(?P&amp;lt;Mfa&amp;gt;\D?\S) | rex field=_raw principalId\D:\s\D(?P&amp;lt;principalId&amp;gt;\d*)" | stats count by principalId"&lt;/P&gt;&lt;P&gt;its working and im getting results.&lt;/P&gt;&lt;P&gt;Now I need your help with add the field that I parse (Mfa)&lt;/P&gt;&lt;P&gt;and to add Mfa="No" to the query&lt;/P&gt;&lt;P&gt;but its not showing resutls.&lt;/P&gt;&lt;P&gt;I tried to do something like that:&lt;/P&gt;&lt;P&gt;"search index="aws" (userIdentity.type="Root" eventName="ConsoleLogin" Mfa="No*" earliest=-10d | rex field=_raw MFAUsed\D\D\s\D(?P&amp;lt;Mfa&amp;gt;\D?\S) | rex field=_raw principalId\D:\s\D(?P&amp;lt;principalId&amp;gt;\d*)"&lt;/P&gt;&lt;P&gt;What Im missing?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:45:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/API-AWS-query-question/m-p/521941#M9311</guid>
      <dc:creator>havatz</dc:creator>
      <dc:date>2020-09-29T09:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: API AWS query question</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/API-AWS-query-question/m-p/521945#M9312</link>
      <description>&lt;P&gt;Mfa hasn't been extracted until after the rex (that extracts it), so try something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"search index="aws" (userIdentity.type="Root" eventName="ConsoleLogin" earliest=-10d | rex field=_raw MFAUsed\D\D\s\D(?P&amp;lt;Mfa&amp;gt;\D?\S) | where Mfa="No*" | rex field=_raw principalId\D:\s\D(?P&amp;lt;principalId&amp;gt;\d*)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:53:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/API-AWS-query-question/m-p/521945#M9312</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-29T09:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: API AWS query question</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/API-AWS-query-question/m-p/521946#M9313</link>
      <description>&lt;P&gt;"search index="aws" userIdentity.type="Root" eventName="ConsoleLogin" earliest=-10d | rex field=_raw MFAUsed\D\D\s\D(?P&amp;lt;Mfa&amp;gt;\D?\S) | where Mfa="No*" | rex field=_raw principalId\D:\s\D(?P&amp;lt;principalId&amp;gt;\d*) | stats count by principalId"&lt;/P&gt;&lt;P&gt;Got this error:&lt;/P&gt;&lt;P&gt;"messages": [&lt;BR /&gt;{&lt;BR /&gt;"type": "FATAL",&lt;BR /&gt;"text": "Error in 'where' command: The expression is malformed. The factor is missing."&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:02:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/API-AWS-query-question/m-p/521946#M9313</guid>
      <dc:creator>havatz</dc:creator>
      <dc:date>2020-09-29T10:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: API AWS query question</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/API-AWS-query-question/m-p/521949#M9315</link>
      <description>&lt;P&gt;You possibly need to add in escaping of the double-quotes(?)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"search index=\"aws\" userIdentity.type=\"Root\" eventName=\"ConsoleLogin\" earliest=-10d | rex field=_raw MFAUsed\D\D\s\D(?P&amp;lt;Mfa&amp;gt;\D?\S) | where Mfa=\"No*\" | rex field=_raw principalId\D:\s\D(?P&amp;lt;principalId&amp;gt;\d*) | stats count by principalId"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:11:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/API-AWS-query-question/m-p/521949#M9315</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-29T10:11:38Z</dc:date>
    </item>
  </channel>
</rss>

