Closed as not planned
Description
Describe the bug
Exporter tries to connect with MongoDB using the URI to get the metrics.
Here is the URI format.
mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]
When we do ps -ef we are able to see the password even though we try to render the password via an env and this can be a security breach when we use this in production environment.
To Reproduce
Steps to reproduce the behavior:
- Install MongoDB 4.2 in either replica set mode or stand alone mode. (Though we believe Mongo version has nothing to do here)
- Run the binary (mongodb_exporter-0.7.1.linux-amd64.tar.gz) by providing the Mongo connection URI as shown above.
Expected behavior
When we go the terminal and do ps -ef, password should be redacted.
Logs
Please provide logs relevant to the issue
Environment
- Linux
- docker, k8s (1.22)
- Mongo DB version 4.2.