Getting Data In

Masking account numbers

KarlGechlik
Explorer

Hello we are trying to mask an account#'s last 5 digits. I have added this to props.conf

[annon]
TRANSFORMS-anonymize = hideacct-number

and this to transforms.conf

[hideacct-number]
REGEX=(.*AcctCode=\d{5}-).*
FORMAT=$1xxxxx

I stopped splunk and cleaned the index and then started it again and the account numbers are still there completely. What are we missing?

Update: I am using 4.2.3 and I am trying to mask the last 5 characters with X's. I am trying JSapienza's answer now and will keep you posted. Thanks!

Update2: That did not help. It does not change my data. I tried REPORT as well with the same results.

0 Karma
1 Solution

KarlGechlik
Explorer

Turns out it was a combination of JSapienza's answer and removing my header in props.conf:

props.conf:

EXTRACT- = .TraderID:(?.)

TRANSFORMS = hideacct-number

transforms.conf:

[hideacct-number]
DEST_KEY =_raw
REGEX=(.AcctCode=\d{5}-).
FORMAT=$1xxxxx

and apparently the DEST_KEY =_raw needs to be at the top of transforms.conf

View solution in original post

0 Karma

MicroAlpha
Explorer

Another way, albeit external and not free, is with a third-party masking tool for the data sources you would index into Splunk. I found this:

http://www.iri.com/blog/data-protection/secure-then-splunk-a-format-preserving-encryption-and-pseduo...

0 Karma

dwaddle
SplunkTrust
SplunkTrust

Another, perhaps simpler, way of accomplishing this is by using SEDCMD. See http://docs.splunk.com/Documentation/Splunk/latest/Data/Anonymizedatawithsed

KarlGechlik
Explorer

Turns out it was a combination of JSapienza's answer and removing my header in props.conf:

props.conf:

EXTRACT- = .TraderID:(?.)

TRANSFORMS = hideacct-number

transforms.conf:

[hideacct-number]
DEST_KEY =_raw
REGEX=(.AcctCode=\d{5}-).
FORMAT=$1xxxxx

and apparently the DEST_KEY =_raw needs to be at the top of transforms.conf

0 Karma

gekoner
Communicator

Karl,
Can you provide some additional information? It is always helpful to understand what version you are running.

Also can explain in a little more detail what you are trying to do? Are you attempting to take an account number that is in the format ##### to replace the "numbers" with "xxxxx"?

0 Karma

JSapienza
Contributor

If I'm not mistaken, I think you need to set the DEST_KEY = _raw so the indexer knows to mask at index time from the raw event.

0 Karma

KarlGechlik
Explorer

This did not help. I added this to transforms.conf and it still does not modify the data in the field at all.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...