Splunk Field Hashing & Masking Capabilities for Compliance

The release of Splunk 9.x includes exciting new features that make it easier to mask, hash, and filter data on disk and in the UI. In practice, this means you can satisfy various internal and external compliance requirements using Splunk standard components. Examples of compliance mandates include GDPR, PCI, HIPAA and other general-purpose PII and PHI protection mandates. In the past, you had to rely on third-party data pipelines, tokenization software, or scheduled summary searches in Splunk to achieve the same outcome.

The features I’m referring to are ingest actions and role-based field filtering (preview), and we will describe both in this blog.

Ingest Actions

The ingest actions feature is a data pipeline that runs on the indexer, heavy forwarder, or in Splunk Cloud. It executes before the data is written to disk. You can mask, filter, and route the data to one or more destinations, including AWS S3 or another Splunk index.

In the example below, we have data from Office 365 OneDrive where the events show an employee opening a file. We would like to mask the employee ID accessing the file and send this redacted event to another index.

The ingest actions interactive GUI displays the changes applied to data as it moves through the pipeline.

The outcome is that for each event that comes in, an identical event where the UserId field has been masked irreversibly with “xxxxxx” is sent to the index “o365_redacted”.

The search interface shows duplicate events, one original and one redacted.

Once you have the redacted data in another index, it is easy to apply role-based access control to the unredacted data.

Pros

Cons

Role-Based Field Filtering

Role-based field filtering is applied to events at search time in the GUI only, as opposed to the data written to disk. This capability lets you limit access to confidential information for certain roles by redacting or obfuscating fields in events within searches without removing data from the backend.

Field filters retain the original event, but remove specific indexed or default fields from search results, or replace specific indexed or default field values at search time when those fields appear in the results.

Role-based field filtering is available in public preview for Splunk Enterprise 9.x and later, and by request for Splunk Cloud Platform customers. GUI support is not currently available to configure this feature, so you must modify limits.conf and authorize.conf to enable and configure it.

SPLUNK_HOME/etc/local/limits.conf
[search]
role_based_field_filtering = true

For example, to imitate what we did using Ingest Actions earlier, we can apply the following configuration to authorize.conf to filter data for a user role. The data format is JSON.

SPLUNK_HOME/etc/local/authorize.conf
[role_redacted]
fieldFilter-_raw = s/"UserId": "[^\"]*/"UserId": "xxxx/

As you can see, we are using a standard regex sed command to replace a field value with “xxxx”.

Screenshot from the redacted raw event for the user role where the role-based field filtering configuration is applied.

Screenshot from an admin role where the unredacted data is shown.

With role-based field filtering you can also apply hashing to indexed fields to perform analytics on the data–the UserId field in this case.

The additional configuration will look like this:

SPLUNK_HOME/etc/local/authorize.conf
[role_redacted]
fieldFilter-UserId = SHA256
fieldFilter-_raw = s/"UserId": "[^\"]*/"UserId": "xxxx/

The resulting search experience will display the redacted _raw field as “xxxx”, while the UserId field, which is an indexed field, will be replaced by the SHA256 hash value.

Screenshot from the redacted raw event and the SHA256 hash of the UserId field for the user role where the role-based field filtering configuration is applied.

Pros

Cons

Role-based field filtering is available in public preview for Splunk Enterprise 9.x and we are currently incorporating the customer feedback we are receiving during this preview.

Don’t just take it from me, try out these great new capabilities in Splunk Cloud Platform and Splunk Enterprise.

Happy Splunking!

Authors and Contributors: As always, security at Splunk is a family business. Credit to authors and collaborators: Johan Bjerke, Audra Streetman, Mikael Bjerkeland

Image source: “Log file where some text is replaced with xxxx, digital art” by DALL·E

Related Articles

Predicting Cyber Fraud Through Real-World Events: Insights from Domain Registration Trends
Security
12 Minute Read

Predicting Cyber Fraud Through Real-World Events: Insights from Domain Registration Trends

By analyzing new domain registrations around major real-world events, researchers show how fraud campaigns take shape early, helping defenders spot threats before scams surface.
When Your Fraud Detection Tool Doubles as a Wellness Check: The Unexpected Intersection of Security and HR
Security
4 Minute Read

When Your Fraud Detection Tool Doubles as a Wellness Check: The Unexpected Intersection of Security and HR

Behavioral analytics can spot fraud and burnout. With UEBA built into Splunk ES Premier, one data set helps security and HR reduce risk, retain talent, faster.
Splunk Security Content for Threat Detection & Response: November Recap
Security
1 Minute Read

Splunk Security Content for Threat Detection & Response: November Recap

Discover Splunk's November security content updates, featuring enhanced Castle RAT threat detection, UAC bypass analytics, and deeper insights for validating detections on research.splunk.com.
Security Staff Picks To Read This Month, Handpicked by Splunk Experts
Security
2 Minute Read

Security Staff Picks To Read This Month, Handpicked by Splunk Experts

Our Splunk security experts share their favorite reads of the month so you can follow the most interesting, news-worthy, and innovative stories coming from the wide world of cybersecurity.
Behind the Walls: Techniques and Tactics in Castle RAT Client Malware
Security
10 Minute Read

Behind the Walls: Techniques and Tactics in Castle RAT Client Malware

Uncover CastleRAT malware's techniques (TTPs) and learn how to build Splunk detections using MITRE ATT&CK. Protect your network from this advanced RAT.
AI for Humans: A Beginner’s Field Guide
Security
12 Minute Read

AI for Humans: A Beginner’s Field Guide

Unlock AI with the our beginner's field guide. Demystify LLMs, Generative AI, and Agentic AI, exploring their evolution and critical cybersecurity applications.
Splunk Security Content for Threat Detection & Response: November 2025 Update
Security
5 Minute Read

Splunk Security Content for Threat Detection & Response: November 2025 Update

Learn about the latest security content from Splunk.
Operation Defend the North: What High-Pressure Cyber Exercises Teach Us About Resilience and How OneCisco Elevates It
Security
3 Minute Read

Operation Defend the North: What High-Pressure Cyber Exercises Teach Us About Resilience and How OneCisco Elevates It

The OneCisco approach is not about any single platform or toolset; it's about fusing visibility, analytics, and automation into a shared source of operational truth so that teams can act decisively, even in the fog of crisis.
Data Fit for a Sovereign: How to Consider Sovereignty in Your Digital Resilience Strategy
Security
5 Minute Read

Data Fit for a Sovereign: How to Consider Sovereignty in Your Digital Resilience Strategy

Explore how digital sovereignty shapes resilient strategies for European organisations. Learn how to balance control, compliance, and agility in your data infrastructure with Cisco and Splunk’s flexible, secure solutions for the AI era.