OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Developer Center

V4.5.0
  • Topics Overview
  • Overview
    • What is ODC?
    • Features
    • Architecture
    • Limitations
    • ODC console
  • Quick Start
    • Client ODC
      • Overview
      • Install Client ODC
      • Use Client ODC
    • Web ODC
      • Overview
      • Deploy Web ODC
      • Use Web ODC
  • Data Source Management
    • Create a data source
    • Data sources and project collaboration
    • Database O&M
      • Session management
      • Global variable management
      • Recycle bin management
  • SQL Development
    • Edit and execute SQL statements
    • Perform PL compilation and debugging
    • Use the command-line window
    • Edit and export the result set
    • Execution Analysis
    • Generate test data
    • System settings
    • Intelligent SQL development
    • Common features
    • Database objects
      • Table objects
        • Overview
        • Create a table
      • View objects
        • Overview
        • Create a view
        • Manage views
      • Materialized view objects
        • Overview
        • Create a materialized view
        • Manage materialized views
      • Function objects
        • Overview
        • Create a function
        • Manage functions
      • Stored procedure objects
        • Overview
        • Create a stored procedure
        • Manage stored procedures
      • Sequence objects
        • Overview
        • Create a sequence
        • Manage sequences
      • Package objects
        • Overview
        • Create a program package
        • Manage program packages
      • Trigger objects
        • Overview
        • Create a trigger
        • Manage triggers
      • Type objects
        • Overview
        • Create a type
        • Manage types
      • Synonym objects
        • Overview
        • Create a synonym
        • Manage synonyms
      • External resource objects
        • External resources
        • Create an external resource
        • Manage external resources
  • Database Change Risk Management
    • Project collaborative management
      • Project management
      • Manage databases
      • Manage logical databases
      • Add object storage files
      • Manage project members
      • Desensitize data
      • Notification management
        • Overview
        • View notification records
        • Manage notification channels
          • Create a notification channel
          • View, edit, and delete a notification channel
          • Configure a custom channel
        • Manage notification rules
    • Manage user permissions
      • Users and roles
      • Automatic authorization
      • Apply for project permissions
      • Apply for database permissions
      • Apply table/view permissions
    • Security standards
      • Environment configuration
        • SQL check specifications
        • SQL window specification
      • Risk Management
        • Overview
        • Manage risk identification rules
        • Manage approval processes
      • Desensitization algorithms
      • Operation audit
  • Ticket Management
    • Import schemas and data
    • Export schemas and data
    • Database change management
    • Manage changes to logical databases
    • Batch database change management
    • Online schema changes
    • Synchronize shadow tables
    • Schema comparison
  • Data Lifecycle Management
    • Data archiving
    • Data cleanup
    • Manage partitioning plans
      • Manage partitioning plans
      • Set partitioning strategies
      • Examples of partitioning strategies
    • SQL Plan
  • System Integration
    • Login integration
    • Approval integration
    • SQL approval integration
    • Bastion host integration
    • Integrate with LLMs
  • Deployment Guide
    • Deployment overview
    • Preparations before deployment
    • Deploy ODC in single-node mode
    • Deploy ODC in high-availability mode
    • Deployment verification
  • Upgrade Guide
    • Upgrade Overview
    • Preparations for upgrade
    • Update single-node ODC
    • Update high-avaliability ODC
    • Upgrade verification
    • Rollback after upgrade failed
  • Best Practices
    • Tips for SQL development
    • Explore ODC team workspaces
    • Understanding real-time SQL diagnostics for OceanBase AP
    • OceanBase historical database solutions
    • ODC SQL check for automatic identification of high-risk operations
    • Integration with ODC enterprise-level account system
    • Manage and modify sharded databases and tables via ODC
    • Data masking and control practices
    • Enterprise-level control and collaboration: Safeguard every database change
  • Troubleshooting
    • ODC troubleshooting process
    • Collect message
      • View the runtime environment and version information
      • View web ODC logs
      • View client ODC logs
      • View end-to-end ODC-related logs
      • View ODC MetaDB data
      • Query the index status in OceanBase Database V4.x
      • Query the index status in OceanBase Database V1.4.x to V3.2.x
      • Collect JVM runtime information
      • Use tcpdump to capture packets
    • FAQ
      • Installation of client ODC
      • Web ODC deployment and startup
      • Connection Information
      • Command-line window
      • DDL statement display
  • Release Notes
    • V4.5
      • ODC V4.5.0
    • V4.4
      • ODC V4.4.0
      • ODC V4.4.1
      • ODC V4.4.2
      • ODC V4.4.3
    • V4.3
      • ODC V4.3.4
      • ODC V4.3.3
      • ODC V4.3.2
      • ODC V4.3.1
      • ODC V4.3.0
    • V4.2
      • ODC V4.2.4
      • ODC V4.2.3
      • ODC V4.2.2
      • ODC V4.2.1
      • ODC V4.2.0
    • V4.1
      • ODC V4.1.3
      • ODC V4.1.2
      • ODC V4.1.1
      • ODC V4.1.0
    • V4.0
      • ODC V4.0.2
      • ODC V4.0.0
    • V3.4
      • ODC V3.4.0
    • V3.3
      • ODC V3.3.3
      • ODC V3.3.2
      • ODC V3.3.1
      • ODC V3.3.0
    • V3.2
      • ODC V3.2.3
      • ODC V3.2.2
      • ODC V3.2.1
      • ODC V3.2.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Developer Center
  3. V4.5.0

