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

Document privileges needed to use Metricbeat MongoDB module #13820

Closed
jsoriano opened this issue Sep 27, 2019 · 5 comments · Fixed by #13932
Closed

Document privileges needed to use Metricbeat MongoDB module #13820

jsoriano opened this issue Sep 27, 2019 · 5 comments · Fixed by #13932
Assignees
Labels
candidate Candidate to be added to the current iteration enhancement good first issue Indicates a good issue for first-time contributors Hacktoberfest Metricbeat Metricbeat module Team:Integrations Label for the Integrations team

Comments

@jsoriano
Copy link
Member

Check the privileges needed to use the MongoDB module and document them.

Add user and roles to MongoDB integration tests so these privileges are checked.

@jsoriano jsoriano added enhancement module Metricbeat Metricbeat Team:Integrations Label for the Integrations team labels Sep 27, 2019
@andresrc andresrc added [zube]: Inbox candidate Candidate to be added to the current iteration [zube]: Ready good first issue Indicates a good issue for first-time contributors and removed [zube]: Inbox labels Oct 1, 2019
@hwang381
Copy link
Contributor

hwang381 commented Oct 3, 2019

I am new to the project but I'd like to work on this issue as a Hacktoberfest issue. A few questions though

  • Does the work involve both checking privileges within code itself AND document those privileges? The issue description seems to indicate that but the title only says document
  • Is "privileges" referring to MongoDB privileges, e.g. as described here
  • If that's the case, what exact privileges are needed?

Cheers

@jsoriano
Copy link
Member Author

jsoriano commented Oct 3, 2019

Hey @hwang381,

Welcome to the project 🙂 It is great that you want to work on this issue for the Hacktoberfest, let's see if I can help with your questions.

  • Does the work involve both checking privileges within code itself AND document those privileges? The issue description seems to indicate that but the title only says document

We should at least document them. Having something in tests to verify the permissions would be great, but not so important, and it could be done in a separate PR.

  • Is "privileges" referring to MongoDB privileges, e.g. as described here

Yes.

  • If that's the case, what exact privileges are needed?

I don't really know, this would be the main task of this issue 🙂 Once we confirm which privileges are needed, then we can add them to the documentation of the module in metricbeat/module/mongodb/_meta/docs.asciidoc.

Thanks!

@hwang381
Copy link
Contributor

hwang381 commented Oct 3, 2019

Trying to find all privileges that would be needed by

  1. Finding all places where a mongodb query is executed in the mongodb package. For example, mongoSession.Run("top", &result) in collstats.go. There are about 5 or 6 of them in the package.
  2. For each of the mongodb queries, find and document the required privileges in mongodb doc

Let me know whether the methodology sounds right to you and then I will proceed with a PR.

@jsoriano
Copy link
Member Author

jsoriano commented Oct 4, 2019

@hwang381 this sounds great! It'd be also good to document how to add these privileges, or where to find instructions to do so. But let's focus first on finding the required privileges.

@hwang381
Copy link
Contributor

hwang381 commented Oct 6, 2019

PR created #13932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
candidate Candidate to be added to the current iteration enhancement good first issue Indicates a good issue for first-time contributors Hacktoberfest Metricbeat Metricbeat module Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants