logstash-codec-avro_schema_registry 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/README.md +21 -3
  4. data/lib/logstash/codecs/avro_schema_registry.rb +29 -4
  5. data/logstash-codec-avro_schema_registry.gemspec +2 -2
  6. metadata +5 -54
  7. data/vendor/cache/avro-1.8.2.gem +0 -0
  8. data/vendor/cache/chronic_duration-0.10.6.gem +0 -0
  9. data/vendor/cache/clamp-0.6.5.gem +0 -0
  10. data/vendor/cache/coderay-1.1.1.gem +0 -0
  11. data/vendor/cache/concurrent-ruby-1.0.0-java.gem +0 -0
  12. data/vendor/cache/diff-lcs-1.3.gem +0 -0
  13. data/vendor/cache/ffi-1.9.18-java.gem +0 -0
  14. data/vendor/cache/filesize-0.0.4.gem +0 -0
  15. data/vendor/cache/fivemat-1.3.5.gem +0 -0
  16. data/vendor/cache/gem_publisher-1.5.0.gem +0 -0
  17. data/vendor/cache/gems-0.8.3.gem +0 -0
  18. data/vendor/cache/i18n-0.6.9.gem +0 -0
  19. data/vendor/cache/insist-1.0.0.gem +0 -0
  20. data/vendor/cache/jar-dependencies-0.3.11.gem +0 -0
  21. data/vendor/cache/jrjackson-0.4.2-java.gem +0 -0
  22. data/vendor/cache/jrmonitor-0.4.2.gem +0 -0
  23. data/vendor/cache/jruby-openssl-0.9.16-java.gem +0 -0
  24. data/vendor/cache/kramdown-1.14.0.gem +0 -0
  25. data/vendor/cache/logstash-codec-line-3.0.3.gem +0 -0
  26. data/vendor/cache/logstash-core-5.4.0-java.gem +0 -0
  27. data/vendor/cache/logstash-core-plugin-api-2.1.24-java.gem +0 -0
  28. data/vendor/cache/logstash-devutils-1.3.3-java.gem +0 -0
  29. data/vendor/cache/method_source-0.8.2.gem +0 -0
  30. data/vendor/cache/minitar-0.5.4.gem +0 -0
  31. data/vendor/cache/multi_json-1.12.1.gem +0 -0
  32. data/vendor/cache/numerizer-0.1.1.gem +0 -0
  33. data/vendor/cache/polyglot-0.3.5.gem +0 -0
  34. data/vendor/cache/pry-0.10.4-java.gem +0 -0
  35. data/vendor/cache/puma-2.16.0-java.gem +0 -0
  36. data/vendor/cache/rack-1.6.8.gem +0 -0
  37. data/vendor/cache/rack-protection-1.5.3.gem +0 -0
  38. data/vendor/cache/rake-12.0.0.gem +0 -0
  39. data/vendor/cache/rspec-3.6.0.gem +0 -0
  40. data/vendor/cache/rspec-core-3.6.0.gem +0 -0
  41. data/vendor/cache/rspec-expectations-3.6.0.gem +0 -0
  42. data/vendor/cache/rspec-mocks-3.6.0.gem +0 -0
  43. data/vendor/cache/rspec-support-3.6.0.gem +0 -0
  44. data/vendor/cache/rspec-wait-0.0.9.gem +0 -0
  45. data/vendor/cache/ruby-maven-3.3.12.gem +0 -0
  46. data/vendor/cache/ruby-maven-libs-3.3.9.gem +0 -0
  47. data/vendor/cache/rubyzip-1.1.7.gem +0 -0
  48. data/vendor/cache/schema_registry-0.0.4.gem +0 -0
  49. data/vendor/cache/sinatra-1.4.8.gem +0 -0
  50. data/vendor/cache/slop-3.6.0.gem +0 -0
  51. data/vendor/cache/spoon-0.0.6.gem +0 -0
  52. data/vendor/cache/stud-0.0.22.gem +0 -0
  53. data/vendor/cache/thread_safe-0.3.6-java.gem +0 -0
  54. data/vendor/cache/tilt-2.0.7.gem +0 -0
  55. data/vendor/cache/treetop-1.4.15.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b52cb641d3dcc1ab0e81aac04e073a609cf55e4
