Friday, June 11, 2021

HCL Sametime 11.6 and MongoDB 4.4 - how to enable mongo security correctly

HCL Sametime 11.6 is supporting MongoDB 4.4 and this is the suggested version in case of new install.

During a Community setup is enable the Mongo security as described here , but the steps there are not enough, because 4.4 version in case of replica set. 

This version require also the creation and the use of a shared key to every Mongo server involved in the replica set, even if the replica set is composed by 1 node.


The first step required is the creation of  the authentication key that I made with the following command:


openssl rand -base64 741 > /etc/mongod.key


After the creation of the key, ownership and permission should be set in the right way:


chmod 600 /etc/mongod.key
chown mongod: /etc/mongod.key



now it's possible to enable the security  inside /etc/mongod.conf


security:
  authorization: enabled
  keyFile: /etc/mongod.key



No comments:

Post a Comment