Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

For setting up x509 certificates in MongoDB, please follow the links below:

  1. MongoDB security guide on x509 Authentication
  2. Third party blog explaining in detail for x509 authentication

Once you have configured the x509 authentication in MongoDB, then you will be having the .pem and .crt file for the database user which is going to access the database.

Then add/update the following configuration in config.json file.

{
    "db" : "mongodb://localhost:27001/db-name?ssl=true",
    "dbOpts": {
        "user": "emailAddress=john.doe@example.com,CN=XYZ,OU=XYZ-Client,O=XYZ,L=XYZ,ST=XYZ,C=XYZ",
        "auth": { "authMechanism": "MONGODB-X509" },
        "server": {
            "sslValidate": false,
            "sslKey": {"filePath": "/path/to/db-user.pem"},
            "sslCert": {"filePath": "/path/to/db-user.crt"}
        }
    }
}

 

 

  • No labels