项目作者: oleewere

项目描述 :
Fluentd filter plugin for redact/anonymize text data
高级语言: Ruby
项目地址: git://github.com/oleewere/fluent-plugin-redaction.git
创建时间: 2020-01-26T15:44:02Z
项目社区:https://github.com/oleewere/fluent-plugin-redaction

开源协议:MIT License

下载


Redaction filter plugin for Fluentd

Build
License: MIT
Gem Version

Requirements

fluent-plugin-redaction fluentd ruby
>= 0.1.0 >= v0.14.0 >= 2.4

Overview

Redaction filter plugin that is used to redact/anonymize data in specific record fields.

Installation

Install from RubyGems:

  1. $ gem install fluent-plugin-redaction

Configuration

  1. <filter **>
  2. @type redaction
  3. <rule>
  4. key message
  5. value myemail@mail.com
  6. replace "****@mail.com"
  7. </rule>
  8. <rule>
  9. key message
  10. value mycardnumber
  11. </rule>
  12. <rule>
  13. key message
  14. pattern /my_regex_pattern/
  15. replace "[REDACTED]"
  16. </rule>
  17. </filter>

Configuration options

key

Specified field in a record. Replacement will happen against the value of the selected field.

value

Specific value that is searched in the value of the selected field. Replace matches with replace value.

pattern

Regular expression, on matches in the specified record field data will be replaced with the value of replace field.

replace

The replacement string on value/pattern matches. Default value: [REDACTED]

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request