access_control_improvements
| Setting | Description | Default |
|---|---|---|
on_cluster_queries_require_cluster_grant | 设置 ON CLUSTER 查询是否需要 CLUSTER 授权。 | true |
role_cache_expiration_time_seconds | 设置角色在上次访问后可在 Role Cache 中保留的秒数。 | 600 |
select_from_information_schema_requires_grant | 设置 SELECT * FROM information_schema.<table> 是否需要授权,或者是否允许任意用户执行。如果设置为 true,则该查询需要 GRANT SELECT ON information_schema.<table>,与普通表相同。 | true |
select_from_system_db_requires_grant | 设置 SELECT * FROM system.<table> 是否需要授权,或者是否允许任意用户执行。如果设置为 true,则该查询需要 GRANT SELECT ON system.<table>,与非系统表相同。例外情况:少数系统表 (tables、columns、databases,以及 one、contributors 等常量表) 仍然对所有人开放;此外,如果已授予 SHOW 权限 (例如 SHOW USERS) ,则对应的系统表 (即 system.users) 也可访问。 | true |
settings_constraints_replace_previous | 设置 settings profile 中某个配置项的约束是否会覆盖该配置项之前的约束 (定义在其他 profile 中) ,包括新约束中未设置的字段。它还会启用 changeable_in_readonly 约束类型。 | true |
table_engines_require_grant | 设置使用特定表引擎创建表时是否需要授权。ClickHouse Cloud 不支持此功能。 | false |
throw_on_unmatched_row_policies | 设置在从表中读取数据时,如果该表存在行策略但没有任何一条适用于当前用户,是否应抛出异常。 | false |
users_without_row_policies_can_read_rows | 设置没有宽松行策略的用户是否仍可通过 SELECT 查询读取行。例如,如果有两个用户 A 和 B,且只为 A 定义了行策略,那么当此设置为 true 时,用户 B 将看到所有行;如果此设置为 false,用户 B 将看不到任何行。 | true |
<access_control_improvements>
<throw_on_unmatched_row_policies>true</throw_on_unmatched_row_policies>
<users_without_row_policies_can_read_rows>true</users_without_row_policies_can_read_rows>
<on_cluster_queries_require_cluster_grant>true</on_cluster_queries_require_cluster_grant>
<select_from_system_db_requires_grant>true</select_from_system_db_requires_grant>
<select_from_information_schema_requires_grant>true</select_from_information_schema_requires_grant>
<settings_constraints_replace_previous>true</settings_constraints_replace_previous>
<table_engines_require_grant>false</table_engines_require_grant>
<role_cache_expiration_time_seconds>600</role_cache_expiration_time_seconds>
</access_control_improvements>