<?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 Anonymize the sensitive data  no gaurantee in splunk? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-the-sensitive-data-no-gaurantee-in-splunk/m-p/93816#M19515</link>
    <description>&lt;P&gt;I was failed to make the data anonymized in splunk .Passwords showing up in results even configured props and transforms.conf as meniotned in following doc. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.4/Data/Anonymizedatausingconfigurationfiles#Replace_strings_with_regex_match"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.4/Data/Anonymizedatausingconfigurationfiles#Replace_strings_with_regex_match&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Here is my example log lines&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;time: 20120912225738
dn: uid=xxxxxx,,dc=xxxx,dc=com
changetype: modify
replace: xxxPasswordData
xxxPasswordData: dLgizscxVCzeLVTO7kuVzmsjP973vDMMmu+fE6FcLiTX+fKuCcBDAPAQjvi
 fu3InFywq0ELXzHIYLhcCBpinxdPVlgNpMcWOENWTDUrqWt+lhBJ7zrfAhgEHJFdGTAmA3Sj/ITr
 sodsVCD8u4Y1X3+SLySA3hPKynu2+lzFdKiXuCgSF1ka4nTudeICruPRRx8gmdo6S6sQmV+O3Snn
 DJw==
-
replace: modifiersname
modifiersname: cn=xxxx,dc=xxxxx,dc=com
-
replace: modifytimestamp
modifytimestamp: 20120913025738Z
-
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to mask the  xxxPasswordData whenever it apperas with values as xxxPasswordData:############==&lt;/P&gt;

&lt;P&gt;Here is Props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
sourcetype = auditlog

[auditlog]
TRANSFORMS-anonymize = xxxpassworddata, userpassword
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[xxxpassworddata]
DEST_KEY = _raw
REGEX = (m?)xxxPasswordData\:\s([^\==]+).*)
FORMAT = xxxPasswordData:################==
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After all above configurations. splunk just showing data in normal way with out masking .&lt;/P&gt;</description>
    <pubDate>Wed, 17 Oct 2012 20:24:29 GMT</pubDate>
    <dc:creator>splunkatl</dc:creator>
    <dc:date>2012-10-17T20:24:29Z</dc:date>
    <item>
      <title>Anonymize the sensitive data  no gaurantee in splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-the-sensitive-data-no-gaurantee-in-splunk/m-p/93816#M19515</link>
      <description>&lt;P&gt;I was failed to make the data anonymized in splunk .Passwords showing up in results even configured props and transforms.conf as meniotned in following doc. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.4/Data/Anonymizedatausingconfigurationfiles#Replace_strings_with_regex_match"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.4/Data/Anonymizedatausingconfigurationfiles#Replace_strings_with_regex_match&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Here is my example log lines&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;time: 20120912225738
dn: uid=xxxxxx,,dc=xxxx,dc=com
changetype: modify
replace: xxxPasswordData
xxxPasswordData: dLgizscxVCzeLVTO7kuVzmsjP973vDMMmu+fE6FcLiTX+fKuCcBDAPAQjvi
 fu3InFywq0ELXzHIYLhcCBpinxdPVlgNpMcWOENWTDUrqWt+lhBJ7zrfAhgEHJFdGTAmA3Sj/ITr
 sodsVCD8u4Y1X3+SLySA3hPKynu2+lzFdKiXuCgSF1ka4nTudeICruPRRx8gmdo6S6sQmV+O3Snn
 DJw==
-
replace: modifiersname
modifiersname: cn=xxxx,dc=xxxxx,dc=com
-
replace: modifytimestamp
modifytimestamp: 20120913025738Z
-
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to mask the  xxxPasswordData whenever it apperas with values as xxxPasswordData:############==&lt;/P&gt;

&lt;P&gt;Here is Props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
sourcetype = auditlog

