Once the secured authentication is enabled on the MongoDB server, update the conf.xml file:
- Edit the following file:
As root user
/usr/local/afs7/conf/conf.xml
- It must look as follows:
<?xml version='1.0' encoding='iso-8859-1'?>
<afs:conf xmlns:afs="http://ref.antidot.net/v7/afs#">
<afs:PaF>
<afs:PaFManager>
<afs:maxQueueSize value="0"/>
<afs:Mongo>
<afs:connectionString value="mongodb://$USER_NAME:$PASSWORD@localhost:27017"/>
</afs:Mongo>
</afs:PaFManager>
</afs:PaF>
<afs:ContentRepository>
...
<afs:Nerada>
...
<afs:Mongo>
<afs:connectionString value="mongodb://$USER_NAME:$PASSWORD@localhost:27017"/>
</afs:Mongo>
</afs:Nerada>
</afs:ContentRepository>
<afs:LogManager>
...
</afs:LogManager>
</afs:conf>
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