data-prepper icon indicating copy to clipboard operation
data-prepper copied to clipboard

Adding 'single_word_only' option to obfuscate processor

Open Utkarsh-Aga opened this issue 1 year ago • 1 comments

Description

Adding single_word_only configuration option to obfuscate processor. When set to true a word boundary \b is added to the pattern, due to which obfuscation would be applied only to words that are standalone in the input text. By default, it is false, meaning obfuscation patterns are applied to all occurrences.

Issues Resolved

Resolves #4340

Check List

  • [X] New functionality includes testing.
  • [X] New functionality has a documentation issue. Please link to it in this PR.
    • [ ] New functionality has javadoc added
  • [X] Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Utkarsh-Aga avatar Apr 30 '24 07:04 Utkarsh-Aga

Thanks a lot @dlvenable for the review, I have addressed that comment also added a additional unit test testProcessorWithMultiplePatternsWithSingleWordOnly.

Utkarsh-Aga avatar Apr 30 '24 16:04 Utkarsh-Aga