Activating the User Authentication¶
Single System and Replica Set Primary¶
The user authentication of MongoDB is disabled by default. Activate the user authentication to enhance the security.
-
Open a PowerShell (Administrator) and change to the following directory:
C:\Program Files\SEAL Systems\seal-mongodb -
Execute the following script:
.\secure-mongo.ps1
Secondary Members of the Replica Set¶
If you run PLOSSYS 5 in a cluster, execute the above step on the replica set primary. Then execute the following steps on any secondary member of the replica set:
-
Copy the key file created by
secure-mongo.ps1on the replica set primaryC:\ProgramData\SEAL Systems\config\mongod.keyfileinto the following directory on your current member of the replica set:
C:\ProgramData\SEAL Systems\config\ -
Add the following lines to the
C:\ProgramData\SEAL Systems\config\mongod.conffile:security: authorization: enabled keyFile: C:\ProgramData\SEAL Systems\config\mongod.keyfile -
Restart MongoDB:
seal-mongodb -
Proceed with step 1 on the next member of the replica set.