v.20.1Experimental Feature
Reworked Row Policies in Access Control System
Reworked row policies as a part of access control system. Added new tablesystem.row_policies, new functioncurrentRowPolicies(), new SQL syntaxCREATE POLICY,ALTER POLICY,DROP POLICY,SHOW CREATE POLICY,SHOW POLICIES. #7808 (Vitaly Baranov)
Why it matters
To improve and modernize the row-level access control system in ClickHouse. This update addresses the need for clearer, standardized, and more manageable row policy administration, enabling users to define, modify, and inspect row-based data access restrictions efficiently, thereby enhancing security and governance capabilities.How to use it
Users can create, modify, and drop row policies using the new SQL syntax:CREATE POLICY ...
ALTER POLICY ...
DROP POLICY ...
SHOW CREATE POLICY ...
SHOW POLICIES;They can also query the
system.row_policies table to inspect policies and use the currentRowPolicies() function in queries to access the active row policies applied in the current context.