Configure SSL in RisingWave
When running a RisingWave serving node, set the environment variablesRW_SSL_CERT and RW_SSL_KEY to specify the paths of the server-side SSL certificate (typically server.crt) and private key (typically server.key).
Enforce SSL connections
Added in v2.7.0
RW_SSL_ENFORCE is false, allowing both SSL and non-SSL connections when SSL is configured.
To require all clients to connect using SSL, set the RW_SSL_ENFORCE environment variable to true. When SSL enforcement is enabled, the server will reject any connection attempts that do not use SSL with error message.
Connect to RisingWave using SSL
To connect to RisingWave using SSL, clients can use thepsql command with the following parameters:
Optional: Create a self-signed certificate for testing purposes
While a self-signed certificate is suitable for testing, it is recommended to obtain a certificate from a Certificate Authority (CA) for production environments.
localhost with the desired Common Name (CN).
localhost.crt and localhost.key. You can then set the paths of these files as the values for RW_SSL_CERT and RW_SSL_KEY respectively.