Once the secured authentication is enabled on the MongoDB server, update the mongo.conf.json file to authenticate through Scram-Sha-1 method.:
- Edit the following file:
As antidot user
/usr/local/afs7/Fluid-Topics/conf/-/mongo.conf.json
- Add the following lines to the file:
As antidot user
{
"hosts": [
...
],
"authentication": {
"scramSha1": {
"username": "$USER_NAME",
"password": "$PASSWORD",
"database": "admin"
}
}
}Where database is the authentication database associated to the user. Its value is usually admin.
For more information about the user authentication database, consult the MongoDB official documentation.
If $PASSWORD contains special characters, then it must be encoded in accordance with the following nomenclature: https://www.w3schools.com/tags/ref_urlencode.asp
Example: myUserAdmin2:abc#!!!!@123 should be myUserAdmin2:abc%23%21%21%21%21%40123