{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/logstash/issues/3103","labels_url":"https://api.github.com/repos/elastic/logstash/issues/3103/labels{/name}","comments_url":"https://api.github.com/repos/elastic/logstash/issues/3103/comments","events_url":"https://api.github.com/repos/elastic/logstash/issues/3103/events","html_url":"https://github.com/elastic/logstash/issues/3103","id":70619826,"number":3103,"title":"logstash 1.4.2: mongodb output plugin doesn't support SCRAM-SHA-1 authentication mechanism for mongodb 3.0","user":{"login":"svezzoli","id":8234820,"avatar_url":"https://avatars.githubusercontent.com/u/8234820?v=3","gravatar_id":"","url":"https://api.github.com/users/svezzoli","html_url":"https://github.com/svezzoli","followers_url":"https://api.github.com/users/svezzoli/followers","following_url":"https://api.github.com/users/svezzoli/following{/other_user}","gists_url":"https://api.github.com/users/svezzoli/gists{/gist_id}","starred_url":"https://api.github.com/users/svezzoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svezzoli/subscriptions","organizations_url":"https://api.github.com/users/svezzoli/orgs","repos_url":"https://api.github.com/users/svezzoli/repos","events_url":"https://api.github.com/users/svezzoli/events{/privacy}","received_events_url":"https://api.github.com/users/svezzoli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-24T08:05:34Z","updated_at":"2015-05-18T05:58:45Z","closed_at":null,"body":"We need to use logstash 1.4.2 to store documents into MongoDB version 3.0 with new SCRAM-SHA-1 authentication mechanism enabled.\r\n\r\nNo documents are written in mongodb with following configuration file:\r\noutput {\r\n  mongodb {\r\n    collection => '%{type}'\r\n    database => 'nfmdata'\r\n    uri => 'mongodb://nfmoss:nfmoss@127.0.0.1'\r\n  }\r\n}\r\n\r\nIf we add to uri parameter the connection authentication option:\r\nuri => 'mongodb://nfmoss:nfmoss@127.0.0.1/?authMechanism=SCRAM-SHA-1'\r\n\r\nwe have the following error:\r\nMongo::MongoArgumentError: Invalid value \"scram-sha-1\" for authmechanism: must be one of GSSAPI, MONGODB-CR, MONGODB-X509, PLAIN\r\n\r\nIt 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.\r\nOtherwise, 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. \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/logstash/issues/comments/102928917","html_url":"https://github.com/elastic/logstash/issues/3103#issuecomment-102928917","issue_url":"https://api.github.com/repos/elastic/logstash/issues/3103","id":102928917,"user":{"login":"jordansissel","id":131818,"avatar_url":"https://avatars.githubusercontent.com/u/131818?v=3","gravatar_id":"","url":"https://api.github.com/users/jordansissel","html_url":"https://github.com/jordansissel","followers_url":"https://api.github.com/users/jordansissel/followers","following_url":"https://api.github.com/users/jordansissel/following{/other_user}","gists_url":"https://api.github.com/users/jordansissel/gists{/gist_id}","starred_url":"https://api.github.com/users/jordansissel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordansissel/subscriptions","organizations_url":"https://api.github.com/users/jordansissel/orgs","repos_url":"https://api.github.com/users/jordansissel/repos","events_url":"https://api.github.com/users/jordansissel/events{/privacy}","received_events_url":"https://api.github.com/users/jordansissel/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T05:58:45Z","updated_at":"2015-05-18T05:58:45Z","body":"For Logstash 1.5.0, we've moved all plugins to individual repositories, so I have moved this issue to https://github.com/logstash-plugins/logstash-output-mongodb/issues/5. Let's continue the discussion there! :)"}}