logstash-plugins/logstash-integration-kafka

Schema verification failure due to missing authentication produces inadequate logs

robbavey opened this issue · 0 comments

During the process to verify schemas when using the confluent schema registry, failing to authenticate produces the following log entries:

[2021-02-23T07:33:21,086][ERROR][logstash.javapipeline ][test] Pipeline aborted due to error {:pipeline_id=>"test", :exception=>#<TypeError: no implicit conversion of Hash into Array>, :backtrace=>["org/jruby/RubyArray.java:3503:in &'", "org/jruby/RubyMethod.java:131:in call'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/awesome_print-1.7.0/lib/awesome_print/core_ext/array.rb:20:in block in Array'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-kafka-10.7.0-java/lib/logstash/plugin_mixins/common.rb:64:in check_for_schema_registry_connectivity_and_subjects'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-kafka-10.7.0-java/lib/logstash/plugin_mixins/common.rb:32:in check_schema_registry_parameters'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-kafka-10.7.0-java/lib/logstash/inputs/kafka.rb:249:in register'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:216:in block in register_plugins'", "org/jruby/RubyArray.java:1809:in each'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:215:in register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:327:in start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:287:in start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:170:in run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:125:in `block in start'"], "pipeline.sources"=>["central pipeline management"], :thread=>"#<Thread:0x66c7719f run>"}

This is likely happening due to the return payload being different to the expected return value from the /subjects endpoint, and no checks being done on the status code returned when hitting that endpoint.

Related: #72