Skip to content

logstash 1.4.2: mongodb output plugin doesn't support SCRAM-SHA-1 authentication mechanism for mongodb 3.0 #5

Open
@jordansissel

Description

@jordansissel

(This issue was originally filed by @svezzoli at elastic/logstash#3103)


We need to use logstash 1.4.2 to store documents into MongoDB version 3.0 with new SCRAM-SHA-1 authentication mechanism enabled.

No documents are written in mongodb with following configuration file:
output {
mongodb {
collection => '%{type}'
database => 'nfmdata'
uri => 'mongodb://nfmoss:nfmoss@127.0.0.1'
}
}

If we add to uri parameter the connection authentication option:
uri => 'mongodb://nfmoss:nfmoss@127.0.0.1/?authMechanism=SCRAM-SHA-1'

we have the following error:
Mongo::MongoArgumentError: Invalid value "scram-sha-1" for authmechanism: must be one of GSSAPI, MONGODB-CR, MONGODB-X509, PLAIN

It seems that mongodb output plugin has to be lined up to MongoDB Java driver version compatible with MongoDB version 3.0, that is at least 2.13.0 version.
Otherwise, authentication will fail because the server is expecting the driver to use the new SCRAM-SHA1 authentication protocol rather than the MONGODB-CR authentication protocol that it replaces.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions