Splunk Search

Anonymize certain fields during search time field extraction per role

yuwtennis
Communicator

Hi!

I would like to know the best way to anonymize certain fields per role base in search time field extraction.

For example,

If I prepare

userA - roleA
userB - roleB

and raw data ,

a,b,c
1,2,3

i want to make userA see
a,b,c
1,2,3

but userB not see field b
a,b,c
1,0,3

I believe usually this can be implemented in index-time by creating extra index which has field b masked as 0.
But what would be the best way to implement in search time?

Thanks,
Yu

Tags (2)
1 Solution

sciurus
Path Finder

Security is applied at the index layer, any attempts to impose security at search time will ultimately fail if someone is determined. If the data must be hidden, then it must be done at the index level.

Having said that though, if you still want to do it at search time then I would guess you make a pre-defined search or dashboard that extracts a set of fields they're "allowed" to see, and hope they don't fiddle with it or find a way to access _raw.

View solution in original post

sciurus
Path Finder

Security is applied at the index layer, any attempts to impose security at search time will ultimately fail if someone is determined. If the data must be hidden, then it must be done at the index level.

Having said that though, if you still want to do it at search time then I would guess you make a pre-defined search or dashboard that extracts a set of fields they're "allowed" to see, and hope they don't fiddle with it or find a way to access _raw.

yuwtennis
Communicator

Hello sciurus.

Thank you for the comment.

I decided to do it in the index level.

Thanks,
Yu

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...