Security

How to mask a bank detail from JSON logs

VijaySrrie
Builder

Hi,

We are ingesting some logs into splunk in JSON format, the logs are ingested via TA.

The value field in the below contains bank details which has to be masked.

 

PolicyDetails{}.Rules{}.ConditionsMatched.SensitiveInformation{}.SensitiveInformationDetections.DetectedValues{}.Value

Labels (4)
Tags (1)
0 Karma

Vardhan
Contributor

Hi @VijaySrrie ,

I have given a sample config below. You can try like that.

props.conf

[mentionsourcetype]
TRANSFORMS-acctmasking = mask-acctcode

Transforms.conf

[mask-acctcode]
REGEX = (.*DetectedValues{}.Value=\d+).*
DEST_KEY = _raw
FORMAT = $1-XXXX

Get Updates on the Splunk Community!

Index This | When is October more than just the tenth month?

October 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What’s New & Next in Splunk SOAR

 Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...