|
| 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 | + |
0 commit comments