This topic describes how to enable Secure Sockets Layer (SSL) encryption and install SSL CA certificates to applications. SSL encrypts data over network connections at the transport layer. This enhances data security and integrity but increases network connection response time.
- The validity period of an SSL CA certificate is one year. You must renew the validity period of the SSL CA certificate in your application or client within one year. Otherwise, your application or client that uses an encrypted network connection cannot connect to RDS properly.
- SSL encryption increases CPU usage. Therefore, we recommend that you enable SSL encryption only for public endpoints when required. In typical cases, private endpoints do not require SSL encryption.
- SSL encryption cannot be disabled once it is enabled.
- An RDS instance that uses a read-only address does not support SSL encryption.
Enable SSL encryption
- Log on to the RDS console.
- In the upper-left corner, select the region where the target RDS instance is located.
- Find the target RDS instance and click the instance ID.
- In the left-side navigation pane, click Data Security.
- Click the SSL Encryption tab.
- Click the switch next to Disabled in the SSL Encryption parameter.
- In the Configure SSL dialog box, select the endpoint for which you want to enable SSL encryption, then
Note You can choose to encrypt the private or public endpoint, but note that you can encrypt only one endpoint.
- Click Download CA Certificate to download the SSL CA certificate files in a compressed package.
The compressed package consists of the following three files:
- .p7b file: used to import CA certificate files in Windows operating systems.
- .pem file: used to import CA certificate files in other systems or applications.
- .jks file: used to import link CA certificate files in Java-based applications. The
.jks file is stored in the TrustStore of Java.
Note When you use the .jks file in JDK 7 or JDK 8, you must modify the default JDK security configuration. Specifically, you must find the jre/lib/security/java.security file on the server where the database you want to access through SSL is located, and then reconfigure the file as follows:
jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 224 jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024If you do not modify the JDK security configuration, the system reports errors similar to the following:
javax.net.ssl.SSLHandshakeException: DHPublicKey does not comply to algorithm constraints
Configure the SSL CA certificate
After SSL encryption is enabled, you must configure the SSL CA certificate for your application or client when connecting to RDS. This section uses MySQL Workbench as an example to describe how to install the SSL CA certificate.
- Start MyQL Workbench.
- Choose .
- Enable Use SSL and import the SSL CA certificate files.
Renew the validity period of the SSL CA certificate
- This operation causes your RDS instance to restart. You must make proper service arrangements before this operation.
- After the operation, the CA certificate needs to be downloaded and configured again.