Getting Data In

How to build a regular expression in order to mask password text in props.conf?

caitcait
Explorer

I have the following string in the events and I would like to mask the password text using sedcmd.

Content={"Login":"stuff@stuff.com","Password":"thingsandstuff"}

Does anyone have any thoughts how to build the regex to do this?

Thank you

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try this

s/("Password":")([^"]+)"/\1XXX"/
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try this

s/("Password":")([^"]+)"/\1XXX"/
---
If this reply helps you, Karma would be appreciated.
0 Karma

caitcait
Explorer

works beautifully, thank you!

Get Updates on the Splunk Community!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...