kanmu / fluent-plugin-pan-anonymizer

A Fluent filter plugin to anonymize records which have PAN (Primary Account Number = Credit card number).
Other
10 stars 1 forks source link

Masking not working as intended #3

Open ku-s-h opened 5 years ago

ku-s-h commented 5 years ago
<filter logs.**>
  @type pan_anonymizer
  @id filter_logs_pan
  <pan>
    formats /([0-9]{6})[0-9]{3,9}([0-9]{4})/
  </pan>
</filter>

affects all logs lines, surrounding each character with the specified mask. For example: stdout is modified to ****s****t****d****o****u****t****

Using fluent version 1.2.5

hiroakis commented 5 years ago

@mightwork Hi, thank you for reporting an issue. I'll check that.

hiroakis commented 5 years ago

@mightwork I create a patch (https://github.com/kanmu/fluent-plugin-pan-anonymizer/pull/4) to fix the issue. The current status is in review.

hiroakis commented 5 years ago

@mightwork I'm sorry that I took so long time. The engineering team has kept discussing the issue. Could you change your config as follows? I believe it will work fine.

<filter logs.**>
  @type pan_anonymizer
  @id filter_logs_pan
  <pan>
    formats ["([0-9]{6})[0-9]{3,9}([0-9]{4})"]
  </pan>
</filter>