racecar 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +10 -0
- data/lib/racecar/config.rb +10 -0
- data/lib/racecar/runner.rb +2 -0
- data/lib/racecar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28a2c032c29aeba007b00c13eb0bfec94b2d32bf6a6076235b801c4eee28a6b1
|
4
|
+
data.tar.gz: b2f63c4a91f2a9ecfa26d7f4ac1902dc865221a8d0ed203a13dfb59c04dc35f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eabaf84b44a70f65ea8fda8ff9e9721f39d342b65c66995b580bfc99d5977d8d675100e01428c0c64b4342d3165e52951b4a08b11cdcd54c6cb93601fca9abf0
|
7
|
+
data.tar.gz: 7155e003d823e1cfbdb80b374b8f6b14169c65c3dfaeb9eda734d72cca373a5bc9662616616cf4ee12f3002801c0cbfd0664758a8406fd410867e5aca5f45659
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -294,6 +294,7 @@ The memory usage limit is roughly estimated as `max_bytes * max_fetch_queue_size
|
|
294
294
|
* `ssl_ca_cert_file_path` - The path to a valid SSL certificate authority file.
|
295
295
|
* `ssl_client_cert` – A valid SSL client certificate, as a string.
|
296
296
|
* `ssl_client_cert_key` – A valid SSL client certificate key, as a string.
|
297
|
+
* `ssl_client_cert_key_password` – The password for the client cert key, as a string (optional).
|
297
298
|
|
298
299
|
#### SASL encryption, authentication & authorization
|
299
300
|
|
@@ -316,6 +317,15 @@ If using SCRAM:
|
|
316
317
|
* `sasl_scram_password` – The password used to authenticate.
|
317
318
|
* `sasl_scram_mechanism` – The SCRAM mechanism to use, either `sha256` or `sha512`.
|
318
319
|
|
320
|
+
If using OAUTHBEARER:
|
321
|
+
|
322
|
+
* `sasl_oauth_token_provider`- In order to authenticate using OAUTHBEARER, you must set the client with an instance of a class that implements a token method (the interface is described in Kafka::Sasl::OAuth) which returns an ID/Access token.
|
323
|
+
This mechanism is supported in kafka >= 2.0.0 as of KIP-255.
|
324
|
+
|
325
|
+
See more at [here](https://github.com/zendesk/ruby-kafka/tree/master#oauthbearer).
|
326
|
+
|
327
|
+
NOTE: `sasl_oauth_token_provider` only works using the `config/racecar.rb` configuration file.
|
328
|
+
|
319
329
|
#### Producing messages
|
320
330
|
|
321
331
|
These settings are related to consumers that _produce messages to Kafka_.
|
data/lib/racecar/config.rb
CHANGED
@@ -73,6 +73,9 @@ module Racecar
|
|
73
73
|
desc "A valid SSL client certificate key"
|
74
74
|
string :ssl_client_cert_key
|
75
75
|
|
76
|
+
desc "The password for the SSL client certificate key"
|
77
|
+
string :ssl_client_cert_key_password
|
78
|
+
|
76
79
|
desc "Support for using the CA certs installed on your system by default for SSL. More info, see: https://github.com/zendesk/ruby-kafka/pull/521"
|
77
80
|
boolean :ssl_ca_certs_from_system, default: false
|
78
81
|
|
@@ -138,6 +141,9 @@ module Racecar
|
|
138
141
|
|
139
142
|
attr_accessor :subscriptions, :logger
|
140
143
|
|
144
|
+
# The OAUTHBEARER token provider class.
|
145
|
+
attr_accessor :sasl_oauth_token_provider
|
146
|
+
|
141
147
|
def initialize(env: ENV)
|
142
148
|
super(env: env)
|
143
149
|
@error_handler = proc {}
|
@@ -168,6 +174,10 @@ module Racecar
|
|
168
174
|
if max_pause_timeout && !pause_with_exponential_backoff?
|
169
175
|
raise ConfigError, "`max_pause_timeout` only makes sense when `pause_with_exponential_backoff` is enabled"
|
170
176
|
end
|
177
|
+
|
178
|
+
if ssl_client_cert_key_password && !ssl_client_cert_key
|
179
|
+
raise ConfigError, "`ssl_client_cert_key_password` must be used in conjunction with `ssl_client_cert_key`"
|
180
|
+
end
|
171
181
|
end
|
172
182
|
|
173
183
|
def load_consumer_class(consumer_class)
|
data/lib/racecar/runner.rb
CHANGED
@@ -27,11 +27,13 @@ module Racecar
|
|
27
27
|
ssl_ca_cert_file_path: config.ssl_ca_cert_file_path,
|
28
28
|
ssl_client_cert: config.ssl_client_cert,
|
29
29
|
ssl_client_cert_key: config.ssl_client_cert_key,
|
30
|
+
ssl_client_cert_key_password: config.ssl_client_cert_key_password,
|
30
31
|
sasl_plain_username: config.sasl_plain_username,
|
31
32
|
sasl_plain_password: config.sasl_plain_password,
|
32
33
|
sasl_scram_username: config.sasl_scram_username,
|
33
34
|
sasl_scram_password: config.sasl_scram_password,
|
34
35
|
sasl_scram_mechanism: config.sasl_scram_mechanism,
|
36
|
+
sasl_oauth_token_provider: config.sasl_oauth_token_provider,
|
35
37
|
sasl_over_ssl: config.sasl_over_ssl,
|
36
38
|
ssl_ca_certs_from_system: config.ssl_ca_certs_from_system,
|
37
39
|
ssl_verify_hostname: config.ssl_verify_hostname
|
data/lib/racecar/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: racecar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Schierbeck
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-08-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: king_konf
|