fluent-plugin-redaction 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e4231227b1e13f09203ea14b382bc7291a0deb1
4
- data.tar.gz: edfca6249b080274c4aa6b577938c75a38a4a5e6
3
+ metadata.gz: d93595968d8df40cf99e1563081e809377e07f53
4
+ data.tar.gz: 23382d169de9a4d53bbeaef730f52cf28eca837a
5
5
  SHA512:
6
- metadata.gz: 7e476f6f06ee54bbdb503176cd84963185042d5ef27b201bfae62ba8c66bae877b0555ebcd44c74a072f25498680a80e4caf35e45d0e5813757edbf229515132
7
- data.tar.gz: 23f7daf93b3887c49098914b10cbabf2a2f580968bd172d1517cd05427920dd19c14e963ce8a37907190c934bed012529e2e985240e57f266f2781174b3dd581
6
+ metadata.gz: 5cdbc265ed8cda989fddbc1a50fdbe77aac750f51c85e4bd9e1062c007d4eb2295f800edbfa5d6bb24297a9545ecf4fc4c834ed60f2e2c1adac873f2206de2f6
7
+ data.tar.gz: 142ddc35771741392442dc51e47cb9d816125aeb169fa101f9d58ceb68f8b8e480243e3b41847e47f65e6f5b18f673bf93e07ae6d9b93bf74c423bbec5c769d1
data/README.md CHANGED
@@ -13,6 +13,8 @@
13
13
 
14
14
  ## Overview
15
15
 
16
+ Redaction filter plugin that is used to redact/anonymize data in specific record fields.
17
+
16
18
  ## Installation
17
19
 
18
20
  Install from RubyGems:
@@ -22,6 +24,44 @@ $ gem install fluent-plugin-redaction
22
24
 
23
25
  ## Configuration
24
26
 
27
+ ```
28
+ <filter **>
29
+ @type redaction
30
+ <rule>
31
+ key message
32
+ value myemail@mail.com
33
+ replace ****@mail.com
34
+ </rule>
35
+ <rule>
36
+ key message
37
+ value mycardnumber
38
+ </rule>
39
+ <rule>
40
+ key message
41
+ pattern /my_regex_pattern/
42
+ replace [REDACTED]
43
+ </rule>
44
+ </filter>
45
+ ```
46
+
47
+ ### Configuration options
48
+
49
+ #### key
50
+
51
+ Specified field in a record. Replacement will happen against the value of the selected field.
52
+
53
+ #### value
54
+
55
+ Specific value that is searched in the value of the selected field. Replace matches with `replace` value.
56
+
57
+ #### pattern
58
+
59
+ Regular expression, on matches in the specified record field data will be replaced with the value of `replace` field.
60
+
61
+ #### replace
62
+
63
+ The replacement string on value/pattern matches. Default value: `[REDACTED]`
64
+
25
65
  ## Contributing
26
66
 
27
67
  1. Fork it
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -11,7 +11,7 @@ module Fluent
11
11
  config_param :key, :string, default: nil
12
12
  config_param :value, :string, default: nil
13
13
  config_param :pattern, :regexp, default: nil
14
- config_param :replacement, :string, default: "[REDACTED]"
14
+ config_param :replace, :string, default: "[REDACTED]"
15
15
  end
16
16
 
17
17
  def initialize
@@ -42,7 +42,7 @@ module Fluent
42
42
  if @pattern_rules_map.key?(c.key)
43
43
  list = @pattern_rules_map[c.key]
44
44
  end
45
- list << [c.value, c.pattern, c.replacement]
45
+ list << [c.value, c.pattern, c.replace]
46
46
  @pattern_rules_map[c.key] = list
47
47
  end
48
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-redaction
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Szabo