SQL approval integration

Last Updated:2026-09-03 09:11:30

Background information
Execution process
Configuration
Configuration method
Configuration template
Prerequisites
Create SQL approval integration
Manage SQL approval integration configurations
References

Background information

ODC V4.2.0 has a built-in SQL check process that implements database security control in team collaboration scenarios. The SQL check specifications are environment specific. That is, the data sources in the same environment are checked against the same set of SQL check specifications.

ODC V4.2.0 allows system administrators and users with external integration management permissions to configure integrations with external SQL review systems. You can reference the integration of an external SQL approval system on the SQL window specification tab. If the integration of the external SQL approval system is enabled on the SQL window specification tab, ODC calls APIs of the external SQL approval system for SQL statement check when SQL statements are executed in the SQL window.

This topic describes how to configure and manage SQL approval integration.

Execution process

1

  1. The ODC system administrator enables SQL approval integration and sets the API information for accessing the external SQL approval system based on the configuration template provided by ODC, and creates the SQL approval integration configuration.

  2. The ODC system administrator enables SQL approval integration on the SQL window specification tab.

  3. An ODC user executes an SQL statement in the SQL window. ODC calls the API of the external SQL approval system to initiate an SQL check request.

Configuration

Configuration method

Level-1 parameter
Level-2 parameter
Level-3 parameter
Level-4 parameter
Type
Default value
Description
http connectTimeoutSeconds - - Integer 5 The connection timeout period of the HTTP request. Unit: seconds.
http socketTimeoutSeconds - - Integer 30 The socket timeout period of the HTTP request. Unit: seconds.
api check (used to initiate an SQL check request to the external SQL review system) method - Enum POST The HTTP request method. Valid values: GET, POST, PUT, and PATCH.
api check (used to initiate an SQL check request to the external SQL review system) url - String <NULL> The HTTP request address.
api check (used to initiate an SQL check request to the external SQL review system) headers - Map<String, String> <NULL> The HTTP request header.
api check (used to initiate an SQL check request to the external SQL review system) queryParameters - Map<String, String> <NULL> The HTTP request parameter.
api check (used to initiate an SQL check request to the external SQL review system) body type ENUM <NULL> The format of the HTTP request body. Valid value: FORM_DATA.
api check (used to initiate an SQL check request to the external SQL review system) body content Object <NULL> The content of the HTTP request body.
api check (used to initiate an SQL check request to the external SQL review system) requestEncrypted - Boolean false Specifies whether the HTTP request body is encrypted.
api check (used to initiate an SQL check request to the external SQL review system) requestSuccessExpression - String <NULL> An expression that parses the response body and determines whether a request is successfully executed. The expression conforms to the SPEL syntax specification.
api check (used to initiate an SQL check request to the external SQL review system) inWhiteListExpression - String <NULL> An expression that parses the response body and determines whether the SQL statement to be executed is in the allowlist. The expression conforms to the Spring Expression Language (SPEL) syntax specification.
api check (used to initiate an SQL check request to the external SQL review system) inBlackListExpression - String <NULL> An expression that parses the response body and determines whether the SQL statement to be executed is in the blocklist. The expression conforms to the SpEL syntax specification.
api check (used to initiate an SQL check request to the external SQL review system) needReviewExpression - String <NULL> An expression that parses the response body and determines whether the SQL statement needs to be approved for execution. The expression conforms to the SpEL syntax specification.
api check (used to initiate an SQL check request to the external SQL review system) responseEncrypted - Boolean false Specifies whether the HTTP response body is encrypted.

