logstash-integration-kafka 12.0.4-java → 12.0.5-java
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9aabb58fee374e97f9acb560f65340e1bd06303a60e39a010113980099dc51e8
|
|
4
|
+
data.tar.gz: be2acb673a6a9d463d709814bbf93fabc4089dc9d5f96aa4266cd3a18c0208cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 95bd3afc976010cc01bd4ac9e8d6844631f28cadbf5f45121c968bc9d3abd8475dbc7c78f99cda20b16349f84404a88a9fc121f7513bf8fa7baa37988b2d74c0
|
|
7
|
+
data.tar.gz: 75cc2e4b39d89303dd5b4927c5f8ea1008902f30e79bf8dcc9ac20d774d43020b705237d1c1510cd3eb949fc8832b601c51b08e21edd7b7ce3022262154083c0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
## 12.0.5
|
|
2
|
+
- Redact `sasl_jaas_config` to prevent credentials from appearing in debug logs. [#232](https://github.com/logstash-plugins/logstash-integration-kafka/pull/232)
|
|
3
|
+
|
|
1
4
|
## 12.0.4
|
|
2
5
|
- Re-packaging the plugin [#221](https://github.com/logstash-plugins/logstash-integration-kafka/pull/221)
|
|
3
6
|
|
|
@@ -260,7 +260,7 @@ class LogStash::Inputs::Kafka < LogStash::Inputs::Base
|
|
|
260
260
|
# different JVM instances.
|
|
261
261
|
config :jaas_path, :validate => :path
|
|
262
262
|
# JAAS configuration settings. This allows JAAS config to be a part of the plugin configuration and allows for different JAAS configuration per each plugin config.
|
|
263
|
-
config :sasl_jaas_config, :validate => :
|
|
263
|
+
config :sasl_jaas_config, :validate => :password
|
|
264
264
|
# Optional path to kerberos config file. This is krb5.conf style as detailed in https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html
|
|
265
265
|
config :kerberos_config, :validate => :path
|
|
266
266
|
# Option to add Kafka metadata like topic, message size and header key values to the event.
|
|
@@ -40,7 +40,7 @@ module LogStash module PluginMixins module Kafka
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
props.put("sasl.kerberos.service.name", sasl_kerberos_service_name) unless sasl_kerberos_service_name.nil?
|
|
43
|
-
props.put("sasl.jaas.config", sasl_jaas_config) unless sasl_jaas_config.nil?
|
|
43
|
+
props.put("sasl.jaas.config", sasl_jaas_config.value) unless sasl_jaas_config.nil?
|
|
44
44
|
props.put("sasl.client.callback.handler.class", sasl_client_callback_handler_class) unless sasl_client_callback_handler_class.nil?
|
|
45
45
|
props.put("sasl.oauthbearer.token.endpoint.url", sasl_oauthbearer_token_endpoint_url) unless sasl_oauthbearer_token_endpoint_url.nil?
|
|
46
46
|
props.put("sasl.oauthbearer.scope.claim.name", sasl_oauthbearer_scope_claim_name) unless sasl_oauthbearer_scope_claim_name.nil?
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'logstash-integration-kafka'
|
|
3
|
-
s.version = '12.0.
|
|
3
|
+
s.version = '12.0.5'
|
|
4
4
|
s.licenses = ['Apache-2.0']
|
|
5
5
|
s.summary = "Integration with Kafka - input and output plugins"
|
|
6
6
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline "+
|
|
@@ -264,6 +264,53 @@ describe "inputs/kafka", :integration => true do
|
|
|
264
264
|
end
|
|
265
265
|
end
|
|
266
266
|
|
|
267
|
+
# ToDo: add tests for other sasl config options as well (https://github.com/logstash-plugins/logstash-integration-kafka/issues/234)
|
|
268
|
+
context 'setting sasl_jaas_config' do
|
|
269
|
+
let(:base_config) do
|
|
270
|
+
{
|
|
271
|
+
'topics' => ['logstash_integration_topic_plain'],
|
|
272
|
+
'group_id' => rand(36**8).to_s(36),
|
|
273
|
+
}
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
shared_examples 'sasl_jaas_config password handling' do
|
|
277
|
+
it 'stores sasl_jaas_config as password type' do
|
|
278
|
+
kafka_input = LogStash::Inputs::Kafka.new(consumer_config)
|
|
279
|
+
expect(kafka_input.sasl_jaas_config).to be_a(LogStash::Util::Password)
|
|
280
|
+
expect(kafka_input.sasl_jaas_config.value).to eq(jaas_config_value)
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
it 'does not expose password in inspect output' do
|
|
284
|
+
kafka_input = LogStash::Inputs::Kafka.new(consumer_config)
|
|
285
|
+
expect(kafka_input.sasl_jaas_config.inspect).to eq('<password>')
|
|
286
|
+
expect(kafka_input.sasl_jaas_config.inspect).not_to include('admin-secret')
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
context 'with single-line config' do
|
|
291
|
+
let(:jaas_config_value) { 'org.apache.kafka.common.security.plain.PlainLoginModule required username="admin" password="admin-secret";' }
|
|
292
|
+
let(:consumer_config) { base_config.merge('sasl_jaas_config' => jaas_config_value) }
|
|
293
|
+
|
|
294
|
+
include_examples 'sasl_jaas_config password handling'
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
context 'with multiline config' do
|
|
298
|
+
let(:jaas_config_value) do
|
|
299
|
+
<<~JAAS
|
|
300
|
+
org.apache.kafka.common.security.plain.PlainLoginModule required
|
|
301
|
+
username="admin"
|
|
302
|
+
password="admin-secret"
|
|
303
|
+
user_admin="admin-secret"
|
|
304
|
+
user_alice="alice-secret";
|
|
305
|
+
JAAS
|
|
306
|
+
end
|
|
307
|
+
let(:consumer_config) { base_config.merge('sasl_jaas_config' => jaas_config_value) }
|
|
308
|
+
|
|
309
|
+
include_examples 'sasl_jaas_config password handling'
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
|
|
267
314
|
context "static membership 'group.instance.id' setting" do
|
|
268
315
|
let(:base_config) do
|
|
269
316
|
{
|
|
@@ -264,6 +264,43 @@ describe LogStash::Inputs::Kafka do
|
|
|
264
264
|
|
|
265
265
|
expect(subject.send(:create_consumer, 'test-client-2', 'group_instance_id')).to be kafka_client
|
|
266
266
|
end
|
|
267
|
+
|
|
268
|
+
context 'with sasl_jaas_config' do
|
|
269
|
+
shared_examples 'sasl_jaas_config password handling' do
|
|
270
|
+
it "sasl_jaas_config.value returns the original string" do
|
|
271
|
+
subject.register
|
|
272
|
+
expect(subject.sasl_jaas_config.value).to eq(jaas_config_value)
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
it "sasl_jaas_config.inspect does not expose the password" do
|
|
276
|
+
subject.register
|
|
277
|
+
expect(subject.sasl_jaas_config.inspect).not_to include('admin-secret')
|
|
278
|
+
expect(subject.sasl_jaas_config.inspect).to eq('<password>')
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
context 'with single-line config' do
|
|
283
|
+
let(:jaas_config_value) { 'org.apache.kafka.common.security.plain.PlainLoginModule required username="admin" password="admin-secret";' }
|
|
284
|
+
let(:config) { super().merge('sasl_jaas_config' => jaas_config_value) }
|
|
285
|
+
|
|
286
|
+
include_examples 'sasl_jaas_config password handling'
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
context 'with multiline config' do
|
|
290
|
+
let(:jaas_config_value) {
|
|
291
|
+
<<~JAAS
|
|
292
|
+
org.apache.kafka.common.security.plain.PlainLoginModule required
|
|
293
|
+
username="admin"
|
|
294
|
+
password="admin-secret"
|
|
295
|
+
user_admin="admin-secret"
|
|
296
|
+
user_alice="alice-secret";
|
|
297
|
+
JAAS
|
|
298
|
+
}
|
|
299
|
+
let(:config) { super().merge('sasl_jaas_config' => jaas_config_value) }
|
|
300
|
+
|
|
301
|
+
include_examples 'sasl_jaas_config password handling'
|
|
302
|
+
end
|
|
303
|
+
end
|
|
267
304
|
end
|
|
268
305
|
|
|
269
306
|
describe "schema registry" do
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: logstash-integration-kafka
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 12.0.
|
|
4
|
+
version: 12.0.5
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Elastic
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-03-11 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: logstash-core-plugin-api
|