-
Notifications
You must be signed in to change notification settings - Fork 43
Add missing configuration options to the box.cfg reference page #4007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c1319f7
Add box.cfg settings: flight recorder
andreyaksenov 5d52677
Add box.cfg settings: authentication
andreyaksenov b37accf
Add box.cfg settings: new WAL settings
andreyaksenov 19fa932
Add box.cfg settings: bootstrap_leader
andreyaksenov 8de2e42
Add box.cfg settings: update per review
andreyaksenov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,227 @@ | ||
.. _cfg_authentication: | ||
|
||
.. admonition:: Enterprise Edition | ||
:class: fact | ||
|
||
Authentication features are supported by the `Enterprise Edition <https://www.tarantool.io/compare/>`_ only. | ||
|
||
* :ref:`auth_delay <cfg_auth_delay>` | ||
* :ref:`auth_retries <cfg_auth_retries>` | ||
* :ref:`auth_type <cfg_auth_type>` | ||
* :ref:`disable_guest <cfg_disable_guest>` | ||
* :ref:`password_min_length <cfg_password_min_length>` | ||
* :ref:`password_enforce_uppercase <cfg_password_enforce_uppercase>` | ||
* :ref:`password_enforce_lowercase <cfg_password_enforce_lowercase>` | ||
* :ref:`password_enforce_digits <cfg_password_enforce_digits>` | ||
* :ref:`password_enforce_specialchars <cfg_password_enforce_specialchars>` | ||
* :ref:`password_lifetime_days <cfg_password_lifetime_days>` | ||
* :ref:`password_history_length <cfg_password_history_length>` | ||
|
||
|
||
.. _cfg_auth_delay: | ||
|
||
.. confval:: auth_delay | ||
|
||
Since :doc:`2.11.0 </release/2.11.0>`. | ||
|
||
Specifies a period of time (in seconds) that a specific user should wait | ||
for the next attempt after failed authentication. | ||
|
||
With the configuration below, Tarantool refuses the authentication attempt if the previous | ||
attempt was less than 5 seconds ago. | ||
|
||
.. code-block:: lua | ||
|
||
box.cfg{ auth_delay = 5 } | ||
|
||
|
||
| Type: number | ||
| Default: 0 | ||
| Environment variable: TT_AUTH_DELAY | ||
| Dynamic: yes | ||
|
||
.. _cfg_auth_retries: | ||
|
||
.. confval:: auth_retries | ||
|
||
Since :doc:`3.0.0 </release/3.0.0>`. | ||
|
||
Specify the maximum number of authentication retries allowed before ``auth_delay`` is enforced. | ||
The default value is 0, which means ``auth_delay`` is enforced after the first failed authentication attempt. | ||
|
||
The retry counter is reset after ``auth_delay`` seconds since the first failed attempt. | ||
For example, if a client tries to authenticate fewer than ``auth_retries`` times within ``auth_delay`` seconds, no authentication delay is enforced. | ||
The retry counter is also reset after any successful authentication attempt. | ||
|
||
| Type: number | ||
| Default: 0 | ||
| Environment variable: TT_AUTH_RETRIES | ||
| Dynamic: yes | ||
|
||
|
||
.. _cfg_auth_type: | ||
|
||
.. confval:: auth_type | ||
|
||
Since :doc:`2.11.0 </release/2.11.0>`. | ||
|
||
Specify an authentication protocol: | ||
|
||
- '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>`. | ||
- 'pap-sha256': use `PAP <https://en.wikipedia.org/wiki/Password_Authentication_Protocol>`_ authentication with the ``SHA256`` hashing algorithm. | ||
|
||
For new users, the :doc:`box.schema.user.create </reference/reference_lua/box_schema/user_create>` method | ||
will generate authentication data using ``PAP-SHA256``. | ||
For existing users, you need to reset a password using | ||
:doc:`box.schema.user.passwd </reference/reference_lua/box_schema/user_passwd>` | ||
to use the new authentication protocol. | ||
|
||
| Type: string | ||
| Default value: 'chap-sha1' | ||
| Environment variable: TT_AUTH_TYPE | ||
| Dynamic: yes | ||
|
||
|
||
.. _cfg_disable_guest: | ||
|
||
.. confval:: disable_guest | ||
|
||
Since :doc:`2.11.0 </release/2.11.0>`. | ||
|
||
If **true**, disables access over remote connections | ||
from unauthenticated or :ref:`guest access <authentication-passwords>` users. | ||
This option affects both | ||
:doc:`net.box </reference/reference_lua/net_box>` and | ||
:ref:`replication <replication-master_replica_bootstrap>` connections. | ||
|
||
| Type: boolean | ||
| Default: false | ||
| Environment variable: TT_DISABLE_GUEST | ||
| Dynamic: yes | ||
|
||
.. _cfg_password_min_length: | ||
|
||
.. confval:: password_min_length | ||
|
||
Since :doc:`2.11.0 </release/2.11.0>`. | ||
|
||
Specifies the minimum number of characters for a password. | ||
|
||
The following example shows how to set the minimum password length to 10. | ||
|
||
.. code-block:: lua | ||
|
||
box.cfg{ password_min_length = 10 } | ||
|
||
| Type: integer | ||
| Default: 0 | ||
| Environment variable: TT_PASSWORD_MIN_LENGTH | ||
| Dynamic: yes | ||
|
||
|
||
.. _cfg_password_enforce_uppercase: | ||
|
||
.. confval:: password_enforce_uppercase | ||
|
||
Since :doc:`2.11.0 </release/2.11.0>`. | ||
|
||
If **true**, a password should contain uppercase letters (A-Z). | ||
|
||
| Type: boolean | ||
| Default: false | ||
| Environment variable: TT_PASSWORD_ENFORCE_UPPERCASE | ||
| Dynamic: yes | ||
|
||
|
||
.. _cfg_password_enforce_lowercase: | ||
|
||
.. confval:: password_enforce_lowercase | ||
|
||
Since :doc:`2.11.0 </release/2.11.0>`. | ||
|
||
If **true**, a password should contain lowercase letters (a-z). | ||
|
||
| Type: boolean | ||
| Default: false | ||
| Environment variable: TT_PASSWORD_ENFORCE_LOWERCASE | ||
| Dynamic: yes | ||
|
||
|
||
.. _cfg_password_enforce_digits: | ||
|
||
.. confval:: password_enforce_digits | ||
|
||
Since :doc:`2.11.0 </release/2.11.0>`. | ||
|
||
If **true**, a password should contain digits (0-9). | ||
|
||
| Type: boolean | ||
| Default: false | ||
| Environment variable: TT_PASSWORD_ENFORCE_DIGITS | ||
| Dynamic: yes | ||
|
||
|
||
.. _cfg_password_enforce_specialchars: | ||
|
||
.. confval:: password_enforce_specialchars | ||
|
||
Since :doc:`2.11.0 </release/2.11.0>`. | ||
|
||
If **true**, a password should contain at least one special character (such as ``&|?!@$``). | ||
|
||
| Type: boolean | ||
| Default: false | ||
| Environment variable: TT_PASSWORD_ENFORCE_SPECIALCHARS | ||
| Dynamic: yes | ||
|
||
|
||
.. _cfg_password_lifetime_days: | ||
|
||
.. confval:: password_lifetime_days | ||
|
||
Since :doc:`2.11.0 </release/2.11.0>`. | ||
|
||
Specifies the maximum period of time (in days) a user can use the same password. | ||
When this period ends, a user gets the "Password expired" error on a login attempt. | ||
To restore access for such users, use :doc:`box.schema.user.passwd </reference/reference_lua/box_schema/user_passwd>`. | ||
|
||
.. note:: | ||
|
||
The default 0 value means that a password never expires. | ||
|
||
The example below shows how to set a maximum password age to 365 days. | ||
|
||
.. code-block:: lua | ||
|
||
box.cfg{ password_lifetime_days = 365 } | ||
|
||
| Type: integer | ||
| Default: 0 | ||
| Environment variable: TT_PASSWORD_LIFETIME_DAYS | ||
| Dynamic: yes | ||
|
||
|
||
.. _cfg_password_history_length: | ||
|
||
.. confval:: password_history_length | ||
|
||
Since :doc:`2.11.0 </release/2.11.0>`. | ||
|
||
Specifies the number of unique new user passwords before an old password can be reused. | ||
|
||
In the example below, a new password should differ from the last three passwords. | ||
|
||
.. code-block:: lua | ||
|
||
box.cfg{ password_history_length = 3 } | ||
|
||
| Type: integer | ||
| Default: 0 | ||
| Environment variable: TT_PASSWORD_HISTORY_LENGTH | ||
| Dynamic: yes | ||
|
||
.. note:: | ||
Tarantool uses the ``auth_history`` field in the | ||
:doc:`box.space._user </reference/reference_lua/box_space/_user>` | ||
system space to store user passwords. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the option dynamic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tarantool-ee tests say that yes, added