Feature Request: Support for Custom Salt String / Custom Hashing Logic in Data Anonymization
Which connector?:
Snowflake
Additional details:
User Story
As a data engineer, I want the ability to configure a custom salt string (or define a custom hashing function) for data anonymization so that we can maintain flexible, secure, and standardized hashing protocols across our pipelines.
Current Behavior
The standard anonymization function relies on a hardcoded prefix/salt inside the SQL definition:
CREATE FUNCTION ANONYMIZE(DATA VARCHAR)
RETURNS VARCHAR
AS
$$
IFF(DATA = '' OR MNG.HASH_IS_SHA256(DATA), DATA , SHA2('personal_' || LOWER(TRIM(DATA))))
$$;
Proposed Solution / Enhancements
-
Option A (Preferred): Dynamic Salt Parameter
Allow passing an optional custom salt parameter or configuring an environment-level salt variable rather than forcing a hardcoded prefix. -
Option B: Custom Hashing Function Support
Provide a hook or setting to register a custom masking function directly within the service configuration.
Business Value & Motivation
- Enhanced Security: Enables periodic salt rotation without modifying core function definitions.
- Compliance & Data Masking: Aligns with downstream privacy requirements that necessitate unique or non-standard salting methods before data post-processing.
- Flexibility: Prevents duplicate custom masking steps after data extraction.
Acceptance Criteria
- Users can specify a custom salt string during function calls or via config.
- Existing default salting behavior (
'personal_') remains backward-compatible if no custom salt is supplied. - Verification that hashed outputs correctly reflect the dynamic salt value.
Please sign in to leave a comment.
Comments
0 comments