racecar 1.0.1 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/README.md +10 -0
- data/lib/racecar/cli.rb +6 -1
- data/lib/racecar/config.rb +10 -0
- data/lib/racecar/runner.rb +2 -0
- data/lib/racecar/version.rb +1 -1
- data/racecar.gemspec +2 -2
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d02ea2aa60d2c35df3d9b16571e1bc7552fc0125f7c17dce6c2599c322c0787
|
4
|
+
data.tar.gz: 207a860bbe56b1e20f29d0a9d37cef2e47fa21b9232224cdfe38449ca16ec7f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cc66fc91f13067bd7106f0d05af602e198f9c3bbb52943a0582fee255ff0bb7521b5c120ed3e519a46744475b41ed4979bb1a070255faec7ef00ef414e36f3b
|
7
|
+
data.tar.gz: 3b931445476dd4f0cf1900b22c43cc912fae377942d1b5ee6c0f81e3b7cc9b148e3e828a0004171ce46c0c161e4f5754bdb6e00391bd1fbf824f0489643c0b56
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,24 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## racecar v1.2.1
|
6
|
+
|
7
|
+
* Require king_konf v1.0 or higher.
|
8
|
+
|
9
|
+
## racecar v1.2.0
|
10
|
+
|
11
|
+
* Support for `ssl_client_cert_key_password` (#173).
|
12
|
+
* Support for `OAUTHBEARER` authentication (`sasl_oauth_token_provider`) (#178).
|
13
|
+
|
14
|
+
## racecar v1.1.0
|
15
|
+
|
16
|
+
* Require ruby-kafka v1.0 or higher.
|
17
|
+
* Add error handling for required libraries (#149).
|
18
|
+
|
19
|
+
## racecar v1.0.1
|
20
|
+
|
21
|
+
* Add `--without-rails` option to boot consumer without Rails (#139).
|
22
|
+
|
5
23
|
## racecar v1.0.0
|
6
24
|
|
7
25
|
Unchanged from v0.5.0.
|
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/cli.rb
CHANGED
@@ -102,7 +102,12 @@ module Racecar
|
|
102
102
|
opts.on("-r", "--require STRING", "Require a library before starting the consumer") do |lib|
|
103
103
|
$LOAD_PATH.unshift(Dir.pwd) unless load_path_modified
|
104
104
|
load_path_modified = true
|
105
|
-
|
105
|
+
begin
|
106
|
+
require lib
|
107
|
+
rescue => e
|
108
|
+
$stderr.puts "=> #{lib} failed to load: #{e.message}"
|
109
|
+
exit
|
110
|
+
end
|
106
111
|
end
|
107
112
|
|
108
113
|
opts.on("-l", "--log STRING", "Log to the specified file") do |logfile|
|
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
data/racecar.gemspec
CHANGED
@@ -20,8 +20,8 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_runtime_dependency "king_konf", "~> 0
|
24
|
-
spec.add_runtime_dependency "ruby-kafka", "~> 0
|
23
|
+
spec.add_runtime_dependency "king_konf", "~> 1.0"
|
24
|
+
spec.add_runtime_dependency "ruby-kafka", "~> 1.0"
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", [">= 1.13", "< 3"]
|
27
27
|
spec.add_development_dependency "rake", "~> 10.0"
|
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.1
|
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:
|
12
|
+
date: 2021-04-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: king_konf
|
@@ -17,28 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0
|
20
|
+
version: '1.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0
|
27
|
+
version: '1.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: ruby-kafka
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0
|
34
|
+
version: '1.0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0
|
41
|
+
version: '1.0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: bundler
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -145,8 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
|
-
|
149
|
-
rubygems_version: 2.7.6
|
148
|
+
rubygems_version: 3.1.2
|
150
149
|
signing_key:
|
151
150
|
specification_version: 4
|
152
151
|
summary: A framework for running Kafka consumers
|