<?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: How to mask passwords from splunk logs? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324067#M60324</link>
    <description>&lt;P&gt;I tried the above transform and props config and it is modifying the whole event and just showing &lt;/P&gt;

&lt;P&gt;userPassword: ################################################&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2018 18:40:10 GMT</pubDate>
    <dc:creator>ssyed2009</dc:creator>
    <dc:date>2018-02-28T18:40:10Z</dc:date>
    <item>
      <title>How to mask passwords from splunk logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324063#M60320</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;time: 20180227120538
... 1 line omitted ...
changetype: modify
replace: userPassword
userPassword: {1234}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Currently, I am trying under props.conf but it doesn't seem to work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-masking = s/\suserPassword:\s\S+/\suserPassword:\s/################################################/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Feb 2018 18:15:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324063#M60320</guid>
      <dc:creator>ssyed2009</dc:creator>
      <dc:date>2018-02-27T18:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to mask passwords from splunk logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324064#M60321</link>
      <description>&lt;P&gt;You can try a combination of props.conf and transforms.conf: &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.0.2/Data/Anonymizedata"&gt;https://docs.splunk.com/Documentation/Splunk/7.0.2/Data/Anonymizedata&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[&amp;lt;spec&amp;gt;]
TRANSFORMS-mask = password-masker
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[password-masker]
REGEX = (?m)^(.*)userPassword:\s(\S+)(.*)$
FORMAT = $1userPassword: ################################################$3
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Feb 2018 19:43:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324064#M60321</guid>
      <dc:creator>mdsnmss</dc:creator>
      <dc:date>2018-02-27T19:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to mask passwords from splunk logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324065#M60322</link>
      <description>&lt;P&gt;The SEDCMD is also an option which is what you are attempting. It looks like your regex may be missing for "/g" flag for replacing matches.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 19:47:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324065#M60322</guid>
      <dc:creator>mdsnmss</dc:creator>
      <dc:date>2018-02-27T19:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to mask passwords from splunk logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324066#M60323</link>
      <description>&lt;P&gt;&lt;CODE&gt;SEDCMD-masking = s/suserPassword:\s\S+/suserPassword:\s/################################################\1/g&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;You may also want to reduce the number of "#" if that isn't of importance. You don't want to necessarily make your data size larger.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 19:51:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324066#M60323</guid>
      <dc:creator>mdsnmss</dc:creator>
      <dc:date>2018-02-27T19:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to mask passwords from splunk logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324067#M60324</link>
      <description>&lt;P&gt;I tried the above transform and props config and it is modifying the whole event and just showing &lt;/P&gt;

&lt;P&gt;userPassword: ################################################&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 18:40:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324067#M60324</guid>
      <dc:creator>ssyed2009</dc:creator>
      <dc:date>2018-02-28T18:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to mask passwords from splunk logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324068#M60325</link>
      <description>&lt;P&gt;Is this your full event you are trying to modify? &lt;/P&gt;

&lt;P&gt;time: 20180227120538&lt;BR /&gt;
 ... 1 line omitted ...&lt;BR /&gt;
 changetype: modify&lt;BR /&gt;
 replace: userPassword&lt;BR /&gt;
 userPassword: {1234}&lt;/P&gt;

&lt;P&gt;It's likely having issues with the multiline format. Try the regex &lt;CODE&gt;(?s)(.*)userPassword:\s(\S+)(.*)$&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 18:51:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-mask-passwords-from-splunk-logs/m-p/324068#M60325</guid>
      <dc:creator>mdsnmss</dc:creator>
      <dc:date>2018-02-28T18:51:30Z</dc:date>
    </item>
  </channel>
</rss>

