<?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: Data masking using heavy forwarders in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313155#M58694</link>
    <description>&lt;P&gt;Please refer this &lt;A href="https://regex101.com/r/CftIqK/1"&gt;https://regex101.com/r/CftIqK/1&lt;/A&gt;, regex is working perfectly fine. Can you please provide your configuration in &lt;CODE&gt;Code Sample&lt;/CODE&gt; format because your REGEX is still wrong,  you can see 101010 button when you type comment/answer please use that and paste your transforms.conf configuration.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2017 12:10:47 GMT</pubDate>
    <dc:creator>harsmarvania57</dc:creator>
    <dc:date>2017-11-28T12:10:47Z</dc:date>
    <item>
      <title>Data masking using heavy forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313148#M58687</link>
      <description>&lt;P&gt;Been trying to mask data before indexing into indexer using heavy forwarders.  below is the log sample and data am trying to mask &lt;/P&gt;

&lt;P&gt;JSESSIONID=SD1SL10FF3ADFF3" to JSESSIONID=#######FF3ADFF3"&lt;/P&gt;

&lt;P&gt;189.222.1.46 - - [24/Jul/2014:11:27:00] "GET /flower_store/product.screen?product_id=RP-SN-01 HTTP/1.1" 200 10897 "&lt;A href="http://mystore.splunk.com/flower_store/category.screen?category_id=BALLOONS&amp;amp;JSESSIONID=SD1SL10FF3ADFF3" target="_blank"&gt;http://mystore.splunk.com/flower_store/category.screen?category_id=BALLOONS&amp;amp;JSESSIONID=SD1SL10FF3ADFF3&lt;/A&gt;" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070223 CentOS/1.5.0.10-0.1.el4.centos Firefox/1.5.0.10" 527 3006&lt;/P&gt;

&lt;P&gt;10.2.91.38 - - [24/Jul/2014:11:28:00] "POST /flower_store/j_signon_check HTTP/1.1" 302 309 &lt;BR /&gt;
"&lt;A href="http://mystore.splunk.com/flower_store/enter_order_information.screen&amp;amp;JSESSIONID=SD1SL10FF3ADFF3" target="_blank"&gt;http://mystore.splunk.com/flower_store/enter_order_information.screen&amp;amp;JSESSIONID=SD1SL10FF3ADFF3&lt;/A&gt;" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070223 CentOS/1.5.0.10-0.1.el4.centos Firefox/1.5.0.10" 3441 2576&lt;/P&gt;

&lt;P&gt;192.0.1.38 - - [24/Jul/2014:11:28:15] "GET /flower_store/images/cat3.gif HTTP/1.1" 200 5024 "&lt;A href="http://mystore.splunk.com/flower_store/item.screen?item_id=EST-21&amp;amp;JSESSIONID=SD1SL10FF3ADFF3" target="_blank"&gt;http://mystore.splunk.com/flower_store/item.screen?item_id=EST-21&amp;amp;JSESSIONID=SD1SL10FF3ADFF3&lt;/A&gt;" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070223 CentOS/1.5.0.10-0.1.el4.centos Firefox/1.5.0.10" 4323 3071&lt;/P&gt;

&lt;P&gt;below is my props.conf and transforms.conf:&lt;/P&gt;

&lt;P&gt;[access_common]&lt;BR /&gt;
TRANSFORMS-anonymize = session-anonymizer&lt;/P&gt;

&lt;P&gt;[session-anonymizer]&lt;BR /&gt;
REGEX = (?m)^(.&lt;EM&gt;)JSESSIONID=\w{2}\d\w{2}\d{2}(\w+.&lt;/EM&gt;)&lt;BR /&gt;
FORMAT = $1JSESSIONID=#######$2&lt;BR /&gt;
DEST_KEY = _raw&lt;/P&gt;

&lt;P&gt;Kindly advice....i do not see and changes in fields after applying this configuration &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:01:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313148#M58687</guid>
      <dc:creator>Venkat_16</dc:creator>
      <dc:date>2020-09-29T17:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Data masking using heavy forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313149#M58688</link>
      <description>&lt;P&gt;Hi @Venkat_16,&lt;/P&gt;