4
- data.tar.gz: 26d12ac1f854fb677f7f8ecb23da35967e88a3b5
3
+ metadata.gz: 96fba808f06019f95c4e7795b896f3d1cb583f02
4
+ data.tar.gz: d4dcf8c54b94c97bb591c26b6d07cc895063c5ef
5
5
  SHA512:
6
- metadata.gz: 3307ec8a0891959b5f1e9f6860463de2b108b70f9f0a9103106bfc58e8e81b8fc7fd0a463524c88f19e684e28cf209dc9a1f3c833218be252beb8c4dc7ae3a9a
7
- data.tar.gz: d49ca291bc9b1e4ff75d3bbcd9feec6657d22cdd596e4523d409acda8c6b0d5af7d44736aa13f5f8c08fbfc539ea9b34c5a5e2f1df8dd33014f19f03856283ad
6
+ metadata.gz: 942512a18cd5811e85621d71b7adf4a3734b1334e26ae4f8501c8a96028c57712674498c81de6ee5fcbae201c6d69a868526a643ddcf911d858e94be7f10ba3a
7
+ data.tar.gz: d1f85086d6d0ff6e23c8306164add731bae9ae4a2cfded29c5698a11dab6c24899c3fc19ee0613e648f9ce95c3bb64958261c4b1e292e8693a1de7683975aa13
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 1.1.0
2
+ - Add support for client side TLS auth to schema registry
3
+
1
4
  ## 1.0.0
2
5
  - Add encode capability
3
6
  - Try base64 decode/encode on input/output
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Logstash Codec - Avro Schema Registry
2
2
 
3
+ ### v1.1.0
4
+
3
5
  This plugin is used to serialize Logstash events as
4
6
  Avro datums, as well as deserializing Avro datums into
5
7
  Logstash events.
@@ -8,6 +10,12 @@ Decode/encode Avro records as Logstash events using the
8
10
  associated Avro schema from a Confluent schema registry.
9
11
  (https://github.com/confluentinc/schema-registry)
10
12
 
13
+ ## Installation
14
+
15
+ ```
16
+ logstash-plugin install logstash-codec-avro_schema_registry
17
+ ```
18
+
11
19
  ## Decoding (input)
12
20
 
13
21
  When this codec is used to decode the input, you may pass the following options:
@@ -36,6 +44,12 @@ When this codec is used to encode, you may pass the following options:
36
44
  - ``register_schema`` - will register the JSON schema if it does not exist.
37
45
  - ``binary_encoded`` - will output the encoded event as a ByteArray.
38
46
  Requires the ``ByteArraySerializer`` to be set in the Kafka output config.
47
+ - ``client_certificate`` - Client TLS certificate for mutual TLS
48
+ - ``client_key`` - Client TLS key for mutual TLS
49
+ - ``ca_certificate`` - CA Certificate
50
+ - ``verify_mode`` - SSL Verify modes. Valid options are `verify_none`, `verify_peer`, `verify_client_once` , and `verify_fail_if_no_peer_cert`. Default is `verify_peer`
51
+
52
+
39
53
 
40
54
  ## Usage
41
55
 
@@ -63,11 +77,12 @@ output {
63
77
  schema_uri => "/app/my_kafka_subject.avsc"
64
78
  register_schema => true
65
79
  }
80
+ value_serializer => "org.apache.kafka.common.serialization.ByteArraySerializer"
66
81
  }
67
82
  }
68
83
  ```
69
84
 
70
- ### Binary encoded Kafka output
85
+ ### Using signed certificate for registry authentication
71
86
 
72
87
  ```
73
88
  output {
@@ -76,9 +91,12 @@ output {
76
91
  codec => avro_schema_registry {
77
92
  endpoint => "http://schemas.example.com"
78
93
  schema_id => 47
79
- binary_encoded => true
94
+ client_key => "./client.key"
95
+ client_certificate => "./client.crt"
96
+ ca_certificate => "./ca.pem"
97
+ verify_mode => "verify_peer"
80
98
  }
81
99
  value_serializer => "org.apache.kafka.common.serialization.ByteArraySerializer"
82
100
  }
83
101
  }
84
- ```
102
+ ```
@@ -51,6 +51,11 @@ MAGIC_BYTE = 0
51
51
  # - ``register_schema`` - will register the JSON schema if it does not exist.
