Column-Level Security
Column-level access control enables fine-grained management of database user permissions at the level of individual columns within tables. Users can be granted access to specific columns while restricting access to others. Below is a detailed guide on how to use Tacnode’s column-level access control.
Supported operation types for column-level permissions:
SELECT | Controls data read access |
UPDATE | Controls data modification access. Permissions checked on UPDATE, INSERT, COPY, INSERT ON CONFLICT, MERGE |
Column-level permissions apply to TABLE, VIEW, and MATERIALIZED VIEW objects.
Overview
In Tacnode, the GRANT
and REVOKE
commands can be used to manage column-level permissions, allowing or restricting a user’s ability to query (SELECT
) or modify (UPDATE
) specific columns.
Grant column-level permissions
Revoke column-level permissions
Usage Example
Scenario: Create an employees
table and set up column-level permissions
-
Create table
-
Insert data
-
Create regular user
-
Grant
SELECT
privilege onname
anddepartment
only -
Testing user permissions Log in as the normal user and test queries:
-
Revoke specific access
Notes
-
Column-level permissions have the following restrictions:
INSERT
andDELETE
are always controlled by table-level privileges.- Partitioned child tables do not inherit column-level privileges automatically; permissions must be set explicitly on each partition.
- Foreign key constraints do not inherit column-level privileges and might expose certain column data. Additional REFERENCE privilege is required.
-
Privilege precedence:
- If permission rules conflict, "deny" permissions override "grant" permissions.
-
Granting permission on the full table, for example:
– allows the user to access all columns and overrides any column-level restrictions.