&lt;P&gt;Please use below configuration in transforms.conf on Heavy forwarder.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[session-anonymizer]
REGEX = (?m)^(.*)JSESSIONID=.*((?=\"\s\").*)$
FORMAT = $1JSESSIONID=#######$2
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After changing above configuration please reload configuration using &lt;CODE&gt;&lt;A href="https://&amp;lt;HF" target="test_blank"&gt;https://&amp;lt;HF&lt;/A&gt; FQDN&amp;gt;:8000/debug/refresh&lt;/CODE&gt; OR restart splunk on heavy forwarder.&lt;/P&gt;

&lt;P&gt;I hope this helps.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Harshil&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 08:28:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313149#M58688</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2017-11-28T08:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Data masking using heavy forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313150#M58689</link>
      <description>&lt;P&gt;Thanks for your answer @harsmarvania57. But it didnt work  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;[access_common]&lt;BR /&gt;
TRANSFORMS-anonymize = session-anonymizer&lt;/P&gt;

&lt;P&gt;[session-anonymizer]&lt;BR /&gt;
REGEX = (?m)^(.&lt;EM&gt;)JSESSIONID=\w{2}\d\w{2}\d{2}(\w+.&lt;/EM&gt;)&lt;BR /&gt;
FORMAT = $1JSESSIONID=#######$2&lt;BR /&gt;
DEST_KEY = _raw&lt;/P&gt;

&lt;P&gt;i restarted heavy forwarder also....logs are getting indexed with out any masking&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 10:30:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313150#M58689</guid>
      <dc:creator>Venkat_16</dc:creator>
      <dc:date>2017-11-28T10:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Data masking using heavy forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313151#M58690</link>
      <description>&lt;P&gt;Looks like you are still using your old configuration, please use configuration which I have provided.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 10:32:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313151#M58690</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2017-11-28T10:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Data masking using heavy forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313152#M58691</link>
      <description>&lt;P&gt;sorry it was copy paste error:&lt;/P&gt;

&lt;P&gt;[session-anonymizer]&lt;BR /&gt;
REGEX = (?m)^(.&lt;EM&gt;)JSESSIONID=.&lt;/EM&gt;((?=\"\s\").*)$&lt;BR /&gt;
FORMAT = $1JSESSIONID=#######$2&lt;BR /&gt;
DEST_KEY = _raw&lt;BR /&gt;
 is the one am using&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 10:35:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313152#M58691</guid>
      <dc:creator>Venkat_16</dc:creator>
      <dc:date>2017-11-28T10:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data masking using heavy forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313153#M58692</link>
      <description>&lt;P&gt;Still this configuration is wrong, you can see my regex has &lt;CODE&gt;(?m)^(.*)&lt;/CODE&gt;&lt;BR /&gt;
and configuration which you pasted starts with &lt;CODE&gt;(?m)^(.)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 10:48:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313153#M58692</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2017-11-28T10:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Data masking using heavy forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313154#M58693</link>
      <description>&lt;P&gt;Thanks alot for helping patiently but still it didnt work:&lt;/P&gt;

&lt;P&gt;[access_common]&lt;BR /&gt;
TRANSFORMS-anonymize = session-anonymizer&lt;/P&gt;

&lt;P&gt;[session-anonymizer]&lt;BR /&gt;
REGEX = (?m)^(.&lt;EM&gt;)JSESSIONID=.&lt;/EM&gt;((?=\"\s\").*)$&lt;BR /&gt;
FORMAT = $1JSESSIONID=#######$2&lt;BR /&gt;
DEST_KEY = _raw&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 12:03:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313154#M58693</guid>
      <dc:creator>Venkat_16</dc:creator>
      <dc:date>2017-11-28T12:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Data masking using heavy forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313155#M58694</link>
      <description>&lt;P&gt;Please refer this &lt;A href="https://regex101.com/r/CftIqK/1"&gt;https://regex101.com/r/CftIqK/1&lt;/A&gt;, regex is working perfectly fine. Can you please provide your configuration in &lt;CODE&gt;Code Sample&lt;/CODE&gt; format because your REGEX is still wrong,  you can see 101010 button when you type comment/answer please use that and paste your transforms.conf configuration.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 12:10:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313155#M58694</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2017-11-28T12:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Data masking using heavy forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313156#M58695</link>
      <description>&lt;P&gt;All you need in this case is the following line in your &lt;CODE&gt;props.conf&lt;/CODE&gt; file (no &lt;CODE&gt;transforms.conf&lt;/CODE&gt; config needed) for the sourcetype:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-hidesessionid = s/JSESSIONID=\w{2}\d\w{2}\d{2}/JSESSIONID=#######/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Nov 2017 17:08:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313156#M58695</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-11-28T17:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Data masking using heavy forwarders</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313157#M58696</link>
      <description>&lt;P&gt;This works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw="189.222.1.46 - - [24/Jul/2014:11:27:00] \"GET /flower_store/product.screen?product_id=RP-SN-01 HTTP/1.1\" 200 10897 \"http://mystore.splunk.com/flower_store/category.screen?category_id=BALLOONS&amp;amp;JSESSIONID=SD1SL10FF3ADFF3\" \"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070223 CentOS/1.5.0.10-0.1.el4.centos Firefox/1.5.0.10\" 527 3006:::10.2.91.38 - - [24/Jul/2014:11:28:00] \"POST /flower_store/j_signon_check HTTP/1.1\" 302 309 
\"http://mystore.splunk.com/flower_store/enter_order_information.screen&amp;amp;JSESSIONID=SD1SL10FF3ADFF3\" \"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070223 CentOS/1.5.0.10-0.1.el4.centos Firefox/1.5.0.10\" 3441 2576:::192.0.1.38 - - [24/Jul/2014:11:28:15] \"GET /flower_store/images/cat3.gif HTTP/1.1\" 200 5024 \"http://mystore.splunk.com/flower_store/item.screen?item_id=EST-21&amp;amp;JSESSIONID=SD1SL10FF3ADFF3\" \"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070223 CentOS/1.5.0.10-0.1.el4.centos Firefox/1.5.0.10\" 4323 3071"
| makemv delim=":::" raw
| mvexpand raw
| rename raw AS _raw
| rex mode=sed "s/JSESSIONID=\w{2}\d\w{2}\d{2}(\w+.)/JSESSIONID=#######\1/"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So you can use this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; SEDCMD-session-anonymizer = s/JSESSIONID=\w{2}\d\w{2}\d{2}(\w+.)/JSESSIONID=#######\1/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Nov 2017 02:05:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Data-masking-using-heavy-forwarders/m-p/313157#M58696</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-11-29T02:05:17Z</dc:date>
    </item>
  </channel>
</rss>

