Skip to content

Commit b0a57b3

Browse files
committed
Authentication: remove old content
1 parent 9f83928 commit b0a57b3

File tree

1 file changed

+1
-296
lines changed

1 file changed

+1
-296
lines changed

doc/enterprise/security.rst

Lines changed: 1 addition & 296 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ initialization code.
1515

1616
Tarantool Enterprise Edition has the following built-in security features:
1717

18-
* :ref:`authentication <enterprise-authentication>`
18+
* :ref:`authentication <configuration_authentication>`
1919
* :ref:`access control <enterprise-access-control>`
2020
* :ref:`audit log <enterprise-logging>`
2121
* :ref:`traffic encryption <enterprise-iproto-encryption>`
@@ -74,301 +74,6 @@ privileges for what they create. For more information, see the
7474
:ref:`Owners and privileges <authentication-owners_privileges>` section.
7575

7676

77-
.. _enterprise-auth-restrictions:
78-
79-
Authentication restrictions
80-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
81-
82-
Tarantool Enterprise Edition provides the ability to apply additional restrictions for user authentication.
83-
For example, you can specify the minimum time between authentication attempts
84-
or disable access for guest users.
85-
86-
The following :doc:`configuration options </reference/configuration/index>` are available:
87-
88-
* :ref:`auth_delay <cfg_auth_delay>`
89-
* :ref:`disable_guest <cfg_disable_guest>`
90-
91-
92-
.. _cfg_auth_delay:
93-
94-
.. confval:: auth_delay
95-
96-
Specifies a period of time (in seconds) that a specific user should wait
97-
for the next attempt after failed authentication.
98-
99-
With the configuration below, Tarantool refuses the authentication attempt if the previous
100-
attempt was less than 5 seconds ago.
101-
102-
.. code-block:: lua
103-
104-
box.cfg{ auth_delay = 5 }
105-
106-
107-
| Since version: 2.11
108-
| Type: number
109-
| Default: 0
110-
| Environment variable: TT_AUTH_DELAY
111-
| Dynamic: **yes**
112-
113-
114-
.. _cfg_disable_guest:
115-
116-
.. confval:: disable_guest
117-
118-
If **true**, disables access over remote connections
119-
from unauthenticated or :ref:`guest access <authentication-passwords>` users.
120-
This option affects both
121-
:doc:`net.box </reference/reference_lua/net_box>` and
122-
:ref:`replication <replication-master_replica_bootstrap>` connections.
123-
124-
| Since version: 2.11
125-
| Type: boolean
126-
| Default: false
127-
| Environment variable: TT_DISABLE_GUEST
128-
| Dynamic: **yes**
129-
130-
131-
132-
.. _enterprise-password-policy:
133-
134-
Password policy
135-
~~~~~~~~~~~~~~~
136-
137-
A password policy allows you to improve database security by enforcing the use
138-
of strong passwords, setting up a maximum password age, and so on.
139-
When you create a new user with
140-
:doc:`box.schema.user.create </reference/reference_lua/box_schema/user_create>`
141-
or update the password of an existing user with
142-
:doc:`box.schema.user.passwd </reference/reference_lua/box_schema/user_passwd>`,
143-
the password is checked against the configured password policy settings.
144-
145-
The following :doc:`configuration options </reference/configuration/index>` are available:
146-
147-
* :ref:`password_min_length <cfg_password_min_length>`
148-
* :ref:`password_enforce_uppercase <cfg_password_enforce_uppercase>`
149-
* :ref:`password_enforce_lowercase <cfg_password_enforce_lowercase>`
150-
* :ref:`password_enforce_digits <cfg_password_enforce_digits>`
151-
* :ref:`password_enforce_specialchars <cfg_password_enforce_specialchars>`
152-
* :ref:`password_lifetime_days <cfg_password_lifetime_days>`
153-
* :ref:`password_history_length <cfg_password_history_length>`
154-
155-
.. _cfg_password_min_length:
156-
157-
.. confval:: password_min_length
158-
159-
Specifies the minimum number of characters for a password.
160-
161-
The following example shows how to set the minimum password length to 10.
162-
163-
.. code-block:: lua
164-
165-
box.cfg{ password_min_length = 10 }
166-
167-
| Since version: 2.11
168-
| Type: integer
169-
| Default: 0
170-
| Environment variable: TT_PASSWORD_MIN_LENGTH
171-
| Dynamic: **yes**
172-
173-
174-
.. _cfg_password_enforce_uppercase:
175-
176-
.. confval:: password_enforce_uppercase
177-
178-
If **true**, a password should contain uppercase letters (A-Z).
179-
180-
| Since version: 2.11
181-
| Type: boolean
182-
| Default: false
183-
| Environment variable: TT_PASSWORD_ENFORCE_UPPERCASE
184-
| Dynamic: **yes**
185-
186-
187-
.. _cfg_password_enforce_lowercase:
188-
189-
.. confval:: password_enforce_lowercase
190-
191-
If **true**, a password should contain lowercase letters (a-z).
192-
193-
| Since version: 2.11
194-
| Type: boolean
195-
| Default: false
196-
| Environment variable: TT_PASSWORD_ENFORCE_LOWERCASE
197-
| Dynamic: **yes**
198-
199-
200-
.. _cfg_password_enforce_digits:
201-
202-
.. confval:: password_enforce_digits
203-
204-
If **true**, a password should contain digits (0-9).
205-
206-
| Since version: 2.11
207-
| Type: boolean
208-
| Default: false
209-
| Environment variable: TT_PASSWORD_ENFORCE_DIGITS
210-
| Dynamic: **yes**
211-
212-
213-
.. _cfg_password_enforce_specialchars:
214-
215-
.. confval:: password_enforce_specialchars
216-
217-
If **true**, a password should contain at least one special character (such as ``&|?!@$``).
218-
219-
| Since version: 2.11
220-
| Type: boolean
221-
| Default: false
222-
| Environment variable: TT_PASSWORD_ENFORCE_SPECIALCHARS
223-
| Dynamic: **yes**
224-
225-
226-
.. _cfg_password_lifetime_days:
227-
228-
.. confval:: password_lifetime_days
229-
230-
Specifies the maximum period of time (in days) a user can use the same password.
231-
When this period ends, a user gets the "Password expired" error on a login attempt.
232-
To restore access for such users, use :doc:`box.schema.user.passwd </reference/reference_lua/box_schema/user_passwd>`.
233-
234-
.. note::
235-
236-
The default 0 value means that a password never expires.
237-
238-
The example below shows how to set a maximum password age to 365 days.
239-
240-
.. code-block:: lua
241-
242-
box.cfg{ password_lifetime_days = 365 }
243-
244-
| Since version: 2.11
245-
| Type: integer
246-
| Default: 0
247-
| Environment variable: TT_PASSWORD_LIFETIME_DAYS
248-
| Dynamic: **yes**
249-
250-
251-
.. _cfg_password_history_length:
252-
253-
.. confval:: password_history_length
254-
255-
Specifies the number of unique new user passwords before an old password can be reused.
256-
257-
In the example below, a new password should differ from the last three passwords.
258-
259-
.. code-block:: lua
260-
261-
box.cfg{ password_history_length = 3 }
262-
263-
| Since version: 2.11
264-
| Type: integer
265-
| Default: 0
266-
| Environment variable: TT_PASSWORD_HISTORY_LENGTH
267-
| Dynamic: **yes**
268-
269-
.. note::
270-
Tarantool uses the ``auth_history`` field in the
271-
:doc:`box.space._user </reference/reference_lua/box_space/_user>`
272-
system space to store user passwords.
273-
274-
275-
276-
277-
.. _enterprise-authentication-protocol:
278-
279-
Authentication protocol
280-
~~~~~~~~~~~~~~~~~~~~~~~
281-
282-
By default, Tarantool uses the
283-
`CHAP <https://en.wikipedia.org/wiki/Challenge-Handshake_Authentication_Protocol>`_
284-
protocol to authenticate users and applies ``SHA-1`` hashing to
285-
:ref:`passwords <authentication-passwords>`.
286-
Note that CHAP stores password hashes in the ``_user`` space unsalted.
287-
If an attacker gains access to the database, they may crack a password, for example, using a `rainbow table <https://en.wikipedia.org/wiki/Rainbow_table>`_.
288-
289-
In the Enterprise Edition, you can enable
290-
`PAP <https://en.wikipedia.org/wiki/Password_Authentication_Protocol>`_ authentication
291-
with the ``SHA256`` hashing algorithm.
292-
For PAP, a password is salted with a user-unique salt before saving it in the database,
293-
which keeps the database protected from cracking using a rainbow table.
294-
295-
To enable PAP, specify the ``box.cfg.auth_type`` option as follows:
296-
297-
.. code-block:: lua
298-
299-
box.cfg{ auth_type = 'pap-sha256' }
300-
301-
| Since version: 2.11
302-
| Type: string
303-
| Default value: 'chap-sha1'
304-
| Possible values: 'chap-sha1', 'pap-sha256'
305-
| Environment variable: TT_AUTH_TYPE
306-
| Dynamic: **yes**
307-
308-
For new users, the :doc:`box.schema.user.create </reference/reference_lua/box_schema/user_create>` method
309-
will generate authentication data using ``PAP-SHA256``.
310-
For existing users, you need to reset a password using
311-
:doc:`box.schema.user.passwd </reference/reference_lua/box_schema/user_passwd>`
312-
to use the new authentication protocol.
313-
314-
.. warning::
315-
316-
Given that ``PAP`` transmits a password as plain text,
317-
Tarantool requires configuring :ref:`SSL/TLS <enterprise-iproto-encryption-config>`
318-
for a connection.
319-
320-
The examples below show how to specify the authentication protocol on the client side:
321-
322-
* For :doc:`net.box </reference/reference_lua/net_box>`, you can
323-
specify the authentication protocol using the ``auth_type`` URI parameter or
324-
the corresponding connection option:
325-
326-
.. code-block:: lua
327-
328-
-- URI parameters
329-
conn = require('net.box').connect(
330-
'username:password@localhost:3301?auth_type=pap-sha256')
331-
332-
-- URI parameters table
333-
conn = require('net.box').connect({
334-
uri = 'username:password@localhost:3301',
335-
params = {auth_type = 'pap-sha256'},
336-
})
337-
338-
-- Connection options
339-
conn = require('net.box').connect('localhost:3301', {
340-
user = 'username',
341-
password = 'password',
342-
auth_type = 'pap-sha256',
343-
})
344-
345-
* For :ref:`replication configuration <replication-master_replica_bootstrap>`,
346-
the authentication protocol can be specified in URI parameters:
347-
348-
.. code-block:: lua
349-
350-
-- URI parameters
351-
box.cfg{
352-
replication = {
353-
'replicator:password@localhost:3301?auth_type=pap-sha256',
354-
},
355-
}
356-
357-
-- URI parameters table
358-
box.cfg{
359-
replication = {
360-
{
361-
uri = 'replicator:password@localhost:3301',
362-
params = {auth_type = 'pap-sha256'},
363-
},
364-
},
365-
}
366-
367-
If the authentication protocol isn't specified explicitly on the client side,
368-
the client uses the protocol configured on the server via ``box.cfg.auth_type``.
369-
370-
371-
37277

37378
.. _enterprise-logging:
37479

0 commit comments

Comments
 (0)