<?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: Anonymize -p password in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-p-password/m-p/352416#M64595</link>
    <description>&lt;P&gt;You have no capture groups defined in your regex, and thus &lt;CODE&gt;$1&lt;/CODE&gt; and &lt;CODE&gt;$2&lt;/CODE&gt; can't be used.  Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = ^(.*)-p [0-9A-Za-z]\w{9,255}(.*?)$
FORMAT = $1-p ########$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Though it may make sense to use SEDCMD here instead, because you can more easily replace part of a string (instead of rewriting the entire string from components, as you're doing above).&lt;/P&gt;

&lt;P&gt;In props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog_log_control]
SEDCMD-anonymize = s/-p [0-9A-Za-z]\w{9,255}/-p ########/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 01 Feb 2018 02:29:50 GMT</pubDate>
    <dc:creator>micahkemp</dc:creator>
    <dc:date>2018-02-01T02:29:50Z</dc:date>
    <item>
      <title>Anonymize -p password</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-p-password/m-p/352414#M64593</link>
      <description>&lt;P&gt;I need to anonymize -p passwords that are appearing in syslog. &lt;/P&gt;

&lt;P&gt;Used &lt;BR /&gt;
props.conf&lt;BR /&gt;
 [syslog_log_control]&lt;BR /&gt;
source::/var/log/syslog&lt;BR /&gt;
TRANSFORMS = auth-password-anonymizer&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
auth-password-anonymize]&lt;BR /&gt;
REGEX = -p [0-9A-Za-z]\w{9,255}&lt;BR /&gt;
FORMAT = $1-p =########$2&lt;BR /&gt;
DEST_KEY = _raw&lt;/P&gt;

&lt;P&gt;I am seeing syslog Cannot parse into key-value pair errors&lt;/P&gt;

&lt;P&gt;02-01-2018 00:17:29.320 +0000 WARN  ProcessTracker - (child_183__Fsck)  IniFile - /opt/splunk/etc/slave-apps/_cluster/local/props.conf, line 95: Cannot parse into key-value pair: source::/var/log/syslog&lt;/P&gt;

&lt;P&gt;Please advise&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;NP&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:56:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Anonymize-p-password/m-p/352414#M64593</guid>
      <dc:creator>narenpalepu</dc:creator>
      <dc:date>2020-09-29T17:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymize -p password</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-p-password/m-p/352415#M64594</link>
      <description>&lt;P&gt;are you trying to set the source to /var/log/syslog?  Or is that the source you want to apply the transform to?  I don't think your props is doing either correctly, which is why I think it's barking at you.  &lt;/P&gt;

&lt;P&gt;but it also looks like you may have typed that in above or missed some bits during copy/paste, so not sure if that's exactly how your config looks?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 01:47:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Anonymize-p-password/m-p/352415#M64594</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2018-02-01T01:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymize -p password</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-p-password/m-p/352416#M64595</link>
      <description>&lt;P&gt;You have no capture groups defined in your regex, and thus &lt;CODE&gt;$1&lt;/CODE&gt; and &lt;CODE&gt;$2&lt;/CODE&gt; can't be used.  Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = ^(.*)-p [0-9A-Za-z]\w{9,255}(.*?)$
FORMAT = $1-p ########$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Though it may make sense to use SEDCMD here instead, because you can more easily replace part of a string (instead of rewriting the entire string from components, as you're doing above).&lt;/P&gt;

&lt;P&gt;In props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog_log_control]
SEDCMD-anonymize = s/-p [0-9A-Za-z]\w{9,255}/-p ########/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Feb 2018 02:29:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Anonymize-p-password/m-p/352416#M64595</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-01T02:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymize -p password</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-p-password/m-p/352417#M64596</link>
      <description>&lt;P&gt;Thanks a lot to both .&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
[source::/var/log/syslog]&lt;BR /&gt;
TRANSFORMS = auth-password-anonymizer&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
[auth-password-anonymizer]&lt;BR /&gt;
REGEX = ^(.&lt;EM&gt;)-p [0-9A-Za-z]\w{9,255}(.&lt;/EM&gt;?)$&lt;BR /&gt;
FORMAT = $1-p ########$2&lt;BR /&gt;
DEST_KEY = _raw&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 03:02:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Anonymize-p-password/m-p/352417#M64596</guid>
      <dc:creator>narenpalepu</dc:creator>
      <dc:date>2018-02-01T03:02:44Z</dc:date>
    </item>
  </channel>
</rss>