52
52
  # - ``binary_encoded`` - will output the encoded event as a ByteArray.
53
53
  # Requires the ``ByteArraySerializer`` to be set in the Kafka output config.
54
+ # - ``client_certificate`` - Client TLS certificate for mutual TLS
55
+ # - ``client_key`` - Client TLS key for mutual TLS
56
+ # - ``ca_certificate`` - CA Certificate
57
+ # - ``verify_mode`` - SSL Verify modes. Valid options are `verify_none`, `verify_peer`, `verify_client_once`,
58
+ # and `verify_fail_if_no_peer_cert`. Default is `verify_peer`
54
59
  #
55
60
  # ==== Usage
56
61
  # Example usage with Kafka input and output.
@@ -78,11 +83,12 @@ MAGIC_BYTE = 0
78
83
  # schema_uri => "/app/my_kafka_subject.avsc"
79
84
  # register_schema => true
80
85
  # }
86
+ # value_serializer => "org.apache.kafka.common.serialization.ByteArraySerializer"
81
87
  # }
82
88
  # }
83
89
  # ----------------------------------
84
90
  #
85
- # Binary encoded Kafka output
91
+ # Using signed certificate for registry authentication
86
92
  #
87
93
  # [source,ruby]
88
94
  # ----------------------------------
@@ -92,7 +98,10 @@ MAGIC_BYTE = 0
92
98
  # codec => avro_schema_registry {
93
99
  # endpoint => "http://schemas.example.com"
94
100
  # schema_id => 47
95
- # binary_encoded => true
101
+ # client_key => "./client.key"
102
+ # client_certificate => "./client.crt"
103
+ # ca_certificate => "./ca.pem"
104
+ # verify_mode => "verify_peer"
96
105
  # }
97
106
  # value_serializer => "org.apache.kafka.common.serialization.ByteArraySerializer"
98
107
  # }
@@ -116,11 +125,27 @@ class LogStash::Codecs::AvroSchemaRegistry < LogStash::Codecs::Base
116
125
  config :schema_string, :validate => :string, :default => nil
117
126
  config :check_compatibility, :validate => :boolean, :default => false
118
127
  config :register_schema, :validate => :boolean, :default => false
119
- config :binary_encoded, :validate => :boolean, :default => false
128
+ config :binary_encoded, :validate => :boolean, :default => true
120
129
 
130
+ config :client_certificate, :validate => :string, :default => nil
131
+ config :client_key, :validate => :string, :default => nil
132
+ config :ca_certificate, :validate => :string, :default => nil
133
+ config :verify_mode, :validate => :string, :default => 'verify_peer'
134
+
121
135
  public
122
136
  def register
123
- @client = SchemaRegistry::Client.new(endpoint, username, password)
137
+
138
+ @client = if client_certificate != nil
139
+ SchemaRegistry::Client.new(endpoint, username, password, SchemaRegistry::Client.connection_options(
140
+ client_certificate: client_certificate,
141
+ client_key: client_key,
142
+ ca_certificate: ca_certificate,
143
+ verify_mode: verify_mode
144
+ ))
145
+ else
146
+ SchemaRegistry::Client.new(endpoint, username, password)
147
+ end
148
+
124
149
  @schemas = Hash.new
125
150
  @write_schema_id = nil
126
151
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-codec-avro_schema_registry'
3
- s.version = '1.0.0'
3
+ s.version = '1.1.0'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "Encode and decode avro formatted data from a Confluent schema registry"
6
6
  s.description = "Encode and decode avro formatted data from a Confluent schema registry"
@@ -21,6 +21,6 @@ Gem::Specification.new do |s|
21
21
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
22
22
  s.add_runtime_dependency "logstash-codec-line"
23
23
  s.add_runtime_dependency "avro" #(Apache 2.0 license)
24
- s.add_runtime_dependency "schema_registry" #(MIT license)
24
+ s.add_runtime_dependency "schema_registry", ">= 0.1.0" #(MIT license)
25
25
  s.add_development_dependency "logstash-devutils"
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-avro_schema_registry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - RevPoint Media
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-25 00:00:00.000000000 Z
11
+ date: 2018-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -63,7 +63,7 @@ dependencies:
63
63
  requirements:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: '0'
66
+ version: 0.1.0
67
67
  name: schema_registry