Configuration template

# This is a template for integrating a custom SQL interceptor system.
# You must fill in the required fields according to the requirements to adapt to your SQL interceptor system.


# HTTP configurations
http:
  # HTTP connection timeout in seconds
  connectTimeoutSeconds: 5
  # HTTP socket timeout in seconds
  socketTimeoutSeconds: 30

# API configurations
api:
  # API configurations used to check the SQL content
  check:
    # The request method. Valid values: GET, POST, PUT, and PATCH.
    method: ~
    # Request URI
    url: ~
    # The request header in the <key: value> format.
    headers:
      # Sample of request headers
      Content-Type: application/json;charset=UTF-8
      Accept: application/json
    # Request query parameters in the <key: value> format.
    queryParameters: ~
    # Request body
    body:
      # The type of request body. Valid values: FORM_DATA and RAW.
      type: RAW
      # The content of request body in the <String> or <key: value> format. <String> is supported for the RAW type and <key: value> is supported for the FORM_DATA type.
      # Sample of request content in the RAW type
      content: |-
        {
          "sqlStatement":"${sql.content}"
        }
    # Mark whether the request body is encrypted
    requestEncrypted: false
    # Expression to judge whether the request is successful based on the response body analysis, using the SPEL syntax
    requestSuccessExpression: '[resultCode] == 0'
    # Mark whether the response body is encrypted
    responseEncrypted: false
    # Expression to judge whether the SQL to be executed is in the allowlist based on the response body analysis, using the SPEL syntax
    inWhiteListExpression: '[checkResult] == 1'
    # Expression to judge whether the SQL to be executed is in the blocklist based on the response body analysis, using the SPEL syntax
    inBlackListExpression: '[checkResult] == 2'
    # Expression to judge whether the SQL to be executed need review based on the response body analysis, using the SPEL syntax
    needReviewExpression: '[checkResult] == 3'

Prerequisites

You are the system administrator or have the external integration management permissions.

Create SQL approval integration

  1. In the project collaboration window, choose External Integration > SQL Approval Integration > Create SQL Approval Integration.

  2. In the Create Approval Integration panel, specify the following parameters.

    Parameter
    Description
    Name The name of the SQL approval integration configuration.
    Status Specifies whether to enable the SQL approval integration configuration.
    Settings Edit the YAML file online to configure approval integration. For more information, see Configuration.
  3. Click Save. The SQL approval integration configuration is created.

  4. In the SQL approval integration list, you can enable, view, edit, and delete the SQL approval integration settings.

  5. Reference the SQL approval integration configuration on the SQL window specification tab.

Manage SQL approval integration configurations

In the SQL approval integration list, click View, Edit, or Delete in the Actions column to view, edit, or delete information about the SQL approval integration configuration.

References

  • SQL window specification

  • Approval integration

  • Risk management

Previous topic

Approval integration
Last

Next topic

Bastion host integration
Next
on this page
Background information
Execution process
Configuration
Configuration method
Configuration template
Prerequisites
Create SQL approval integration
Manage SQL approval integration configurations
References