OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V3.2.4Enterprise Edition

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & Certification
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V3.2.4
    iconOceanBase Database
    SQL - V 3.2.4Enterprise Edition
    SQL
    KV
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    Data transmission encryption

    Last Updated:2023-10-24 09:23:03  Updated
    share
    What is on this page
    Supported methods for loading private keys or certificates
    Enable transmission encryption
    Check whether transmission encryption is enabled for an OBServer
    Check whether SSL is enabled on the MySQL port
    Check whether SSL is enabled on the RPC port

    folded

    share

    Transport Layer Security (TLS) is a cryptographic protocol that provides end-to-end communications security over networks. In addition to TCP, OceanBase Database also supports the Secure Sockets Layer (SSL) and TLS protocols to implement communication encryption.

    The following figure shows the architecture of OceanBase Database, which consists of three parts.

    Transmission encryption

    The three parts communicate over the following two protocols:

    • MySQL protocol: The data link layer communicates with the driver layer and the database layer over the extended MySQL protocol.

    • OB-RPC protocol: This is an RPC protocol for the communication between OBServers, and the communication between OBServers and liboblog and ob_admin.

    The data link layer and the database components, such as OBServer, liboblog, and ob_admin, all support SSL/TLS encrypted communication. The communication depends on OpenSSL or a third-party SSL library to enable secure and encrypted data transmission.

    Supported methods for loading private keys or certificates

    The communication between OBServers, liboblog, and ob_admin depends on the libeasy library. Therefore, they all support the following two methods for loading private keys and certificates: the local file mode and the BKMI mode.

    • Local file mode

      CA certificates, user certificates, and private keys are stored in the wallet/ directory and are loaded based on the configuration. This mode is not secure.

    • BKMI mode

      The basic key management infrastructure (BKMI) serves as a warehouse in which keys and certificates are generated and hosted. BKMI assigns the application identity private key and identity information to a user such as an OBServer. When the user needs to load a private key, it uses an URL to access the BKMI, obtains the encrypted private key from BKMI, and then uses the application identity private key to decrypt the application private key and load the configuration. This mode is highly secure.

    Enable transmission encryption

    You can perform the following steps to enable transmission encryption for an OBServer:

    1. Specify the method for loading the private key, user certificate, or CA certificate.

      To use the local file mode, run the following command:

      alter system set ssl_external_kms_info = '
      {
      "ssl_mode":"file"
      }';
      

      or

      alter system set ssl_external_kms_info = '';
      

      To use the BKMI mode, run the following command:

      alter system set ssl_external_kms_info = '
      {
      "ssl_mode":"bkmi",
      "kms_host":"http://xxx", the url of the BKMI main site.
      "root_cert": the content of the CA certificate.
      "private_key": the application identity private key that BKMI provides for the user to decrypt the encrypted application private key, which is also obtained from BKMI.
      "PRIVATE_KEY_PHRASE":"123456", the password used to decrypt the application identity private key that BKMI assigns to the user.
      "SCENE":"ANT", the scenario.
      "CALLER":"xxx", the username that is assigned by BKMI to call the service.
      "CERT_NAME":"xxx", the name of the user certificate.
      "PRIVATE_KEY_NAME":"xxx", the name of the user private key.
      "KEY_VERSION":"1"
      }';
      
    2. Configure the corresponding SSL-enabled protocol.

      alter system set ssl_client_authentication = 'TRUE';
      SSL is enabled for MySQL communication when the parameter is set to TRUE.
      
    3. Configure an SSL allowlist for RPC communication. The TCP connections between OBServers are persistent connections. To enable SSL-encrypted RPC communication, restart the OBServers.

      An allowlist is required to enable SSL-encrypted RPC communication.
      alter system set _ob_ssl_invited_nodes='ALL'; Enable SSL for the entire cluster.
      alter system set _ob_ssl_invited_nodes='123.12.21.12, 128.191.11.12'; Enable SSL only for OBServers of the specified IP addresses.
      

    Check whether transmission encryption is enabled for an OBServer

    The most straightforward approach is to capture packets from the MySQL and RPC ports of the OBServer to check whether the packets are encrypted. You can also use the following method:

    • Use the SYS tenant account to log on to the OBServer from OBClient or a MySQL client and query the ssl_key_expired_time field of the oceanbase.__all_virtual_server_stat table to check whether SSL is enabled.

    • This field records the expiration time of the SSL certificate used by the current OBServer when SSL is enabled. The time is displayed in UTC in microseconds.

      obclient> select svr_ip, svr_port,zone, ssl_key_expired_time, from_unixtime(ssl_key_expired_time/1000000) from oceanbase.__all_virtual_server_stat;
      +--------------+----------+-------+----------------------+---------------------------------------------+
      | svr_ip       | svr_port | zone  | ssl_key_expired_time | from_unixtime(ssl_key_expired_time/1000000) |
      +--------------+----------+-------+----------------------+---------------------------------------------+
      | xx.xx.xx.xx |    13212 | zone1 |           1871860075 | 2029-04-26 09:07:55                         |
      +--------------+----------+-------+----------------------+---------------------------------------------+
      1 row in set (0.00 sec)
      

    Check whether SSL is enabled on the MySQL port

    Log on to an OBServer from OBClient or a MySQL client and run the \s command to view the SSL field, as shown in the following example:

    obclient> \s
    --------------
    obclient  Ver 1.1.8 Distrib 5.7.24, for Linux (x86_64) using  EditLine wrapper
    
    Connection id:  3221506046
    Current database: test
    Current user:  root@11.166.79.39
    SSL:   Cipher in use is DHE-RSA-AES128-GCM-SHA256
    Current pager:  less
    Using outfile:  ''
    Using delimiter: ;
    Server version:  5.7.25 OceanBase 2.2.60 (r1-63cbd3084a3283523f09d6ba20795f77b95e046b) (Built Jun 30 2020 10:10:29)
    Protocol version: 10
    Connection:  xx.xx.xx.xx via TCP/IP
    Server characterset: utf8mb4
    Db     characterset: utf8mb4
    Client characterset: utf8mb4
    Conn.  characterset: utf8mb4
    TCP port:  13213
    Active   --------------
    

    Check whether SSL is enabled on the RPC port

    Open the OBServer.log file, search for "rpc connection accept", and then check the value of use_ssl. If the value is True, SSL is enabled for RPC communication. Otherwise, SSL is disabled.

    Previous topic

    Access control
    Last

    Next topic

    Data storage encryption
    Next
    What is on this page
    Supported methods for loading private keys or certificates
    Enable transmission encryption
    Check whether transmission encryption is enabled for an OBServer
    Check whether SSL is enabled on the MySQL port
    Check whether SSL is enabled on the RPC port