[auditlog]
TRANSFORMS-anonymize = xxxpassworddata, userpassword
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[xxxpassworddata]
DEST_KEY = _raw
REGEX = (m?)xxxPasswordData\:\s([^\==]+).*)
FORMAT = xxxPasswordData:################==
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After all above configurations. splunk just showing data in normal way with out masking .&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2012 20:24:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Anonymize-the-sensitive-data-no-gaurantee-in-splunk/m-p/93816#M19515</guid>
      <dc:creator>splunkatl</dc:creator>
      <dc:date>2012-10-17T20:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymize the sensitive data  no gaurantee in splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-the-sensitive-data-no-gaurantee-in-splunk/m-p/93817#M19516</link>
      <description>&lt;P&gt;I believe that there may be 3 things here (in no particular order);&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;your events are not being classified as &lt;CODE&gt;auditlog&lt;/CODE&gt; at all. Therefore the TRANSFORMS-anonymize does not get applied. Verify that the events have the correct sourcetype.&lt;/LI&gt;
&lt;LI&gt;Your regex capturing is wrong. Specifically the &lt;CODE&gt;([^\==])&lt;/CODE&gt;. Is that part of the log really multiline, or just linewrapped in your post? &lt;CODE&gt;(\S+)&lt;/CODE&gt; could work instead, i.e. all non-whitespace characters. That would capture everything up to (and including) the ending ==&lt;/LI&gt;
&lt;LI&gt;There seems to be a closing parentheses at the end of the regex, which may cause it to fail.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2012 21:02:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Anonymize-the-sensitive-data-no-gaurantee-in-splunk/m-p/93817#M19516</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-10-17T21:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymize the sensitive data  no gaurantee in splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-the-sensitive-data-no-gaurantee-in-splunk/m-p/93818#M19517</link>
      <description>&lt;P&gt;Also, this change only affects new data.  Previously indexed data will not be changed by this.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2012 21:16:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Anonymize-the-sensitive-data-no-gaurantee-in-splunk/m-p/93818#M19517</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-10-17T21:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymize the sensitive data  no gaurantee in splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-the-sensitive-data-no-gaurantee-in-splunk/m-p/93819#M19518</link>
      <description>&lt;P&gt;Kristian Thanks for responding!!&lt;BR /&gt;
It will be a puzzle always to accomplish even a simple implementation task in splunk. &lt;BR /&gt;
I have checked all your points &lt;BR /&gt;
1)sourcetype is correct to what I mentioned in props.conf.&lt;BR /&gt;
2) All Lines come exactly same as I copied in my previous post&lt;BR /&gt;
3)Always testing with newly indexed data&lt;BR /&gt;
4)slightly modified the REXEX, FORMAT remained unchanged.&lt;BR /&gt;
 REGEX =(?m)xxxPasswordData:\s(\S+)&lt;BR /&gt;
 FORMAT = xxxPasswordData:##########==&lt;BR /&gt;
Result is, whole event is gone and replaced with just the line xxxPasswordData:################==&lt;BR /&gt;
I think it actually masking the whole event instead of xxxPasswordData value line. &lt;/P&gt;

&lt;P&gt;My desired output is&lt;BR /&gt;
time: 20120912225738&lt;BR /&gt;
dn: uid=xxxxxx,,dc=xxxx,dc=com&lt;BR /&gt;
changetype: modify&lt;BR /&gt;
replace: xxxPasswordData&lt;BR /&gt;
xxxPasswordData: ############==&lt;BR /&gt;
replace: modifiersname&lt;/P&gt;

&lt;H2&gt;modifiersname: cn=xxxx,dc=xxxxx,dc=com&lt;/H2&gt;

&lt;P&gt;replace: modifytimestamp&lt;/P&gt;

&lt;H2&gt;modifytimestamp: 20120913025738Z&lt;/H2&gt;</description>
      <pubDate>Thu, 18 Oct 2012 17:24:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Anonymize-the-sensitive-data-no-gaurantee-in-splunk/m-p/93819#M19518</guid>
      <dc:creator>splunkatl</dc:creator>
      <dc:date>2012-10-18T17:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymize the sensitive data  no gaurantee in splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-the-sensitive-data-no-gaurantee-in-splunk/m-p/93820#M19519</link>
      <description>&lt;P&gt;Try this: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;REGEX =(?msi)^(.*?)xxxPasswordData:\s(.+?)(replace.*)&lt;BR /&gt;
FORMAT = $1xxxPasswordData:################==\n$3&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps, &lt;/P&gt;

&lt;P&gt;d.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2012 05:44:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Anonymize-the-sensitive-data-no-gaurantee-in-splunk/m-p/93820#M19519</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2012-10-19T05:44:17Z</dc:date>
    </item>
  </channel>
</rss>

