content/operate/rs/7.4/security/encryption/tls/enable-tls.md
You can use TLS authentication for one or more of the following types of communication:
{{<note>}} When you enable or turn off TLS, the change applies to new connections but does not affect existing connections. You must update TLS parameters in the client's connection configuration, then clients must close existing connections and reconnect to apply the change. {{</note>}}
To enable TLS for client connections:
From your database's Security tab, select Edit.
In the TLS - Transport Layer Security for secure connections section, make sure the checkbox is selected.
In the Apply TLS for section, select Clients and databases + Between databases.
Select Save.
Optionally, you can enable mutual TLS for client connections:
Select Mutual TLS (Client authentication).
{{<image filename="images/rs/screenshots/databases/security-mtls-clients.png" alt="Mutual TLS authentication configuration.">}}
For each client certificate, select + Add certificate, paste or upload the client certificate, then select Done.
If your database uses Replica Of or Active-Active replication, you also need to add the syncer certificates for the participating clusters. See Enable TLS for Replica Of cluster connections or Enable TLS for Active-Active cluster connections for instructions.
You can configure Additional certificate validations to further limit connections to clients with valid certificates.
Additional certificate validations occur only when loading a certificate chain that includes the root certificate and intermediate CA certificate but does not include a leaf (end-entity) certificate. If you include a leaf certificate, mutual client authentication skips any additional certificate validations.
Select a certificate validation option.
| Validation option | Description |
|---|---|
| No validation | Authenticates clients with valid certificates. No additional validations are enforced. |
| By Subject Alternative Name | A client certificate is valid only if its Common Name (CN) matches an entry in the list of valid subjects. Ignores other Subject attributes. |
| By full Subject Name | A client certificate is valid only if its Subject attributes match an entry in the list of valid subjects. |
If you selected No validation, you can skip this step. Otherwise, select + Add validation to create a new entry and then enter valid Subject attributes for your client certificates. All Subject attributes are case-sensitive.
| Subject attribute
| (case-sensitive) | Description |
|---|---|
| Common Name (CN) | Name of the client authenticated by the certificate (required) |
| Organization (O) | The client's organization or company name |
| <nobr>Organizational Unit (OU)</nobr> | Name of the unit or department within the organization |
| Locality (L) | The organization's city |
| State / Province (ST) | The organization's state or province |
| Country (C) | 2-letter code that represents the organization's country |
You can only enter a single value for each field, except for the Organizational Unit (OU) field. If your client certificate has a Subject with multiple Organizational Unit (OU) values, press the Enter or Return key after entering each value to add multiple Organizational Units.
{{<image filename="images/rs/screenshots/databases/security-mtls-add-cert-validation-multi-ou.png" width="350px" alt="An example that shows adding a certificate validation with multiple organizational units.">}}
Breaking change: If you use the [REST API]({{< relref "/operate/rs/7.4/references/rest-api" >}}) instead of the Cluster Manager UI to configure additional certificate validations, note that authorized_names is deprecated as of Redis Enterprise v6.4.2. Use authorized_subjects instead. See the [BDB object reference]({{< relref "/operate/rs/7.4/references/rest-api/objects/bdb" >}}) for more details.
Select Save.
By default, Redis Enterprise Software validates client certificate expiration dates. You can use [rladmin tune db]({{<relref "/operate/rs/7.4/references/cli-utilities/rladmin/tune#tune-db">}}) to turn off this behavior.
rladmin tune db < db:id | name > mtls_allow_outdated_certs { enabled | disabled }
To connect to a Redis Enterprise Software database over TLS using [redis-cli]({{<relref "/operate/rs/7.4/references/cli-utilities/redis-cli">}}):
Download or copy the server (or proxy) certificate from the Cluster Manager UI (Cluster > Security > Certificates > Server authentication) or from a cluster node (/etc/opt/redislabs/proxy_cert.pem).
Copy the certificate to each client machine.
If your database doesn't require client authentication with mutual TLS, provide the server certificate when you connect:
redis-cli -h <endpoint> -p <port> --tls --cacert proxy_cert.pem
If your database requires client authentication with mutual TLS, provide your client's private and public keys along with the Redis Enterprise Software server certificate when you connect:
redis-cli -h <endpoint> -p <port> --tls --cacert proxy_cert.pem \
--cert redis_user.crt --key redis_user_private.key
To enable TLS for Active-Active cluster connections:
If you are using the new Cluster Manager UI, switch to the legacy admin console.
{{<image filename="images/rs/screenshots/switch-to-legacy-ui.png" width="300px" alt="Select switch to legacy admin console from the dropdown.">}}
{{< note >}} You cannot enable or turn off TLS after the Active-Active database is created, but you can change the TLS configuration. {{< /note >}}
For each participating cluster, copy the syncer certificate from the general settings tab.
{{< image filename="/images/rs/general-settings-syncer-cert.png" alt="general-settings-syncer-cert" >}}
Repeat this process on all participating clusters.
To enforce TLS authentication, Active-Active databases require syncer certificates for each cluster connection. If every participating cluster doesn't have a syncer certificate for every other participating cluster, synchronization will fail.
{{<embed-md "replica-of-tls-config.md">}}