Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance obfuscation rule to get dynamic replacement value. #1110

Open
sandipkokitkar opened this issue Jul 12, 2024 · 2 comments
Open

Enhance obfuscation rule to get dynamic replacement value. #1110

sandipkokitkar opened this issue Jul 12, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@sandipkokitkar
Copy link

Summary

The current obfuscation rule configuration allows for static string replacement. While this method is useful, it poses challenges for problem investigation due to the static nature of the obfuscated value. For instance, consider a rule to obfuscate account numbers.
{
regex: //regex for account number,
replacement: 'account_number'
}

This rule will replace each account number with the same placeholder "account_number," making it impossible to differentiate between account numbers, especially since a user can have multiple accounts.

Desired Behavior

Replacement value should be dynamic, based on the value being obfuscated.

Possible Solution

Allow a function to be used as a replacement instead of a string only, in obfuscation rule. The obfuscateString in obfuscate.js will check if the replacement is a function, and if so, it will call the function with the input string. The value returned from the function will then be used as the replacement.

The replacement function can perform various operations, such as hashing the value or masking the initial characters only, depending on the specific requirements.

Additional context

@sandipkokitkar sandipkokitkar added the enhancement New feature or request label Jul 12, 2024
@workato-integration
Copy link

@metal-messiah
Copy link
Member

FYI, This has now been elevated to our PM as a feature request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants