As a PMM user, I need to be able to specify the authentication mechanism for MongoDB when I'm adding Mongo to the PMM so that pmm will be using this mechanism to connect to PMM
- additional field on adding Remote Mongo for monitoring
- User able to select or type mechanism during the remote instance adding
- the mechanism used for connection to mongo
When using certificates and the $external db, it is not possible to set a password.
The user can be set to the certificate's domain information like C=US,ST=CA,L=San Francisco,O=Jaspersoft,OU=JSDev,CN=admin but it is not mandatory so, we need to make user and password fields not mandatory.
Example connection command:
Without specifying the user, it also works because you are using certificates:
For example, if you try to set a password when creating the user in MongoDB you will get:
Out of scope:
How to test:
pmm-admin version: 2.13.0
mongo version: 4.4 - Percona
mongo_exporter is able to connect to mongo with --tls, --tls-certificate-key-file and --tls-ca-file, but then gets errors on Mongo side because of missing authorization.
"error getting cluster ID: (Unauthorized)"
Straight connection to mongo shell works with same flags when following mongo flags are added:
--authenticationDatabase '$external' --authenticationMechanism MONGODB-X509
I do not see that pmm supports these flags.