Getting Data In

How to mask the verificaition code using props and transforms

abhi04
Communicator

How can I mask the verfiication code using props/transforms?

{"body": " Verification Code: 123456",

 

I want to mask the code using props and transforms using below format, not sure how the search spl regex is different than regex in transforms

props.conf

[source::abc]
TRANSFORMS-anonymize = abc-anonymizer

transforms.conf
[abc-anonymizer]
DEST_KEY = _raw
REGEX = 
FORMAT = $1######$2

 

 

 

 

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Why use both props AND transforms when you can do it with just props?

[source::abc]
SEDCMD-anonymizer = s/Verification Code: \d+"/Verification Code: ######/g
---
If this reply helps you, Karma would be appreciated.

View solution in original post

abhi04
Communicator

Thanks @richgalloway  and @gcusello 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @abhi04 ,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated by all the contributors 😉

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @abhi04 ,

I usually use the solution with SEDCMD hinted by @richgalloway .

Anyway, also the solution with props amd transforms should run:

props.conf

[source::abc]
TRANSFORMS-anonymize = abc-anonymizer

transforms.conf
[abc-anonymizer]
DEST_KEY = _raw
REGEX = Verification Code:\d+ 
FORMAT = Verification Code:######

Ciao.

Giuseppe

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Why use both props AND transforms when you can do it with just props?

[source::abc]
SEDCMD-anonymizer = s/Verification Code: \d+"/Verification Code: ######/g
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...