68
68
  prerelease: false
69
69
  type: :runtime
@@ -71,7 +71,7 @@ dependencies:
71
71
  requirements:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: '0'
74
+ version: 0.1.0
75
75
  - !ruby/object:Gem::Dependency
76
76
  requirement: !ruby/object:Gem::Requirement
77
77
  requirements:
@@ -101,55 +101,6 @@ files:
101
101
  - lib/logstash/codecs/avro_schema_registry.rb
102
102
  - logstash-codec-avro_schema_registry.gemspec
103
103
  - spec/codecs/avro_schema_registry_spec.rb
104
- - vendor/cache/avro-1.8.2.gem
105
- - vendor/cache/chronic_duration-0.10.6.gem
106
- - vendor/cache/clamp-0.6.5.gem
107
- - vendor/cache/coderay-1.1.1.gem
108
- - vendor/cache/concurrent-ruby-1.0.0-java.gem
109
- - vendor/cache/diff-lcs-1.3.gem
110
- - vendor/cache/ffi-1.9.18-java.gem
111
- - vendor/cache/filesize-0.0.4.gem
112
- - vendor/cache/fivemat-1.3.5.gem
113
- - vendor/cache/gem_publisher-1.5.0.gem
114
- - vendor/cache/gems-0.8.3.gem
115
- - vendor/cache/i18n-0.6.9.gem
116
- - vendor/cache/insist-1.0.0.gem
117
- - vendor/cache/jar-dependencies-0.3.11.gem
118
- - vendor/cache/jrjackson-0.4.2-java.gem
119
- - vendor/cache/jrmonitor-0.4.2.gem
120
- - vendor/cache/jruby-openssl-0.9.16-java.gem
121
- - vendor/cache/kramdown-1.14.0.gem
122
- - vendor/cache/logstash-codec-line-3.0.3.gem
123
- - vendor/cache/logstash-core-5.4.0-java.gem
124
- - vendor/cache/logstash-core-plugin-api-2.1.24-java.gem
125
- - vendor/cache/logstash-devutils-1.3.3-java.gem
126
- - vendor/cache/method_source-0.8.2.gem
127
- - vendor/cache/minitar-0.5.4.gem
128
- - vendor/cache/multi_json-1.12.1.gem
129
- - vendor/cache/numerizer-0.1.1.gem
130
- - vendor/cache/polyglot-0.3.5.gem
131
- - vendor/cache/pry-0.10.4-java.gem
132
- - vendor/cache/puma-2.16.0-java.gem
133
- - vendor/cache/rack-1.6.8.gem
134
- - vendor/cache/rack-protection-1.5.3.gem
135
- - vendor/cache/rake-12.0.0.gem
136
- - vendor/cache/rspec-3.6.0.gem
137
- - vendor/cache/rspec-core-3.6.0.gem
138
- - vendor/cache/rspec-expectations-3.6.0.gem
139
- - vendor/cache/rspec-mocks-3.6.0.gem
140
- - vendor/cache/rspec-support-3.6.0.gem
141
- - vendor/cache/rspec-wait-0.0.9.gem
142
- - vendor/cache/ruby-maven-3.3.12.gem
143
- - vendor/cache/ruby-maven-libs-3.3.9.gem
144
- - vendor/cache/rubyzip-1.1.7.gem
145
- - vendor/cache/schema_registry-0.0.4.gem
146
- - vendor/cache/sinatra-1.4.8.gem
147
- - vendor/cache/slop-3.6.0.gem
148
- - vendor/cache/spoon-0.0.6.gem
149
- - vendor/cache/stud-0.0.22.gem
150
- - vendor/cache/thread_safe-0.3.6-java.gem
151
- - vendor/cache/tilt-2.0.7.gem
152
- - vendor/cache/treetop-1.4.15.gem
153
104
  homepage: https://github.com/revpoint/logstash-codec-avro_schema_registry
154
105
  licenses:
155
106
  - Apache License (2.0)
@@ -172,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
123
  version: '0'
173
124
  requirements: []
174
125
  rubyforge_project:
175
- rubygems_version: 2.4.8
126
+ rubygems_version: 2.6.14.1
176
127
  signing_key:
177
128
  specification_version: 4
178
129
  summary: Encode and decode avro formatted data from a Confluent schema registry
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file