> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# access_control_* 服务器设置

> access_control_* 自动生成分组中的 ClickHouse 服务器设置。

这些设置用于配置 ClickHouse 服务器，由 ClickHouse 源代码自动生成。

## access\_control\_improvements

访问控制系统中可选改进项的设置。

| Setting | Description | Default |
| - | - | - |
| `enable_read_write_grants` | 为 `S3`、`HDFS`、`Kafka` 等外部数据源启用 `READ` 和 `WRITE` 特权的分离。此功能从 25.7 版本开始提供。设置为 `true` 后，可以分别为数据源授予 `READ` 和 `WRITE` 特权，而不必通过单项授权同时授予两者。 | `false` |
| `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` |

示例：

```xml theme={null}
<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>
    <enable_read_write_grants>false</enable_read_write_grants>
</access_control_improvements>
```

## access\_control\_path

ClickHouse 服务器 用于存储由 SQL 命令创建的用户和角色配置的文件夹路径。

**另请参阅**

* [访问控制与账户管理](https://clickhouse.com/docs/zh/concepts/features/security/access-rights.md#access-control-usage)
