Skip to main content
Version: V1.4.1

Transport encryption in seekdb

seekdb V1.4.0 supports TLS for MySQL client connections and mutual TLS for RPC communication between primary and standby instances. Both connection types use the same wallet directory, but use different certificate filenames and configuration switches.

Configure TLS for MySQL client connections​

  1. Create a wallet directory in the seekdb working directory and add the following files:

    FilePurpose
    wallet/ca.pemThe CA certificate that issued the server certificate.
    wallet/server-cert.pemThe seekdb server certificate.
    wallet/server-key.pemThe private key that matches the server certificate.

    Restrict the private key so that only the seekdb operating-system user can read it:

    chmod 600 wallet/server-key.pem
    chmod 644 wallet/ca.pem wallet/server-cert.pem
  2. Connect to seekdb, set the minimum allowed TLS version, and enable TLS for client connections:

    ALTER SYSTEM SET sql_protocol_min_tls_version = 'TLSv1.2';
    ALTER SYSTEM SET ssl_client_authentication = TRUE;

    sql_protocol_min_tls_version supports none, TLSv1, TLSv1.1, TLSv1.2, and TLSv1.3. In production, select the minimum version according to your security policy.

  3. Restart the seekdb instance for the configuration to take effect. The MySQL listener loads the TLS switch, certificates, and minimum TLS version only at instance startup. Changing the configuration items without a restart does not change the TLS state of the current listener.

  4. Reconnect with a TLS-capable MySQL client and execute STATUS (or \s). Verify that the SSL field shows the cipher suite in use.

Configure mutual TLS for primary/standby RPC​

Primary/standby RPC uses the following files:

  • wallet/ca.pem
  • wallet/cert.pem
  • wallet/key.pem

Install certificates issued by the same CA on the primary and standby, and then execute:

ALTER SYSTEM SET enable_rpc_tls = TRUE;

enable_rpc_tls is a static configuration item. Both instances must be restarted before they use the new configuration. For the complete procedure and verification method, see Network security authentication between primary and standby instances.

Verify certificate status​

Use the public view to inspect RPC certificate expiration times:

SELECT SVR_IP, SVR_PORT, RPC_CERT_EXPIRE_TIME
FROM oceanbase.V$OB_SERVER_STAT;

RPC_CERT_EXPIRE_TIME is a timestamp. It is NULL when RPC TLS is not enabled. You can also inspect the configuration values:

SHOW PARAMETERS LIKE 'enable_rpc_tls';
SHOW PARAMETERS LIKE 'ssl_client_authentication';
SHOW PARAMETERS LIKE 'sql_protocol_min_tls_version';

Log location​

The seekdb process writes both standard output and standard error to log/seekdb.log under its working directory. If TLS startup or a handshake fails, first check this file for certificate path, permission, and validation errors.