This topic describes how to make data transmission more secure by configuring SSL encryption. You must enable SSL encryption and install SSL certificates that are issued by certificate authorities (CAs) to the required applications. SSL is used to encrypt connections at the transport layer and enhance the security and integrity of the transmitted data. However, SSL encryption increases the round-trip time.
Precautions
- An SSL certificate remains valid for one year. Before the used SSL certificate expires, you must update the validity period of the SSL certificate. Otherwise, your application or client that uses encrypted network connections cannot connect to your instance.
- SSL encryption may cause a significant increase in CPU utilization. We recommend that you enable SSL encryption only when you need to encrypt the public connections to your instance.
Enable SSL encryption
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select the region where the instance resides.
- Find the instance that you want to manage and click its ID.
- In the left-side navigation pane, click Security Controls.
- Click the SSL Encryption tab.
- Turn on SSL Encryption.
- In the Enable SSL Encryption message, click OK.
- After SSL Encryption is set to Enabled, click Download Certificate. The downloaded package contains the following files:
- P7B file: the SSL certificate file that is used for a Windows operating system.
- PEM file: the SSL certificate file that is used for an operating system other than Windows or an application that is not run on Windows
- JKS file: the CA certificate file that is stored in the Java-supported truststore. You can use this file to import the CA certificate chain into Java-based applications. The default password is apsaradb.
When you use the JKS file in JDK 7 or JDK 8, you must modify the following default JDK security configuration items in the jre/lib/security/Java.security file on the host where your application resides:
jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 224 jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
If you do not modify these configurations, the following error is reported. In most cases, similar errors are caused by invalid Java security configurations.
javax.net.ssl.SSLHandshakeException: DHPublicKey does not comply to algorithm constraints
Update the validity period
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select the region where the instance resides.
- Find the instance that you want to manage and click its ID.
- In the left-side navigation pane, click Security Controls.
- Click the SSL Encryption tab.
- Click Update Validity to the right of SSL Encryption.
- In the Update SSL Certificate Validity message, click OK.
Disable SSL encryption
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select the region where the instance resides.
- Find the instance that you want to manage and click its ID.
- In the left-side navigation pane, click Security Controls.
- Click the SSL Encryption tab.
- Turn off SSL Encryption.
- In the Disable SSL Encryption message, click OK.
Related operations
Operation | Description |
---|---|
DescribeDBInstanceSSL | Queries the SSL encryption information of an instance. |
ModifyDBInstanceSSL | Enables or disables SSL encryption, or updates the validity period of SSL encryption. |