Logstash 7.8.0 Pipeline Authentication on MongoDB 4 Failure

Hi everyone.

I'm trying to read a collection on MongoDB 4 (installed on an AWS machine) via the Logstash 7.8.0 pipeline (installed on a GCP machine).

In the pipeline configuration file I tried both to specify the authentication mechanism of the pipeline towards MongoDB, and to not specify it. No authentication mechanisms are supported. Below is an fragment from the log:

Pipeline aborted due to error {: pipeline_id => "main",: exception => # <Mongo :: Auth :: Unauthorized: User myUser (mechanism: scram) is not authorized to
access myDatabase (auth source: myDatabase, used mechanism: SCRAM-SHA-1, used server: x.y.z.w: 37017 (STANDALONE)):
Authentication failed. (on x.y.z.w: 37017)>,:
backtrace => ["/ usr / share / logstash / vendor / bundle / jruby / 2.5.0 / gems / mongo-2.12.1 / lib / mongo / auth / scram / conversation.rb: 534: in` validate! '" ,
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/auth/scram/conversation.rb:528:in` validate_first_message! '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/auth/scram/conversation.rb:116:in` continue '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/auth/scram.rb:74:in` login '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection.rb:390:in` block in authenticate! '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server.rb:449:in` handle_auth_failure! '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection.rb:388:in` authenticate! '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection.rb:200:in` do_connect '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection.rb:177:in` connect! '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection_pool.rb:745:in` connect_connection '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection_pool.rb:360:in` check_out '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection_pool.rb:570:in` with_connection '"," / usr / share / logsta

If I use a MongoDB client to connect to the same database without specifying the authentication mechanism, everything works correctly.

I suspect the problem may be the pipeline's mongoDB plug-in.

Any help is appreciated.

Thanks in advance, leoper.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.