<?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: Help with Masking data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408625#M117962</link>
    <description>&lt;P&gt;You can do it all in &lt;CODE&gt;props.conf&lt;/CODE&gt; with the following as an example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[es_prd_api]
SEDCMD-anonauth = s/Authorization=.*/Authorization=########/
SEDCMD-anonrefer = s/Referer=.*/Referer=########/
SEDCMD-anonencs = s/Enc-Session=.*/Enc-Session=########/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 15 Aug 2018 14:58:29 GMT</pubDate>
    <dc:creator>cpetterborg</dc:creator>
    <dc:date>2018-08-15T14:58:29Z</dc:date>
    <item>
      <title>Help with Masking data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408622#M117959</link>
      <description>&lt;P&gt;We have application writing logs as Windows Events .  There are 3 fields that we wanted to mask .. &lt;/P&gt;

&lt;P&gt;Accept-Language=en-US,en;q=0.9&lt;BR /&gt;
Authorization=Auth xcvftYUIOLKN2luc3QiOiJiZTExMTQwODkzIiwiZWxsaV91aWQiOiJFbmNvbXBhc3NcXGJlMTExNDA4OTNcXDU5NTg0NjI4NTQiLCAic2Vzc2lvbiI6ImJlMTExNDA4OTNfMjhiZTI3NTYtZjY3MC00NGVhLTk4MzktMmM2NTRmMzkzZDc4IiwgInNpdGVfaWQiOiIzNjUxMzEzMzcxIiwgImluaXRfa2V5IjoiIn0=&lt;BR /&gt;
Host=enc-ez9.xzapi.com&lt;BR /&gt;
Referer=&lt;A href="https://portal.juniorkiio.com/site-app/?id=1234567"&gt;https://portal.juniorkiio.com/site-app/?id=1234567&lt;/A&gt;&lt;BR /&gt;
User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36&lt;BR /&gt;
base-URI=/reverseproxy&lt;BR /&gt;
Enc-Session=cte235467_28be2756-f670-44ea-9839-2c654f393d78&lt;BR /&gt;
http-method=GET&lt;/P&gt;

&lt;P&gt;We want to mask values of Authorization, Referer and Enc-Session.  I have tried masking one to see, if it works but haven't seen any success. &lt;/P&gt;

&lt;P&gt;Following is my&lt;/P&gt;

&lt;P&gt;props.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[es_prd_api]
TRANSFORMS-anonymize = authorization-anonymizer
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[authorization-anonymizer]
REGEX = (?m)^(.*)Authorization=(.*)$
FORMAT = $1Authorization=########$2
DEST_KEY = Message
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Appreciate help and guidance. &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 07:51:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408622#M117959</guid>
      <dc:creator>nmohammed</dc:creator>
      <dc:date>2018-08-15T07:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Masking data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408623#M117960</link>
      <description>&lt;P&gt;Try this instead&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [authorization-anonymizer]
 REGEX = Authorization=(.*)$
 FORMAT = ########
 DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [authorization-anonymizer]
 REGEX = Authorization=(.*)$
 FORMAT = ########
 DEST_KEY = Message
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You’ll have to reload your data, it will not hanged the existing data that has already been indexed.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 10:28:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408623#M117960</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2018-08-15T10:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Masking data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408624#M117961</link>
      <description>&lt;P&gt;Thanks @jkat54&lt;/P&gt;

&lt;P&gt;I tried both the options and pushed the bundle , but it still doesn't mask the Authorization field.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 13:32:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408624#M117961</guid>
      <dc:creator>nmohammed</dc:creator>
      <dc:date>2018-08-15T13:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Masking data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408625#M117962</link>
      <description>&lt;P&gt;You can do it all in &lt;CODE&gt;props.conf&lt;/CODE&gt; with the following as an example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[es_prd_api]
SEDCMD-anonauth = s/Authorization=.*/Authorization=########/
SEDCMD-anonrefer = s/Referer=.*/Referer=########/
SEDCMD-anonencs = s/Enc-Session=.*/Enc-Session=########/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Aug 2018 14:58:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408625#M117962</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2018-08-15T14:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Masking data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408626#M117963</link>
      <description>&lt;P&gt;Give this a try,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[authorization-anonymizer]
REGEX = (?m)^(Authorization=).*$
FORMAT = $1########
DEST_KEY = Message
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Aug 2018 15:07:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408626#M117963</guid>
      <dc:creator>sudosplunk</dc:creator>
      <dc:date>2018-08-15T15:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Masking data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408627#M117964</link>
      <description>&lt;P&gt;I was about to suggest using SEDCMD. But I wasn't sure how to properly interpret below information, per &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.2/Data/Anonymizedata#Caveats_for_anonymizing_data"&gt;splunk docs&lt;/A&gt;. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Restrictions for using the sed script to anonymize data
If you use the SEDCMD method to anonymize the data, the following restrictions apply:

&amp;gt; The SEDCMD script applies only to the _raw field at index time. With the regular expression transform, you can apply changes to other fields.
&amp;gt; You cannot use more than one SEDCMD type transformation for the same host, source, or source type in a single props.conf file.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Aug 2018 15:12:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408627#M117964</guid>
      <dc:creator>sudosplunk</dc:creator>
      <dc:date>2018-08-15T15:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Masking data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408628#M117965</link>
      <description>&lt;P&gt;Is data flowing through / From a heavy forwarder?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 15:54:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408628#M117965</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2018-08-15T15:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Masking data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408629#M117966</link>
      <description>&lt;P&gt;This is incorrect:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;You cannot use more than one SEDCMD type transformation for the same host, source, or source type in a single props.conf file.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;They can be used in same props file but they apply from top down in ascii numerical order.&lt;/P&gt;

&lt;P&gt;That is to say if this is my data&lt;/P&gt;

&lt;P&gt;“Hello Good World”&lt;/P&gt;

&lt;P&gt;SEDCMD-aaa = s/Good/Bad/&lt;BR /&gt;
SEDCMD-bbb = s/Bad/Terrible/&lt;/P&gt;

&lt;P&gt;Would change the data to this:&lt;/P&gt;

&lt;P&gt;“Hello Terrible World”&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 15:57:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408629#M117966</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2018-08-15T15:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Masking data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408630#M117967</link>
      <description>&lt;P&gt;No. from Universal Forwarder.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 18:45:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408630#M117967</guid>
      <dc:creator>nmohammed</dc:creator>
      <dc:date>2018-08-15T18:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Masking data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408631#M117968</link>
      <description>&lt;P&gt;SEDCMD did the trick.&lt;BR /&gt;&lt;BR /&gt;
Thanks cpetterborg and all others who helped with the inputs.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 20:42:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408631#M117968</guid>
      <dc:creator>nmohammed</dc:creator>
      <dc:date>2018-08-15T20:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Masking data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408632#M117969</link>
      <description>&lt;P&gt;@nittala_surya  &lt;/P&gt;

&lt;P&gt;tried this before SEDCMD , it did not work.  We could see the values coming in plain text. &lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 20:43:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Masking-data/m-p/408632#M117969</guid>
      <dc:creator>nmohammed</dc:creator>
      <dc:date>2018-08-15T20:43:16Z</dc:date>
    </item>
  </channel>
</rss>

