<?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: Sanitize Incoming Data (remove Passwords) in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Sanitize-Incoming-Data-remove-Passwords/m-p/191110#M38053</link>
    <description>&lt;P&gt;Yes, that is what i was looking for, thank you very much.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jun 2014 16:49:23 GMT</pubDate>
    <dc:creator>aattinello</dc:creator>
    <dc:date>2014-06-06T16:49:23Z</dc:date>
    <item>
      <title>Sanitize Incoming Data (remove Passwords)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Sanitize-Incoming-Data-remove-Passwords/m-p/191108#M38051</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
  I am looking for a sanitize my incoming data.  My customers sometimes pass GET parameters instead of POST parameters, which is normally fine.  However in some cases they pass their password into our API as a GET parameter which then appears in plain text in my webserver log.  When i send this data to Splunk I would like to match that password and replace with a string like FILTERED.  The tool I am using to log this data has no way to scrub that data while preserving the other get parameters, so I was hoping Splunk was able to.  &lt;/P&gt;

&lt;P&gt;So some of my sample lines looks like this&lt;BR /&gt;
  10.213.172.3 [02/May/2014:16:31:07 -0400] 31249 "GET /endPoint/?action=login&amp;amp;loginUsername=test&amp;amp;loginOrganization=Test&amp;amp;loginPassword=superTest HTTP/1.1" 200 570 4243 "Zend_Http_Client" "-" -&lt;/P&gt;

&lt;P&gt;10.213.172.3 [02/May/2014:16:31:16 -0400] 187498 "POST /endpoint/other/otherPage.html?loginUsername=test&amp;amp;loginPassword=superTest&amp;amp;loginOrganization=Test HTTP/1.1" 200 1573 708 "Zend_Http_Client" "en-US,en;q=0.8" 6E1182505E7B71DAA4340E831A53F440.node1&lt;/P&gt;

&lt;P&gt;I am looking to match this parameter (up until the first space or &amp;amp;)&lt;BR /&gt;
   &amp;amp;loginPassword=((.*&amp;amp;)|(\S+))&lt;BR /&gt;
And replace that with something like &lt;BR /&gt;
   &amp;amp;loginPassword=FILTERED&lt;/P&gt;

&lt;P&gt;So those 2 examples would end up indexed as&lt;BR /&gt;
  10.213.172.3 [02/May/2014:16:31:07 -0400] 31249 "GET /endPoint/?action=login&amp;amp;loginUsername=test&amp;amp;loginOrganization=Test&amp;amp;loginPassword=FILTERED HTTP/1.1" 200 570 4243 "Zend_Http_Client" "-" -&lt;/P&gt;

&lt;P&gt;10.213.172.3 [02/May/2014:16:31:16 -0400] 187498 "POST /endpoint/other/otherPage.html?loginUsername=test&amp;amp;loginPassword=FILTERED&amp;amp;loginOrganization=Test HTTP/1.1" 200 1573 708 "Zend_Http_Client" "en-US,en;q=0.8" 6E1182505E7B71DAA4340E831A53F440.node1&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:48:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Sanitize-Incoming-Data-remove-Passwords/m-p/191108#M38051</guid>
      <dc:creator>aattinello</dc:creator>
      <dc:date>2020-09-28T16:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sanitize Incoming Data (remove Passwords)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Sanitize-Incoming-Data-remove-Passwords/m-p/191109#M38052</link>
      <description>&lt;P&gt;Hi aattinello,&lt;/P&gt;

&lt;P&gt;I know you can mask sensitive data using props.conf and transforms.conf.&lt;/P&gt;

&lt;P&gt;In props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::\\yoursource.log]
TRANSFORMS-password = password_mask
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And in transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[password_mask]
DEST_KEY = _raw
REGEX = (.*loginPassword=)\d\s
FORMAT = $FILTERED$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I don't understand a lot of regex, but maybe you can modify it using some online checker.&lt;/P&gt;

&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2014 14:23:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Sanitize-Incoming-Data-remove-Passwords/m-p/191109#M38052</guid>
      <dc:creator>gfreitas</dc:creator>
      <dc:date>2014-06-06T14:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sanitize Incoming Data (remove Passwords)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Sanitize-Incoming-Data-remove-Passwords/m-p/191110#M38053</link>
      <description>&lt;P&gt;Yes, that is what i was looking for, thank you very much.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2014 16:49:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Sanitize-Incoming-Data-remove-Passwords/m-p/191110#M38053</guid>
      <dc:creator>aattinello</dc:creator>
      <dc:date>2014-06-06T16:49:23Z</dc:date>
    </item>
  </channel>
</rss>

