SSL settings
To improve link security, you can enable SSL (Secure Sockets Layer) encryption and install the SSL CA certificate on the application services that need to establish encrypted connections. SSL encrypts network connections at the transport layer to improve the security and integrity of data in transit, but it also increases the response time of network connections. In this topic, SSL actually refers to TLS (Transport Layer Security) encryption.
Scenarios
-
Accessing a database over the public network: When a client connects to a PolarDB cluster over the public Internet, the data link is exposed to an untrusted network and requires encryption to prevent man-in-the-middle attacks.
-
Meeting security and compliance requirements: Specific industry or data protection regulations, such as PCI-DSS and GDPR, require sensitive data in transit to be encrypted.
-
Communicating across network environments: In hybrid cloud or multi-VPC architectures, data streams that cross network boundaries require SSL encryption to protect confidentiality and integrity.
Limits
The SSL settings of the Search cluster endpoint and the Dashboard endpoint are independent of each other.
Search cluster endpoint
-
Clusters that currently use AutoETL do not support the SSL feature for search nodes.
-
After SSL is enabled for search nodes, all connections to the Search cluster must use HTTPS.
-
Enabling or disabling SSL for search nodes restarts the Search cluster and causes Dashboard to restart.
-
When a change to the search node endpoint, such as modifying the access endpoint or adding a public endpoint, triggers an SSL certificate refresh, the Search cluster restarts.
-
Updating the validity period of the search node certificate does not restart the Search cluster.
-
You must enable SSL before you enable a public endpoint, and you must disable the public endpoint before you disable SSL.
Dashboard endpoint
-
Enabling or disabling SSL for the Dashboard endpoint and updating the Dashboard certificate both restart Dashboard.
-
You must enable SSL before you enable a public endpoint, and you must disable the public endpoint before you disable SSL.
Procedure
Step 1: Enable SSL encryption
Enabling SSL for the Search cluster endpoint restarts both the Search cluster and Dashboard. Enabling SSL for the Dashboard endpoint restarts Dashboard. We recommend that you perform these operations during off-peak hours.
-
Log in to the PolarDB console. In the navigation pane on the left, click Clusters. Select the Region where the cluster is deployed, and then click the cluster ID to go to the cluster details page.
-
In the left-side navigation pane, choose .
-
On the SSL Settings tab, select Search Cluster or Dashboard, and enable SSL encryption for the corresponding component.
Step 2: Download the certificate
After you enable SSL encryption, download the certificate of the Search cluster or Dashboard to verify the service identity during remote connections.
-
On the SSL Settings tab, click Download in the section of the corresponding endpoint.
-
Extract the downloaded archive, which contains three files:
-
.p7bfile: used to import the CA certificate on Windows systems. -
.pemfile: used to import the CA certificate on other systems or applications. -
.jksfile: a Java truststore certificate storage file with a uniform password ofapsaradb, used to import the CA certificate chain into Java programs.
-
Step 3: Connect to the Search cluster or Dashboard
After you enable SSL encryption, configure the downloaded certificate and use HTTPS when you access the Search cluster or Dashboard. You can modify the client settings or code to establish an encrypted connection and verify the identity of the Search cluster or Dashboard.
Maintenance and management
The following operations are all performed on the SSL Settings tab in Search Management. Before each operation, select the Search Cluster or Dashboard that you want to maintain.
SSL certificates automatically support new endpoints
If Automatically cover new connection strings with SSL is enabled, the SSL certificate is automatically updated when the endpoint of a search node changes, for example, when you modify the access endpoint or add a public endpoint.
When an endpoint change triggers an automatic update of the search node certificate, the Search cluster restarts. We recommend that you perform these operations during off-peak hours.
Update the certificate validity period
On the SSL Settings tab, click Update Validity Period to refresh the certificate validity period. After the update, redownload the certificate following Step 2, and reconfigure the certificate on the client following Step 3.
Updating the validity period of the Search cluster endpoint certificate does not restart the Search cluster, but updating the validity period of the Dashboard endpoint certificate restarts Dashboard. Make business arrangements before Dashboard restarts.
Automatic certificate rotation
After you enable automatic certificate rotation, within 10 days before the certificate expires, Search Cluster or Dashboard automatically updates its certificate within the maintenance time window of the cluster. Updating the Dashboard certificate restarts Dashboard.
Disable SSL encryption
Before you disable SSL, you must first disable the public endpoint of the corresponding component.
Disabling SSL for Search Cluster restarts both the Search cluster and Dashboard. Disabling SSL for Dashboard restarts Dashboard. We recommend that you perform these operations during off-peak hours.
-
On the SSL Settings tab, click the slider to the right of SSL Status to disable SSL encryption for the corresponding component.
-
In the dialog box that appears, click OK.