Skip to content

Commit a4fb69c

Browse files
Add missing configuration options to the box.cfg reference page (#4007)
1 parent 4cd1251 commit a4fb69c

File tree

5 files changed

+509
-2
lines changed

5 files changed

+509
-2
lines changed
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
.. _cfg_authentication:
2+
3+
.. admonition:: Enterprise Edition
4+
:class: fact
5+
6+
Authentication features are supported by the `Enterprise Edition <https://www.tarantool.io/compare/>`_ only.
7+
8+
* :ref:`auth_delay <cfg_auth_delay>`
9+
* :ref:`auth_retries <cfg_auth_retries>`
10+
* :ref:`auth_type <cfg_auth_type>`
11+
* :ref:`disable_guest <cfg_disable_guest>`
12+
* :ref:`password_min_length <cfg_password_min_length>`
13+
* :ref:`password_enforce_uppercase <cfg_password_enforce_uppercase>`
14+
* :ref:`password_enforce_lowercase <cfg_password_enforce_lowercase>`
15+
* :ref:`password_enforce_digits <cfg_password_enforce_digits>`
16+
* :ref:`password_enforce_specialchars <cfg_password_enforce_specialchars>`
17+
* :ref:`password_lifetime_days <cfg_password_lifetime_days>`
18+
* :ref:`password_history_length <cfg_password_history_length>`
19+
20+
21+
.. _cfg_auth_delay:
22+
23+
.. confval:: auth_delay
24+
25+
Since :doc:`2.11.0 </release/2.11.0>`.
26+
27+
Specifies a period of time (in seconds) that a specific user should wait
28+
for the next attempt after failed authentication.
29+
30+
With the configuration below, Tarantool refuses the authentication attempt if the previous
31+
attempt was less than 5 seconds ago.
32+
33+
.. code-block:: lua
34+
35+
box.cfg{ auth_delay = 5 }
36+
37+
38+
| Type: number
39+
| Default: 0
40+
| Environment variable: TT_AUTH_DELAY
41+
| Dynamic: yes
42+
43+
.. _cfg_auth_retries:
44+
45+
.. confval:: auth_retries
46+
47+
Since :doc:`3.0.0 </release/3.0.0>`.
48+
49+
Specify the maximum number of authentication retries allowed before ``auth_delay`` is enforced.
50+
The default value is 0, which means ``auth_delay`` is enforced after the first failed authentication attempt.
51+
52+
The retry counter is reset after ``auth_delay`` seconds since the first failed attempt.
53+
For example, if a client tries to authenticate fewer than ``auth_retries`` times within ``auth_delay`` seconds, no authentication delay is enforced.
54+
The retry counter is also reset after any successful authentication attempt.
55+
56+
| Type: number
57+
| Default: 0
58+
| Environment variable: TT_AUTH_RETRIES
59+
| Dynamic: yes
60+
61+
62+
.. _cfg_auth_type:
63+
64+
.. confval:: auth_type
65+
66+
Since :doc:`2.11.0 </release/2.11.0>`.
67+
68+
Specify an authentication protocol:
69+
70+
- 'chap-sha1': use the `CHAP <https://en.wikipedia.org/wiki/Challenge-Handshake_Authentication_Protocol>`_ protocol to authenticate users with ``SHA-1`` hashing applied to :ref:`passwords <authentication-passwords>`.
71+
- 'pap-sha256': use `PAP <https://en.wikipedia.org/wiki/Password_Authentication_Protocol>`_ authentication with the ``SHA256`` hashing algorithm.
72+
73+
For new users, the :doc:`box.schema.user.create </reference/reference_lua/box_schema/user_create>` method
74+
will generate authentication data using ``PAP-SHA256``.
75+
For existing users, you need to reset a password using
76+
:doc:`box.schema.user.passwd </reference/reference_lua/box_schema/user_passwd>`
77+
to use the new authentication protocol.
78+
79+
| Type: string
80+
| Default value: 'chap-sha1'
81+
| Environment variable: TT_AUTH_TYPE
82+
| Dynamic: yes
83+
84+
85+
.. _cfg_disable_guest:
86+
87+
.. confval:: disable_guest
88+
89+
Since :doc:`2.11.0 </release/2.11.0>`.
90+
91+
If **true**, disables access over remote connections
92+
from unauthenticated or :ref:`guest access <authentication-passwords>` users.
93+
This option affects both
94+
:doc:`net.box </reference/reference_lua/net_box>` and
95+
:ref:`replication <replication-master_replica_bootstrap>` connections.
96+
97+
| Type: boolean
98+
| Default: false
99+
| Environment variable: TT_DISABLE_GUEST
100+
| Dynamic: yes
101+
102+
.. _cfg_password_min_length:
103+
104+
.. confval:: password_min_length
105+
106+
Since :doc:`2.11.0 </release/2.11.0>`.
107+
108+
Specifies the minimum number of characters for a password.
109+
110+
The following example shows how to set the minimum password length to 10.
111+
112+
.. code-block:: lua
113+
114+
box.cfg{ password_min_length = 10 }
115+
116+
| Type: integer
117+
| Default: 0
118+
| Environment variable: TT_PASSWORD_MIN_LENGTH
119+
| Dynamic: yes
120+
121+
122+
.. _cfg_password_enforce_uppercase:
123+
124+
.. confval:: password_enforce_uppercase
125+
126+
Since :doc:`2.11.0 </release/2.11.0>`.
127+
128+
If **true**, a password should contain uppercase letters (A-Z).
129+
130+
| Type: boolean
131+
| Default: false
132+
| Environment variable: TT_PASSWORD_ENFORCE_UPPERCASE
133+
| Dynamic: yes
134+
135+
136+
.. _cfg_password_enforce_lowercase:
137+
138+
.. confval:: password_enforce_lowercase
139+
140+
Since :doc:`2.11.0 </release/2.11.0>`.
141+
142+
If **true**, a password should contain lowercase letters (a-z).
143+
144+
| Type: boolean
145+
| Default: false
146+
| Environment variable: TT_PASSWORD_ENFORCE_LOWERCASE
147+
| Dynamic: yes
148+
149+
150+
.. _cfg_password_enforce_digits:
151+
152+
.. confval:: password_enforce_digits
153+
154+
Since :doc:`2.11.0 </release/2.11.0>`.
155+
156+
If **true**, a password should contain digits (0-9).
157+
158+
| Type: boolean
159+
| Default: false
160+
| Environment variable: TT_PASSWORD_ENFORCE_DIGITS
161+
| Dynamic: yes
162+
163+
164+
.. _cfg_password_enforce_specialchars:
165+
166+
.. confval:: password_enforce_specialchars
167+
168+
Since :doc:`2.11.0 </release/2.11.0>`.
169+
170+
If **true**, a password should contain at least one special character (such as ``&|?!@$``).
171+
172+
| Type: boolean
173+
| Default: false
174+
| Environment variable: TT_PASSWORD_ENFORCE_SPECIALCHARS
175+
| Dynamic: yes
176+
177+
178+
.. _cfg_password_lifetime_days:
179+
180+
.. confval:: password_lifetime_days
181+
182+
Since :doc:`2.11.0 </release/2.11.0>`.
183+
184+
Specifies the maximum period of time (in days) a user can use the same password.
185+
When this period ends, a user gets the "Password expired" error on a login attempt.
186+
To restore access for such users, use :doc:`box.schema.user.passwd </reference/reference_lua/box_schema/user_passwd>`.
187+
188+
.. note::
189+
190+
The default 0 value means that a password never expires.
191+
192+
The example below shows how to set a maximum password age to 365 days.
193+
194+
.. code-block:: lua
195+
196+
box.cfg{ password_lifetime_days = 365 }
197+
198+
| Type: integer
199+
| Default: 0
200+
| Environment variable: TT_PASSWORD_LIFETIME_DAYS
201+
| Dynamic: yes
202+
203+
204+
.. _cfg_password_history_length:
205+
206+
.. confval:: password_history_length
207+
208+
Since :doc:`2.11.0 </release/2.11.0>`.
209+
210+
Specifies the number of unique new user passwords before an old password can be reused.
211+
212+
In the example below, a new password should differ from the last three passwords.
213+
214+
.. code-block:: lua
215+
216+
box.cfg{ password_history_length = 3 }
217+
218+
| Type: integer
219+
| Default: 0
220+
| Environment variable: TT_PASSWORD_HISTORY_LENGTH
221+
| Dynamic: yes
222+
223+
.. note::
224+
Tarantool uses the ``auth_history`` field in the
225+
:doc:`box.space._user </reference/reference_lua/box_space/_user>`
226+
system space to store user passwords.
227+

doc/reference/configuration/cfg_binary_logging_snapshots.rst

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55
* :ref:`wal_dir_rescan_delay <cfg_binary_logging_snapshots-wal_dir_rescan_delay>`
66
* :ref:`wal_queue_max_size <cfg_binary_logging_snapshots-wal_queue_max_size>`
77
* :ref:`wal_cleanup_delay <cfg_binary_logging_snapshots-wal_cleanup_delay>`
8+
* :ref:`wal_ext <cfg_binary_logging_snapshots-wal_ext>`
9+
* :ref:`secure_erasing <cfg_binary_logging_secure_erasing>`
810

911
.. _cfg_binary_logging_snapshots-force_recovery:
1012

1113
.. confval:: force_recovery
1214

1315
Since version 1.7.4.
16+
1417
If ``force_recovery`` equals true, Tarantool tries to continue if there is
1518
an error while reading a :ref:`snapshot file<index-box_persistence>`
1619
(at server instance start) or a :ref:`write-ahead log file<internals-wal>`
@@ -31,6 +34,7 @@
3134
.. confval:: wal_max_size
3235

3336
Since version 1.7.4.
37+
3438
The maximum number of bytes in a single write-ahead log file.
3539
When a request would cause an .xlog file to become larger than
3640
``wal_max_size``, Tarantool creates another WAL file.
@@ -45,6 +49,7 @@
4549
.. confval:: snap_io_rate_limit
4650

4751
Since version 1.4.9.
52+
4853
Reduce the throttling effect of :doc:`box.snapshot() </reference/reference_lua/box_snapshot>` on
4954
INSERT/UPDATE/DELETE performance by setting a limit on how many
5055
megabytes per second it can write to disk. The same can be
@@ -64,7 +69,9 @@
6469

6570
.. confval:: wal_mode
6671

67-
Since version 1.6.2. Specify fiber-WAL-disk synchronization mode as:
72+
Since version 1.6.2.
73+
74+
Specify fiber-WAL-disk synchronization mode as:
6875

6976
* ``none``: write-ahead log is not maintained.
7077
A node with ``wal_mode = none`` can't be replication master;
@@ -83,6 +90,7 @@
8390
.. confval:: wal_dir_rescan_delay
8491

8592
Since version 1.6.2.
93+
8694
Number of seconds between periodic scans of the write-ahead-log
8795
file directory, when checking for changes to write-ahead-log
8896
files for the sake of :ref:`replication <replication>` or :ref:`hot standby <index-hot_standby>`.
@@ -97,6 +105,7 @@
97105
.. confval:: wal_queue_max_size
98106

99107
Since version :doc:`2.8.1 </release/2.8.1>`.
108+
100109
The size of the queue (in bytes) used by a :ref:`replica <replication-roles>` to submit
101110
new transactions to a :ref:`write-ahead log<internals-wal>` (WAL).
102111
This option helps limit the rate at which a replica submits transactions to the WAL.
@@ -118,6 +127,7 @@
118127
.. confval:: wal_cleanup_delay
119128

120129
Since version :doc:`2.6.3 </release/2.6.3>`.
130+
121131
The delay (in seconds) used to prevent the :ref:`Tarantool garbage collector <cfg_checkpoint_daemon-garbage-collector>`
122132
from immediately removing :ref:`write-ahead log<internals-wal>` files after a node restart.
123133
This delay eliminates possible erroneous situations when the master deletes WALs
@@ -136,4 +146,68 @@
136146
| Type: number
137147
| Default: 14400 seconds
138148
| Environment variable: TT_WAL_CLEANUP_DELAY
139-
| Dynamic: **yes**
149+
| Dynamic: **yes**
150+
151+
152+
.. _cfg_binary_logging_snapshots-wal_ext:
153+
154+
.. confval:: wal_ext
155+
156+
Since version :doc:`2.11.0 </release/2.11.0>`.
157+
158+
(**Enterprise Edition only**) Allows you to add auxiliary information to each :ref:`write-ahead log <internals-wal>` record.
159+
For example, you can enable storing an old and new tuple for each CRUD operation performed.
160+
This information might be helpful for implementing a CDC (Change Data Capture) utility that transforms a data replication stream.
161+
162+
You can enable storing old and new tuples as follows:
163+
164+
* Set the ``old`` and ``new`` options to ``true`` to store old and new tuples in a write-ahead log for all spaces.
165+
166+
.. code-block:: lua
167+
168+
box.cfg {
169+
wal_ext = { old = true, new = true }
170+
}
171+
172+
* To adjust these options for specific spaces, use the ``spaces`` option.
173+
174+
.. code-block:: lua
175+
176+
box.cfg {
177+
wal_ext = {
178+
old = true, new = true,
179+
spaces = {
180+
space1 = { old = false },
181+
space2 = { new = false }
182+
}
183+
}
184+
}
185+
186+
187+
The configuration for specific spaces has priority over the global configuration,
188+
so only new tuples are added to the log for ``space1`` and only old tuples for ``space2``.
189+
190+
Note that records with additional fields are :ref:`replicated <replication-architecture>` as follows:
191+
192+
* If a replica doesn't support the extended format configured on a master, auxiliary fields are skipped.
193+
* If a replica and master have different configurations for WAL records, a master's configuration is ignored.
194+
195+
| Type: map
196+
| Default: nil
197+
| Environment variable: TT_WAL_EXT
198+
| Dynamic: **yes**
199+
200+
201+
.. _cfg_binary_logging_secure_erasing:
202+
203+
.. confval:: secure_erasing
204+
205+
Since version :doc:`3.0.0 </release/3.0.0>`.
206+
207+
(**Enterprise Edition only**) If **true**, forces Tarantool to overwrite a data file a few times before deletion to render recovery of a deleted file impossible.
208+
The option applies to both ``.xlog`` and ``.snap`` files as well as Vinyl data files.
209+
210+
| Type: boolean
211+
| Default: false
212+
| Environment variable: TT_SECURE_ERASING
213+
| Dynamic: **yes**

0 commit comments

Comments
 (0)