The access control feature prevents unauthorized users from accessing database data through permission and functional design. In terms of permission design, OceanBase AI Database ensures account security by setting different authentication policies for users or roles. You can grant and manage different permissions and roles for users as needed. In terms of functional design, OceanBase AI Database ensures secure database access by using allowlists.
Permission management
Permissions are classified by scope into global, database, and object (such as table) levels. In addition, more granular access control can be applied to specified columns or rows in a table by using different mechanisms:
Type |
Object |
Mechanism overview |
|---|---|---|
| Column privileges | Columns in a table | Still belongs to the GRANT/REVOKE privilege system and is granted or revoked by using priv(column_name). It is not a separate object type. |
| Row-level access control (RLS) | Rows in a table | Adds filters on top of existing object privileges by using policies. For more information, see the following sections. |
Column privileges
Column privileges restrict user operations on specified columns of a table (for example, allowing only read or write access to specified columns), providing finer granularity than table-level object privileges. Granting, viewing, and revoking column privileges still use statements and views related to privilege management. For more information, see:
- Granting: Column privilege description in Grant privileges directly
- Viewing: Column privileges and the
COLUMN_PRIVILEGESview in View user privileges - Revoking: Revoking column privileges in Revoke privileges
For information about granting and viewing column privileges in role scenarios, see Role management overview.
Row privileges
In addition to object privileges, you can restrict readable and writable data on a row basis. For more information, see Row-level security.
Network security access control
OceanBase AI Database provides an allowlist policy to achieve network security access control. You can use the tenant allowlist feature to set which clients are allowed to access the current tenant.
For more information about how to set an allowlist, see Network security access control.