| 1 |
<?xml version="1.0"?> |
| 2 |
<yandex> |
| 3 |
<!-- Profiles of settings. --> |
| 4 |
<profiles> |
| 5 |
<!-- Default settings. --> |
| 6 |
<default> |
| 7 |
<!-- Maximum memory usage for processing single query, in bytes. --> |
| 8 |
<max_memory_usage>10000000000</max_memory_usage> |
| 9 |
|
| 10 |
<!-- Use cache of uncompressed blocks of data. Meaningful only for processing many of very short queries. --> |
| 11 |
<use_uncompressed_cache>0</use_uncompressed_cache> |
| 12 |
|
| 13 |
<!-- How to choose between replicas during distributed query processing. |
| 14 |
random - choose random replica from set of replicas with minimum number of errors |
| 15 |
nearest_hostname - from set of replicas with minimum number of errors, choose replica |
| 16 |
with minumum number of different symbols between replica's hostname and local hostname |
| 17 |
(Hamming distance). |
| 18 |
in_order - first live replica is choosen in specified order. |
| 19 |
--> |
| 20 |
<load_balancing>random</load_balancing> |
| 21 |
</default> |
| 22 |
|
| 23 |
<!-- Profile that allows only read queries. --> |
| 24 |
<readonly> |
| 25 |
<readonly>1</readonly> |
| 26 |
</readonly> |
| 27 |
</profiles> |
| 28 |
|
| 29 |
<!-- Users and ACL. --> |
| 30 |
<users> |
| 31 |
<!-- If user name was not specified, 'default' user is used. --> |
| 32 |
<default> |
| 33 |
<!-- Password could be specified in plaintext or in SHA256 (in hex format). |
| 34 |
|
| 35 |
If you want to specify password in plaintext (not recommended), place it in 'password' element. |
| 36 |
Example: <password>qwerty</password>. |
| 37 |
Password could be empty. |
| 38 |
|
| 39 |
If you want to specify SHA256, place it in 'password_sha256_hex' element. |
| 40 |
Example: <password_sha256_hex>65e84be33532fb784c48129675f9eff3a682b27168c0ea744b2cf58ee02337c5</password_sha256_hex> |
| 41 |
|
| 42 |
How to generate decent password: |
| 43 |
Execute: PASSWORD=$(base64 < /dev/urandom | head -c8); echo "$PASSWORD"; echo -n "$PASSWORD" | sha256sum | tr -d '-' |
| 44 |
In first line will be password and in second - corresponding SHA256. |
| 45 |
--> |
| 46 |
<password></password> |
| 47 |
|
| 48 |
<!-- List of networks with open access. |
| 49 |
|
| 50 |
To open access from everywhere, specify: |
| 51 |
<ip>::/0</ip> |
| 52 |
|
| 53 |
To open access only from localhost, specify: |
| 54 |
<ip>::1</ip> |
| 55 |
<ip>127.0.0.1</ip> |
| 56 |
|
| 57 |
Each element of list has one of the following forms: |
| 58 |
<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 |
| 59 |
2a02:6b8::3 or 2a02:6b8::3/64 or 2a02:6b8::3/ffff:ffff:ffff:ffff::. |
| 60 |
<host> Hostname. Example: server01.yandex.ru. |
| 61 |
To check access, DNS query is performed, and all received addresses compared to peer address. |
| 62 |
<host_regexp> Regular expression for host names. Example, ^server\d\d-\d\d-\d\.yandex\.ru$ |
| 63 |
To check access, DNS PTR query is performed for peer address and then regexp is applied. |
| 64 |
Then, for result of PTR query, another DNS query is performed and all received addresses compared to peer address. |
| 65 |
Strongly recommended that regexp is ends with $ |
| 66 |
All results of DNS requests are cached till server restart. |
| 67 |
--> |
| 68 |
<networks incl="networks" replace="replace"> |
| 69 |
<ip>::/0</ip> |
| 70 |
</networks> |
| 71 |
|
| 72 |
<!-- Settings profile for user. --> |
| 73 |
<profile>default</profile> |
| 74 |
|
| 75 |
<!-- Quota for user. --> |
| 76 |
<quota>default</quota> |
| 77 |
</default> |
| 78 |
|
| 79 |
<!-- Example of user with readonly access. --> |
| 80 |
<readonly> |
| 81 |
<password></password> |
| 82 |
<networks incl="networks" replace="replace"> |
| 83 |
<ip>::1</ip> |
| 84 |
<ip>127.0.0.1</ip> |
| 85 |
</networks> |
| 86 |
<profile>readonly</profile> |
| 87 |
<quota>default</quota> |
| 88 |
</readonly> |
| 89 |
</users> |
| 90 |
|
| 91 |
<!-- Quotas. --> |
| 92 |
<quotas> |
| 93 |
<!-- Name of quota. --> |
| 94 |
<default> |
| 95 |
<!-- Limits for time interval. You could specify many intervals with different limits. --> |
| 96 |
<interval> |
| 97 |
<!-- Length of interval. --> |
| 98 |
<duration>3600</duration> |
| 99 |
|
| 100 |
<!-- No limits. Just calculate resource usage for time interval. --> |
| 101 |
<queries>0</queries> |
| 102 |
<errors>0</errors> |
| 103 |
<result_rows>0</result_rows> |
| 104 |
<read_rows>0</read_rows> |
| 105 |
<execution_time>0</execution_time> |
| 106 |
</interval> |
| 107 |
</default> |
| 108 |
</quotas> |
| 109 |
</yandex> |