2021-09-19 22:38:53 +00:00
|
|
|
<clickhouse>
|
2021-08-17 02:01:03 +00:00
|
|
|
<!-- See also the files in users.d directory where the settings can be overridden. -->
|
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- Profiles of settings. -->
|
2016-02-07 21:58:58 +00:00
|
|
|
<profiles>
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- Default settings. -->
|
2016-02-07 21:58:58 +00:00
|
|
|
<default>
|
|
|
|
</default>
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- Profile that allows only read queries. -->
|
2016-02-07 21:58:58 +00:00
|
|
|
<readonly>
|
|
|
|
<readonly>1</readonly>
|
|
|
|
</readonly>
|
|
|
|
</profiles>
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- Users and ACL. -->
|
2016-02-07 21:58:58 +00:00
|
|
|
<users>
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- If user name was not specified, 'default' user is used. -->
|
2016-02-07 21:58:58 +00:00
|
|
|
<default>
|
2021-08-17 02:01:03 +00:00
|
|
|
<!-- See also the files in users.d directory where the password can be overridden.
|
|
|
|
|
|
|
|
Password could be specified in plaintext or in SHA256 (in hex format).
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
If you want to specify password in plaintext (not recommended), place it in 'password' element.
|
|
|
|
Example: <password>qwerty</password>.
|
|
|
|
Password could be empty.
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
If you want to specify SHA256, place it in 'password_sha256_hex' element.
|
|
|
|
Example: <password_sha256_hex>65e84be33532fb784c48129675f9eff3a682b27168c0ea744b2cf58ee02337c5</password_sha256_hex>
|
2019-07-28 13:12:26 +00:00
|
|
|
Restrictions of SHA256: impossibility to connect to ClickHouse using MySQL JS client (as of July 2019).
|
|
|
|
|
|
|
|
If you want to specify double SHA1, place it in 'password_double_sha1_hex' element.
|
|
|
|
Example: <password_double_sha1_hex>e395796d6546b1b65db9d665cd43f0e858dd4303</password_double_sha1_hex>
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2021-03-11 20:41:10 +00:00
|
|
|
If you want to specify a previously defined LDAP server (see 'ldap_servers' in the main config) for authentication,
|
|
|
|
place its name in 'server' element inside 'ldap' element.
|
2020-05-27 21:06:33 +00:00
|
|
|
Example: <ldap><server>my_ldap_server</server></ldap>
|
|
|
|
|
2021-03-11 20:41:10 +00:00
|
|
|
If you want to authenticate the user via Kerberos (assuming Kerberos is enabled, see 'kerberos' in the main config),
|
|
|
|
place 'kerberos' element instead of 'password' (and similar) elements.
|
|
|
|
The name part of the canonical principal name of the initiator must match the user name for authentication to succeed.
|
|
|
|
You can also place 'realm' element inside 'kerberos' element to further restrict authentication to only those requests
|
2021-08-17 02:01:03 +00:00
|
|
|
whose initiator's realm matches it.
|
2021-03-11 20:41:10 +00:00
|
|
|
Example: <kerberos />
|
|
|
|
Example: <kerberos><realm>EXAMPLE.COM</realm></kerberos>
|
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
How to generate decent password:
|
|
|
|
Execute: PASSWORD=$(base64 < /dev/urandom | head -c8); echo "$PASSWORD"; echo -n "$PASSWORD" | sha256sum | tr -d '-'
|
|
|
|
In first line will be password and in second - corresponding SHA256.
|
2019-07-28 13:12:26 +00:00
|
|
|
|
|
|
|
How to generate double SHA1:
|
2020-01-21 22:38:20 +00:00
|
|
|
Execute: PASSWORD=$(base64 < /dev/urandom | head -c8); echo "$PASSWORD"; echo -n "$PASSWORD" | sha1sum | tr -d '-' | xxd -r -p | sha1sum | tr -d '-'
|
2019-07-28 13:12:26 +00:00
|
|
|
In first line will be password and in second - corresponding double SHA1.
|
2016-02-07 21:58:58 +00:00
|
|
|
-->
|
|
|
|
<password></password>
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- List of networks with open access.
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
To open access from everywhere, specify:
|
2016-05-18 05:07:41 +00:00
|
|
|
<ip>::/0</ip>
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
To open access only from localhost, specify:
|
2016-05-18 05:07:41 +00:00
|
|
|
<ip>::1</ip>
|
|
|
|
<ip>127.0.0.1</ip>
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
Each element of list has one of the following forms:
|
2018-07-13 13:45:58 +00:00
|
|
|
<ip> IP-address or network mask. Examples: 213.180.204.3 or 10.0.0.1/8 or 10.0.0.1/255.255.255.0
|
2018-11-23 15:56:20 +00:00
|
|
|
2a02:6b8::3 or 2a02:6b8::3/64 or 2a02:6b8::3/ffff:ffff:ffff:ffff::.
|
2022-04-02 23:21:48 +00:00
|
|
|
<host> Hostname. Example: server01.clickhouse.com.
|
2016-05-22 01:45:30 +00:00
|
|
|
To check access, DNS query is performed, and all received addresses compared to peer address.
|
2022-04-02 23:21:48 +00:00
|
|
|
<host_regexp> Regular expression for host names. Example, ^server\d\d-\d\d-\d\.clickhouse\.com$
|
2016-05-22 01:45:30 +00:00
|
|
|
To check access, DNS PTR query is performed for peer address and then regexp is applied.
|
|
|
|
Then, for result of PTR query, another DNS query is performed and all received addresses compared to peer address.
|
|
|
|
Strongly recommended that regexp is ends with $
|
|
|
|
All results of DNS requests are cached till server restart.
|
2016-02-07 21:58:58 +00:00
|
|
|
-->
|
2021-01-04 18:01:17 +00:00
|
|
|
<networks>
|
2016-05-18 05:07:41 +00:00
|
|
|
<ip>::/0</ip>
|
2016-02-07 21:58:58 +00:00
|
|
|
</networks>
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- Settings profile for user. -->
|
2016-02-07 21:58:58 +00:00
|
|
|
<profile>default</profile>
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- Quota for user. -->
|
2016-02-07 21:58:58 +00:00
|
|
|
<quota>default</quota>
|
2020-04-06 08:06:17 +00:00
|
|
|
|
|
|
|
<!-- User can create other users and grant rights to them. -->
|
|
|
|
<!-- <access_management>1</access_management> -->
|
2023-11-08 00:01:42 +00:00
|
|
|
|
|
|
|
<!-- User permissions can be granted here -->
|
|
|
|
<!--
|
|
|
|
<grants>
|
|
|
|
<query>GRANT ALL ON *.*</query>
|
|
|
|
</grants>
|
|
|
|
-->
|
2016-02-07 21:58:58 +00:00
|
|
|
</default>
|
|
|
|
</users>
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- Quotas. -->
|
2016-02-07 21:58:58 +00:00
|
|
|
<quotas>
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- Name of quota. -->
|
2016-02-07 21:58:58 +00:00
|
|
|
<default>
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- Limits for time interval. You could specify many intervals with different limits. -->
|
2016-02-07 21:58:58 +00:00
|
|
|
<interval>
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- Length of interval. -->
|
2016-02-07 21:58:58 +00:00
|
|
|
<duration>3600</duration>
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2016-05-22 01:45:30 +00:00
|
|
|
<!-- No limits. Just calculate resource usage for time interval. -->
|
2016-02-07 21:58:58 +00:00
|
|
|
<queries>0</queries>
|
|
|
|
<errors>0</errors>
|
|
|
|
<result_rows>0</result_rows>
|
|
|
|
<read_rows>0</read_rows>
|
|
|
|
<execution_time>0</execution_time>
|
|
|
|
</interval>
|
|
|
|
</default>
|
|
|
|
</quotas>
|
2021-09-19 22:38:53 +00:00
|
|
|
</clickhouse>
|