Getting Data In

Is it possible to "censor" (anonymize) strings in a log?

mwilson
Engager

We have some logs that have some sensitive data that I would like to replace with ********. Is it possible to set up a regex to check a sourcetype/text match and do this?

I know it's possible to just drop the line, but I'm hoping to keep the rest of the line and just replace the "sensitive" data.

0 Karma
1 Solution

yannK
Splunk Employee
Splunk Employee

renems
Communicator

You probably want to use event based routing. Best thing you can do, is to set up a heavy/intermediate forwarder. This way you can set up a transforms that masks the data you like (based on regexes). You can read more about this here: http://docs.splunk.com/Documentation/Splunk/6.2.0/Forwarding/Routeandfilterdatad#Configure_routing

You might also want to consider the following: How about not masking (=editing) the data, but instead move those specific lines to another index? You then grant access to that index only for those users that are accountable. That way you didn't edit the data, and restrict access to those who shouldn't be able to query it anyway. You find how in the same link (point 3 and 4).

0 Karma

yannK
Splunk Employee
Splunk Employee

Look at the command "SEDCMD"in the props.conf, at index time.

http://docs.splunk.com/Documentation/Splunk/6.3.1/Data/Anonymizedata

mwilson
Engager

Thank you, my search foo not so good, kept searching for censor.

Will give it a go.

0 Karma
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...