Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit username and password option for Mongodb #2889

Merged
merged 1 commit into from Oct 31, 2016

Conversation

Projects
None yet
2 participants
@tsg
Copy link
Collaborator

commented Oct 31, 2016

We previously only had the option of specifying a user/pass in the
URL string, which is problematic because it results in the password
being indexed in Elasticsearch (#2888).

This adds the option to specify a username/password at the module
configuration. To make this happen, I had to copy some unexported
functions from the mgo driver.

@ruflin
Copy link
Collaborator

left a comment

I think it is missing make collect and docs. But I see there is still the in progress label ;-)

#hosts: ["localhost:27017"]

# Username to use when connecting to MongoDB. Empty by default.
# username: user

This comment has been minimized.

Copy link
@ruflin

ruflin Oct 31, 2016

Collaborator

no space in front of username and password needed

if err != nil {
return nil, err
}
info.Timeout = base.Module().Config().Timeout

This comment has been minimized.

Copy link
@ruflin

ruflin Oct 31, 2016

Collaborator

👍

@tsg tsg added the needs_backport label Oct 31, 2016

@tsg

This comment has been minimized.

Copy link
Collaborator Author

commented Oct 31, 2016

Not strictly a bug fix, but I think we should backport this to the 5.0 branch as it makes it really difficult to use the MongoDB module otherwise.

Add explicit username and password option for Mongodb
We previously only had the option of specifying a user/pass in the
URL string, which is problematic because it results in the password
being indexed in Elasticsearch (#2888).

This adds the option to specify a username/password at the module
configuration. To make this happen, I had to copy some unexported
functions from the mgo driver.

@tsg tsg force-pushed the tsg:mongodb_user_pass_options branch from c3953b0 to c03da67 Oct 31, 2016

@tsg tsg removed the in progress label Oct 31, 2016

@ruflin ruflin merged commit 6c7dfe4 into elastic:master Oct 31, 2016

4 checks passed

CLA Commit author is a member of Elasticsearch
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
default Build finished.
Details

tsg added a commit to tsg/beats that referenced this pull request Oct 31, 2016

tsg added a commit to tsg/beats that referenced this pull request Nov 1, 2016

Add username/pass options for PostgreSQL
Similar to elastic#2889 but for PostgreSQL. Also adds docs to the Postgres module,
which were missing, and adjusted the integration tests to use the username
option instead of the full URL.

tsg added a commit to tsg/beats that referenced this pull request Nov 1, 2016

Add username/pass options for PostgreSQL
Similar to elastic#2889 but for PostgreSQL. Also adds docs to the Postgres module,
which were missing, and adjusted the integration tests to use the username
option instead of the full URL.

tsg added a commit to tsg/beats that referenced this pull request Nov 1, 2016

Add explicit username and password option for Mongodb (elastic#2889)
We previously only had the option of specifying a user/pass in the
URL string, which is problematic because it results in the password
being indexed in Elasticsearch (elastic#2888).

This adds the option to specify a username/password at the module
configuration. To make this happen, I had to copy some unexported
functions from the mgo driver.
(cherry picked from commit 6c7dfe4)

tsg added a commit to tsg/beats that referenced this pull request Nov 1, 2016

Add explicit username and password option for Mongodb (elastic#2889)
We previously only had the option of specifying a user/pass in the
URL string, which is problematic because it results in the password
being indexed in Elasticsearch (elastic#2888).

This adds the option to specify a username/password at the module
configuration. To make this happen, I had to copy some unexported
functions from the mgo driver.
(cherry picked from commit 6c7dfe4)

ruflin added a commit that referenced this pull request Nov 1, 2016

Add username/pass options for PostgreSQL (#2890)
Similar to #2889 but for PostgreSQL. Also adds docs to the Postgres module,
which were missing, and adjusted the integration tests to use the username
option instead of the full URL.

tsg added a commit to tsg/beats that referenced this pull request Nov 1, 2016

Add username/pass options for PostgreSQL (elastic#2890)
Similar to elastic#2889 but for PostgreSQL. Also adds docs to the Postgres module,
which were missing, and adjusted the integration tests to use the username
option instead of the full URL.
(cherry picked from commit f0b52e1)

tsg added a commit to tsg/beats that referenced this pull request Nov 1, 2016

Add username/pass options for PostgreSQL (elastic#2890)
Similar to elastic#2889 but for PostgreSQL. Also adds docs to the Postgres module,
which were missing, and adjusted the integration tests to use the username
option instead of the full URL.
(cherry picked from commit f0b52e1)

tsg added a commit to tsg/beats that referenced this pull request Nov 1, 2016

Add username/pass options for PostgreSQL (elastic#2890)
Similar to elastic#2889 but for PostgreSQL. Also adds docs to the Postgres module,
which were missing, and adjusted the integration tests to use the username
option instead of the full URL.
(cherry picked from commit f0b52e1)

monicasarbu added a commit that referenced this pull request Nov 1, 2016

Add username/pass options for PostgreSQL (#2890) (#2906)
Similar to #2889 but for PostgreSQL. Also adds docs to the Postgres module,
which were missing, and adjusted the integration tests to use the username
option instead of the full URL.
(cherry picked from commit f0b52e1)

tsg added a commit to tsg/beats that referenced this pull request Nov 1, 2016

Add explicit username and password option for Mongodb (elastic#2889)
We previously only had the option of specifying a user/pass in the
URL string, which is problematic because it results in the password
being indexed in Elasticsearch (elastic#2888).

This adds the option to specify a username/password at the module
configuration. To make this happen, I had to copy some unexported
functions from the mgo driver.
(cherry picked from commit 6c7dfe4)

andrewkroh added a commit that referenced this pull request Nov 1, 2016

Add explicit username and password option for Mongodb (#2889) (#2900)
We previously only had the option of specifying a user/pass in the
URL string, which is problematic because it results in the password
being indexed in Elasticsearch (#2888).

This adds the option to specify a username/password at the module
configuration. To make this happen, I had to copy some unexported
functions from the mgo driver.
(cherry picked from commit 6c7dfe4)

@tsg tsg removed the needs_backport label Nov 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.