SQL window specifications

更新时间:
复制 MD 格式

Background information

After a system administrator grants a user the permission to manage development specifications, the user can manage SQL window specifications in the Security Specifications Environment.

When a user executes SQL statements in the SQL window, OceanBase Developer Center (ODC) checks the statements against the configured SQL window specifications.

This topic describes how to edit and enforce SQL window specifications.

How it works

image.png

Execution flow

image.png

  1. An ODC system administrator uses the configuration template provided by ODC to create an SQL audit integration. The administrator enables the integration and sets the API information to access the external SQL audit system.

  2. The ODC system administrator sets the SQL window specifications to reference the SQL audit integration.

  3. When an ODC user runs an SQL statement in the SQL window, ODC calls the API of the external SQL audit system to request an SQL check if the audit integration is enabled.

Prerequisites

Users with operation permissions on development specifications.

Procedure

Example: After you edit and enable the Allowed SQL types for SQL window rule in the staging environment, editing and executing a SELECT statement triggers a specification check.

Item

Example value

Project name

odc_4.2.0

Data source

mysql_4.2.0

Database name

odc_test

Table name

employee

  1. Log on to the web-based ODC. In the Project Collaboration window, click Security Specifications > Environment > Staging > SQL Window Specifications.

  2. On the SQL Window Specifications tab, edit the rule named Allowed SQL types for SQL window.

  3. Click Submit to save the changes.

    image

  4. On the SQL Check Specifications tab, enable the Allowed SQL types for SQL window rule.

  5. In the Project Collaboration window, click Projects > All Projects > odc_4.2.0.

    image.png

  6. Click a database to log on. The SQL Development window opens.

    image.png

  7. In the SQL window, enter a SQL statement to query the employee table, and click Run (F8) to run all statements in the window.

    image.png

    SELECT `emp_no`, `birthday`, `name` FROM `employee`;
    

References