Note
This view is available starting with V4.3.5 BP3.
Purpose
This view displays the definitions and attributes of all sensitive rules in all tenants.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | int(20) | NO | The tenant ID. |
| RULE_NAME | varchar(256) | NO | The name of the sensitive rule. |
| PROTECTION_POLICY | varchar(16) | NO | The protection policy. Valid values: ENCRYPTION, MASKING, and INVALID. ENCRYPTION indicates encryption protection. MASKING indicates masking protection. INVALID indicates invalid. |
| METHOD | varchar(4096) | NO | The encryption method. Valid values: |
| ENABLED | varchar(3) | NO | Indicates whether the rule is enabled. Valid values: YES and NO. YES indicates that the rule is enabled. NO indicates that the rule is disabled. |
The value of METHOD can be one of the following:
| Value (used in SQL syntax) | Encryption algorithm | Key length | Mode | Description |
|---|---|---|---|---|
| aes-256 | AES-256-ECB | 256 bits | ECB | The default algorithm |
| aes-128 | AES-128-ECB | 128 bits | ECB | |
| aes-192 | AES-192-ECB | 192 bits | ECB | |
| aes-128-gcm | AES-128-GCM | 128 bits | GCM | High security level. Provides authenticated encryption (AEAD). |
| aes-192-gcm | AES-192-GCM | 192 bits | GCM | High security level. Provides authenticated encryption (AEAD). |
| aes-256-gcm | AES-256-GCM | 256 bits | GCM | High security level. Provides authenticated encryption (AEAD). |
| sm4-cbc | SM4-CBC | CBC | High security level. | |
| sm4-gcm | SM4-GCM | GCM | High security level. Provides authenticated encryption (AEAD). |
Sample query
Query the definitions and attributes of all sensitive rules in all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_SENSITIVE_RULES;
The query result is as follows:
+-----------+-----------+-------------------+---------+---------+
| TENANT_ID | RULE_NAME | PROTECTION_POLICY | METHOD | ENABLED |
+-----------+-----------+-------------------+---------+---------+
| 1 | r1 | ENCRYPTION | aes-256 | YES |
+-----------+-----------+-------------------+---------+---------+
1 row in set