Clusters Currently Not Using TLS/SSL For clusters using keyfile authentication but not TLS/SSL, to upgrade to x.509 authentication, use the following rolling upgrade process: 

1. For each node of a cluster, start the node with the option --sslMode set to allowSSL , the option --clusterAuthMode set to sendKeyFile and the option --sslClusterFile set to the appropri- ate path of the node’s certificate. Include other TLS/SSL options (page 342) as well as any other options that are required for your specific configuration. For example: 

mongod --replSet <name> --sslMode allowSSL --clusterAuthMode sendKeyFile --sslClusterFile 

The --sslMode allowSSL setting allows the node to accept both TLS/SSL and non-TLS/non-SSL incom- ing connections. Its outgoing connections do not use TLS/SSL. 

The --clusterAuthMode sendKeyFile setting allows each node continues to use its keyfile to authen- ticate itself as a member. However, each node can now accept either a keyfile or an x.509 certificate from other members to authenticate those members. 

Upgrade all nodes of the cluster to these settings. 

2. Then, for each node of a cluster, connect to the node and use the setParameter command to update the sslMode to preferSSL and the clusterAuthMode to sendX509 . 1 For example: 

db.getSiblingDB('admin').runCommand( { setParameter: 1, sslMode: "preferSSL", clusterAuthMode: 

With the sslMode set to preferSSL , the node accepts both TLS/SSL and non-TLS/non-SSL incoming con- nections, and its outgoing connections use TLS/SSL. 

With the clusterAuthMode set to sendX509 , each node uses its x.509 certificate, specified with the --sslClusterFile option in the previous step, to authenticate itself as a member. However, each node continues to accept either a keyfile or an x.509 certificate from other members to authenticate those members. 

Upgrade all nodes of the cluster to these settings. 

3. Optional but recommended. Finally, for each node of the cluster, connect to the node and use the setParameter command to update the sslMode to requireSSL and the clusterAuthMode to x509 . 1 

For example: 

db.getSiblingDB('admin').runCommand( { setParameter: 1, sslMode: "requireSSL", clusterAuthMode: 

With the sslMode set to requireSSL , the node only uses TLS/SSLs connections. 

With the clusterAuthMode set to x509 , the node only uses the x.509 certificate for authentication. 

4. After the upgrade of all nodes, edit the configuration file with the appropriate TLS/SSL and x.509 settings to ensure that upon subsequent restarts, the cluster uses x.509 authentication. 

See --clusterAuthMode for the various modes and their descriptions. 

## Authenticate Using SASL and LDAP with ActiveDirectory 

MongoDB Enterprise provides support for proxy authentication of users. This allows administrators to configure a MongoDB cluster to authenticate users by proxying authentication requests to a specified Lightweight Directory Access Protocol (LDAP) service. 

## Considerations 

MongoDB Enterprise for Windows does not include LDAP support for authentication. However, MongoDB Enterprise for Linux supports using LDAP authentication with an ActiveDirectory server. 

