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!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...