Open woudanator opened 10 months ago
Your URI shouldn't contain the username and password, as this insecure, anyone who logs into your grafana instance can steal those credentials. You should instead use the username and password fields, which will obscure them and only provide them to the plugin and not the UI. I'm not certain if the plugin works with credentials directly in the connection string, but its not supported even if it does.
If it still doesn't work with the credentials provided correctly, you'll need to check the mongodb logs for the actual error.
Thanks
I am aware was just trying it as it gave me the same error when I tried it with the username and password field.
It seems it uses the admin database for auth regardless of the Auth Source being set in the Uri string. I suspect this is hard coded maybe.
Easy to fix my end so ill fix and see if adding a user with the right permissions to the admin database fixes my problem. thanks for the assistance much appreciated.
I think I've found the problem. For whatever reason, setting the username/password in the mongo go driver unsets the auth source that's parsed from the URI. I'll try to find a way around this and get a release out later this week.
ahh makes sense thanks for now i just created another super user witch ill use until the new fix is released.
v0.2.0+rc4 is now available, which should resolve this issue.
Doesn't seem to fix the problem I still get the same error.
Good day
Ran into a bit of an issue while trying to connect to my db. using the plugin, I am running in Grafana docker image.
URI STRING: mongodb://mwaccess:username:password@192.168.55.129:27017/sodapop-db/?authSource=sodapop-db
While trying to connect u get the below error
Ping failed: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Database is accessible from the docker container as I was able to connect using the mongo shell, I am sure this is a me error, but assistance would be greatly appreciated.
please let me know if you require more information