You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/book/admin/access_control.rst
+18-7Lines changed: 18 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -43,9 +43,7 @@ There are two built-in users in Tarantool:
43
43
44
44
$ tt connect app:instance001
45
45
46
-
.. NOTE::
47
-
48
-
To allow remote :ref:`binary port <admin-security>` connections using the 'admin' user, you need to :ref:`set a password <access_control_user_changing_passwords>`.
46
+
To allow remote :ref:`binary port <admin-security>` connections using the 'admin' user, you need to :ref:`set a password <access_control_user_changing_passwords>`.
49
47
50
48
* 'guest' is a user with minimum permissions used by default for remote :ref:`binary port <admin-security>` connections.
51
49
For example, 'guest' is used when connecting to the instance using :ref:`tt connect <tt-connect>` using the IP address and port without specifying the name of a user:
@@ -54,6 +52,10 @@ There are two built-in users in Tarantool:
54
52
55
53
$ tt connect 192.168.10.10:3301
56
54
55
+
.. WARNING::
56
+
57
+
Given that the 'guest' user allows unauthenticated access to Tarantool instances, it is not recommended to grant additional privileges to this user.
58
+
For example, granting the 'execute' access to :ref:`'universe' <access_control_concepts_objects>` allows *remote code execution* on instances.
57
59
58
60
.. NOTE::
59
61
@@ -68,9 +70,13 @@ Passwords
68
70
~~~~~~~~~
69
71
70
72
Any user (except 'guest') may have a password.
71
-
The password is any alphanumeric string.
73
+
If a password is not set, a user cannot connect to Tarantool instances.
74
+
72
75
Tarantool :ref:`password hashes <enterprise-authentication-protocol>` are stored in the :ref:`_user <box_space-user>` system space.
76
+
By default, Tarantool uses the ``CHAP`` protocol to authenticate users and applies ``SHA-1`` hashing to
77
+
:ref:`passwords <authentication-passwords>`.
73
78
So, if the password is '123456', the stored hash is a string like 'a7SDfrdDKRBe5FaN2n3GftLKKtk='.
79
+
In the Enterprise Edition, you can enable ``PAP`` :ref:`authentication <enterprise-authentication-protocol>` with the ``SHA256`` hashing algorithm. In this case, a password is salted with a user-unique salt before saving it in the database.
74
80
75
81
Tarantool Enterprise Edition allows you to improve database security by enforcing the use of strong passwords, setting up a maximum password age, and so on.
76
82
Learn more from the :ref:`configuration_authentication` topic.
@@ -107,6 +113,7 @@ The privileges granted to a user determine which operations the user can perform
107
113
* The 'read' and 'write' privileges granted to the 'space' :ref:`object <access_control_concepts_objects>` allow a user to select or update data in the specified space.
108
114
* The 'create' privilege granted to the 'space' object allows a user to create new spaces.
109
115
* The 'execute' privilege granted to the 'function' object allows a user to execute the specified function.
116
+
* The 'session' privilege granted to a user allows connecting to the instance over IPROTO.
110
117
111
118
Note that some privileges might require read and write access to certain system spaces.
112
119
For example, the 'create' privilege granted to the 'space' object requires 'read' and 'write' privileges to the :ref:`_space <box_space-space>` system space.
@@ -132,6 +139,10 @@ There are the following built-in roles in Tarantool:
132
139
* 'replication' can be granted to a user used to maintain replication in a cluster.
133
140
* 'sharding' can be granted to a user used to maintain sharding in a cluster.
134
141
142
+
.. NOTE::
143
+
144
+
The 'sharding' role is created only if an instance is managed using :ref:`YAML configuration <configuration_overview>`.
145
+
135
146
Below are a few diagrams that demonstrate how privileges can be granted to a user without and with using roles.
136
147
137
148
* In this example, a user gets privileges directly without using roles.
@@ -178,7 +189,7 @@ Object owners
178
189
An owner of a database :ref:`object <access_control_concepts_objects>` is the user who created it.
179
190
The owner of the database and the owner of objects that are created initially (the system spaces and the default users) is the 'admin' :ref:`user <access_control_concepts_users>`.
180
191
181
-
Owners automatically have :ref:`privileges <authentication-owners_privileges>` for what they create.
192
+
Owners automatically have :ref:`privileges <authentication-owners_privileges>` for objects they create.
182
193
They can :ref:`share these privileges <access_control_granting_privileges>` with other users or roles using ``box.schema.user.grant()`` and ``box.schema.role.grant()``.
183
194
184
195
.. NOTE::
@@ -325,7 +336,7 @@ To get information about privileges granted to a user, call :ref:`box.schema.use
325
336
326
337
In the example above, 'testuser' has the following privileges:
327
338
328
-
* The 'execute' privilege to the 'public' role means that this role is :ref:`assigned to a user <access_control_roles_granting_user>`.
339
+
* The 'execute' privilege to the 'public' role means that this role is :ref:`assigned to the user <access_control_roles_granting_user>`.
329
340
330
341
* The 'read' privilege to the ``writers`` space means that a user can read data from this space.
0 commit comments