启用 TLS
演示如何启用 TLS。
Redis 企业软件 |
---|
您可以将 TLS 身份验证用于以下一种或多种类型的通信:
- 从客户端(应用程序)到数据库的通信
- 使用 Replica Of 从数据库到其他集群的通信以进行复制
- 与数据库之间的通信,以及从数据库与其他集群进行通信,以便使用 Active-Active 进行同步
为客户端连接启用 TLS
要为客户端连接启用 TLS,请执行以下作:
-
从数据库的 Security (安全) 选项卡中,选择 Edit (编辑)。
-
在 TLS - 安全连接的传输层安全性部分中,确保选中该复选框。
-
在 Apply TLS for 部分中,选择 Clients and databases + Between databases。
-
选择 Save (保存)。
要为客户端连接启用双向 TLS:
-
选择 Mutual TLS (Client authentication) (双向 TLS (客户端身份验证))。
-
对于每个客户端证书,请选择 + 添加证书,粘贴或上传客户端证书,然后选择 完成。
如果您的数据库使用 Replica Of 或 Active-Active 复制,您还需要为参与的集群添加 syncer 证书。有关说明,请参阅为集群连接副本启用 TLS 或为主动-主动集群连接启用 TLS。
-
您可以配置 Additional certificate validation (其他证书验证) 以进一步限制与具有有效证书的客户端的连接。
仅当加载包含根证书和中间 CA 证书但不包括叶(最终实体)证书的证书链时,才会进行其他证书验证。如果包含叶证书,则相互客户端身份验证将跳过任何其他证书验证。
-
选择证书验证选项。
验证选项 描述 无验证 使用有效证书对客户端进行身份验证。不强制执行其他验证。 按主题可选名称 仅当客户端证书的公用名 (CN) 与有效使用者列表中的条目匹配时,客户端证书才有效。忽略其他 Subject
属性。按完整主题名称 客户端证书仅在以下情况下有效 Subject
属性与有效主题列表中的条目匹配。 -
如果您选择了 No validation(无验证),则可以跳过此步骤。否则,请选择 + 添加验证以创建新条目,然后输入 valid
Subject
属性。都Subject
属性区分大小写。Subject 属性
(区分大小写)描述 通用名称 (CN) 通过证书进行身份验证的客户端名称(必需) 组织 (O) 客户的组织或公司名称 组织单位 (OU) 组织内的单位或部门的名称 产地 (L) 组织所在的城市 州/省 (ST) 组织的州或省 国家 (C) 代表组织所在国家/地区的 2 个字母代码 您只能为每个字段输入一个值,但 Organizational Unit (OU) (组织单位 (OU) ) 字段除外。如果您的客户端证书具有
Subject
如果有多个 组织单位 (OU) 值,请按Enter
或Return
键以添加多个组织单位。重大更改:如果您使用 REST API 而不是集群管理器 UI 来配置其他证书验证,请注意
authorized_names
自 Redis Enterprise v6.4.2 起已弃用。用authorized_subjects
相反。有关更多详细信息,请参阅 BDB 对象参考。
-
-
选择 Save (保存)。
注意:默认情况下,Redis Enterprise Software 会验证客户端证书到期日期。您可以使用
rladmin
以关闭此行为。rladmin tune db < db:id | name > mtls_allow_outdated_certs enabled
Enable TLS for Active-Active cluster connections
To enable TLS for Active-Active cluster connections:
Note:
You cannot enable or turn off TLS after the Active-Active database is created, but you can change the TLS configuration.
Retrieve syncer certificates
For each participating cluster, copy the syncer certificate from the general settings tab.
Configure TLS certificates for Active-Active
- During database creation (see Create an Active-Active Geo-Replicated Database, select Edit from the configuration tab.
- Enable TLS.
- Enforce client authentication is selected by default. If you clear this option, you will still enforce encryption, but TLS client authentication will be deactivated.
- Select Require TLS for CRDB communication only from the dropdown menu.
- Select Add
- Paste a syncer certificate into the text box.
- Save the syncer certificate.
- Repeat this process, adding the syncer certificate for each participating cluster.
- Optional: If also you want to require TLS for client connections, select Require TLS for All Communications from the dropdown and add client certificates as well.
- Select Update at the bottom of the screen to save your configuration.
Configure TLS on all participating clusters
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.
Enable TLS for Replica Of cluster connections
To enable TLS for Replica Of cluster connections:
-
For each cluster hosting a replica:
-
From the Security tab of the Replica Of source database, 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 Between databases only.
-
Select Mutual TLS (Client authentication).
-
Select + Add certificate, paste or upload the syncer certificate, then select Done.
Repeat this process, adding the syncer certificate for each cluster hosting a replica of this database.
-
(Optional) To require TLS for client connections, change Apply TLS for to Clients and databases + Between databases and add client certificates.
-
Select Save.
On this page