Enable SSL authentication
Configure FE nodes
To enable SSL authentication in the database, configure the following parameters in the FE configuration file fe.conf:ssl_keystore_location: Specifies the path to the keystore file that stores the SSL certificate and key.ssl_keystore_password: The password for accessing the keystore file. The database requires this password to read the keystore file.ssl_key_password: The password for accessing the key. The database requires this password to retrieve the key from the keystore.ssl_force_secure_transport: Whether to force SSL authentication. Default value:FALSE. If this item is set toTRUE, the system will reject connections that are not encrypted with SSL.
Generate SSL certificate
In a production environment, it is recommended to use certificates provided by certificate authorities. In a development environment, you can generate a custom SSL certificate. Use the following command to generate an SSL certificate:-keypass: The key password, corresponding tossl_key_passwordin fe.conf.-storepass: The keystore file password, corresponding tossl_keystore_passwordin fe.conf.-keystore: The storage path of the keystore file, corresponding tossl_keystore_locationin fe.conf.
Enable SSL on client
The database is compatible with the MySQL protocol. For MySQL clients, SSL authentication is enabled by default. For JDBC connections, add the following options:Disable SSL authentication
To disable SSL authentication, follow these steps:- MySQL client: Add the option
--ssl-mode=DISABLED. - JDBC: Remove
useSSL=trueandverifyServerCertificate=false.
LDAP authentication
See Authentication methods for detailed instructions on enabling LDAP authentication. For JDBC connections, since the database supports SSL authentication, you do not need to customizeAuthPlugin. You can use the built-in MysqlClearPasswordPlugin.
-
When using JDBC 5 with LDAP authentication, configure the following settings:
-
When using JDBC 8 with LDAP authentication, configure the following settings: