Skip to content

Commit 0423ded

Browse files
Merge EE docs (tarantool#3759)
Merge EE docs
1 parent d02fb39 commit 0423ded

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+14453
-54
lines changed

.gitmodules

+15
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,18 @@
1616
[submodule "modules/tntcxx"]
1717
path = modules/tntcxx
1818
url = https://github.com/tarantool/tntcxx.git
19+
[submodule "modules/task"]
20+
path = modules/task
21+
url = https://github.com/tarantool/task.git
22+
[submodule "modules/odbc"]
23+
path = modules/odbc
24+
url = https://github.com/tarantool/odbc.git
25+
[submodule "modules/ldap"]
26+
path = modules/ldap
27+
url = https://github.com/tarantool/ldap.git
28+
[submodule "modules/oracle"]
29+
path = modules/oracle
30+
url = https://github.com/tarantool/oracle.git
31+
[submodule "modules/space-explorer"]
32+
path = modules/space-explorer
33+
url = https://github.com/tarantool/space-explorer.git

conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
extlinks = {
4242
'tarantool-issue': ('https://github.com/tarantool/tarantool/issues/%s', 'gh-'),
43+
'tarantool-ee-issue': ('https://github.com/tarantool/tarantool-ee/issues/%s', 'gh-'),
4344
'tarantool-release': ('https://github.com/tarantool/tarantool/releases/%s', 'v. '),
4445
'tt-release': ('https://github.com/tarantool/tt/releases/v%s', 'v. '),
4546
'doc-issue': ('https://github.com/tarantool/doc/issues/%s', 'doc-'),

doc/book/admin/access_control.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Tarantool supports two protocols for authenticating users:
7878
In this case, password hashes are stored in the ``_user`` space `unsalted <https://en.wikipedia.org/wiki/Salt_(cryptography)>`_.
7979
If an attacker gains access to the database, they may crack a password using, for example, a `rainbow table <https://en.wikipedia.org/wiki/Rainbow_table>`_.
8080

81-
* `PAP <https://en.wikipedia.org/wiki/Password_Authentication_Protocol>`_ with ``SHA256`` hashing (Tarantool Enterprise)
81+
* `PAP <https://en.wikipedia.org/wiki/Password_Authentication_Protocol>`_ with ``SHA256`` hashing (Enterprise Edition)
8282

8383
For PAP, a password is salted with a user-unique salt before saving it in the ``_user`` space.
8484
This keeps the database protected from cracking using a rainbow table.
@@ -90,7 +90,7 @@ There are two functions for managing passwords in Tarantool:
9090

9191
* :doc:`/reference/reference_lua/box_schema/user_password` returns a hash of a user's password.
9292

93-
Tarantool Enterprise also allows you to improve database security by enforcing the use of strong passwords, setting up a maximum password age, and so on. Learn more from the `Access control <https://www.tarantool.io/en/enterprise_doc/security/#access-control>`__ section.
93+
Tarantool Enterprise Edition also allows you to improve database security by enforcing the use of strong passwords, setting up a maximum password age, and so on. Learn more from the :ref:`Access control <enterprise-access-control>` section.
9494

9595

9696

doc/book/connectors/python.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,6 @@ Last update: September 2023
188188
- No
189189
- `Yes <https://github.com/tarantool/tarantool-python/wiki/PEP-249-Database-API>`__
190190

191-
* - `Encrypted connection (Tarantool Enterprise) <https://www.tarantool.io/en/enterprise_doc/security/#enterprise-iproto-encryption>`__
191+
* - :ref:`Encrypted connection (Enterprise Edition) <enterprise-iproto-encryption>`
192192
- No (`issue #22 <https://github.com/igorcoding/asynctnt/issues/22>`__)
193193
- Yes

doc/concepts/data_model/migrations.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ that do not require data migration:
1515

1616
.. note::
1717

18-
Check the `Upgrading space schema <https://www.tarantool.io/en/enterprise_doc/space_upgrade/>`__
19-
section in the Enterprise version. With the help of ``space:upgrade()`` feature,
18+
Check the :ref:`Upgrading space schema <enterprise-space_upgrade>` section.
19+
With the help of ``space:upgrade()``,
2020
you can enable compression and migrate, including already created tuples.
2121

2222

doc/concepts/replication/repl_architecture.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ the update operations to save space.
2929

3030
.. NOTE::
3131

32-
`WAL extensions <https://www.tarantool.io/en/enterprise_doc/wal_extensions/>`_ available in Tarantool Enterprise enable you to add auxiliary information to each write-ahead log record.
32+
:ref:`WAL extensions <wal_extensions>` available in Tarantool Enterprise Edition enable you to add auxiliary information to each write-ahead log record.
3333
This information might be helpful for implementing a CDC (Change Data Capture) utility that transforms a data replication stream.
3434

3535
The following are specifics of adding different types of information to the WAL:

doc/contributing/docs/localization/locstate.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ State of localization
1111
- State
1212
- Volume, words
1313

14-
* - Tarantool Community
14+
* - Tarantool Community Edition
1515
- |doc|
1616
- 352 000
1717

@@ -27,7 +27,7 @@ State of localization
2727
- |cartridge-cli|
2828
- 6 500
2929

30-
* - Tarantool Enterprise
30+
* - Tarantool Enterprise Edition
3131
- |tarantool-enterprise|
3232
- 6 000
3333

doc/enterprise/admin.rst

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
.. _enterprise-admin:
2+
3+
===============================================================================
4+
Cluster administrator's guide
5+
===============================================================================
6+
7+
This guide focuses on Enterprise-specific administration features available
8+
on top of Tarantool Community Edition with Tarantool Cartridge framework:
9+
10+
* :ref:`space explorer <space_explorer>`
11+
* :ref:`upgrade of environment-independent applications in production <enterprise-production-upgrade>`
12+
13+
Otherwise, consult the following documentation for:
14+
15+
* basic information on
16+
:doc:`deploying and managing a Tarantool cluster </book/cartridge/cartridge_admin>`
17+
* more information on
18+
:doc:`managing Tarantool instances </book/admin/index>`
19+
20+
.. _space_explorer:
21+
22+
-------------------------------------------------------------------------------
23+
Exploring spaces
24+
-------------------------------------------------------------------------------
25+
26+
The web interface lets you connect (in the browser) to any instance in the cluster
27+
and see what spaces it stores (if any) and their contents.
28+
29+
To explore spaces:
30+
31+
#. Open the **Space Explorer** tab in the menu on the left:
32+
33+
.. image:: images/space_explr_tab.png
34+
:align: center
35+
:scale: 80%
36+
37+
#. Click **connect** next to an instance that stores data. The basic sanity-check
38+
(``test.py``) of the example application puts sample data to one replica
39+
set (shard), so its master and replica store the data in their spaces:
40+
41+
.. image:: images/spaces_with_data.png
42+
:align: center
43+
:scale: 80%
44+
45+
When connected to a instance, the space explorer shows a table with basic
46+
information on its spaces. For more information, see the
47+
:doc:`box.space reference </reference/reference_lua/box_space>`.
48+
49+
To see hidden spaces, tick the corresponding checkbox:
50+
51+
.. image:: images/hidden_spaces.png
52+
:align: center
53+
:scale: 80%
54+
55+
#. Click the space's name to see its format and contents:
56+
57+
.. image:: images/space_contents.png
58+
:align: center
59+
:scale: 70%
60+
61+
To search the data, select an index and, optionally, its iteration type from
62+
the drop-down lists, and enter the index value:
63+
64+
.. image:: images/space_search.png
65+
:align: center
66+
:scale: 80%
67+
68+
.. _enterprise-production-upgrade:
69+
70+
-------------------------------------------------------------------------------
71+
Upgrading in production
72+
-------------------------------------------------------------------------------
73+
74+
To upgrade either a single instance or a cluster, you need a new version of the
75+
packaged (archived) application.
76+
77+
A single instance upgrade is simple:
78+
79+
#. Upload the package (archive) to the server.
80+
#. Stop the current instance.
81+
#. Deploy the new one as described in :ref:`deploying packaged applications <enterprise-packaged-app>`
82+
(or :ref:`archived ones <enterprise-archived-app>`).
83+
84+
.. _enterprise-cluster-upgrade:
85+
86+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
87+
Cluster upgrade
88+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89+
90+
To upgrade a cluster, choose one of the following scenarios:
91+
92+
* **Cluster shutdown**. Recommended for backward-incompatible updates, requires
93+
downtime.
94+
95+
* **Instance by instance**. Recommended for backward-compatible updates, does
96+
not require downtime.
97+
98+
To upgrade the cluster, do the following:
99+
100+
#. Schedule a downtime or plan for the instance-by-instance upgrade.
101+
102+
#. Upload a new application package (archive) to all servers.
103+
104+
Next, execute the chosen scenario:
105+
106+
* **Cluster shutdown**:
107+
108+
#. Stop all instances on all servers.
109+
#. Deploy the new package (archive) on every server.
110+
111+
* **Instance by instance**. Do the following in every replica set in succession:
112+
113+
#. Stop a replica on any server.
114+
#. Deploy the new package (archive) in place of the old replica.
115+
#. Promote the new replica to a master (see
116+
:ref:`Switching the replica set's master <cartridge-switch-master>`
117+
section in the Tarantool manual).
118+
#. Redeploy the old master and the rest of the instances in the replica set.
119+
#. Be prepared to resolve possible logic conflicts.

doc/enterprise/audit.rst

+185
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
Security audit
2+
==============
3+
4+
This document will help you audit the security of a Tarantool cluster.
5+
It explains certain security aspects, their rationale, and the ways to check them.
6+
For details on how to configure Tarantool Enterprise Edition and its infrastructure for each aspect,
7+
refer to the :doc:`security hardening guide <security>`.
8+
9+
Encryption of external iproto traffic
10+
-------------------------------------
11+
12+
Tarantool uses the
13+
:doc:`iproto binary protocol </dev_guide/internals/box_protocol>`
14+
for replicating data between instances and also in the connector libraries.
15+
16+
Since version 2.10.0, the Enterprise Edition has the built-in support for using SSL to encrypt the client-server communications over binary connections.
17+
For details on enabling SSL encryption, see the :ref:`enterprise-iproto-encryption` section of this document.
18+
19+
In case the built-in encryption is not enabled, we recommend using VPN to secure data exchange between data centers.
20+
21+
Closed iproto ports
22+
-------------------
23+
24+
When a Tarantool cluster does not use iproto for external requests,
25+
connections to the iproto ports should be allowed only between Tarantool instances.
26+
27+
For more details on configuring ports for iproto,
28+
see the ``advertise_uri`` section in the Cartridge documentation.
29+
30+
31+
HTTPS connection termination
32+
----------------------------
33+
34+
A Tarantool instance can accept HTTP connections from external services
35+
or access the administrative web UI.
36+
All such connections must go through an HTTPS-providing web server,
37+
running on the same host, such as nginx.
38+
This requirement is for both virtual and physical hosts.
39+
Running HTTP traffic through a few separate hosts with HTTPS termination
40+
is not sufficiently secure.
41+
42+
43+
Closed HTTP ports
44+
-----------------
45+
46+
Tarantool accepts HTTP connections on a specific port, configured with
47+
``http_port: <number>`` value
48+
(see :ref:`configuring Cartridge instances <cartridge-config>`).
49+
It must be only available on the same host for nginx to connect to it.
50+
51+
Check that the configured HTTP port is closed
52+
and that the HTTPS port (``443`` by default) is open.
53+
54+
Restricted access to the administrative console
55+
-----------------------------------------------
56+
57+
The :doc:`console </reference/reference_lua/console>` module provides
58+
a way to connect to a running instance and run custom Lua code.
59+
This can be useful for development and administration.
60+
The following code examples open connections on a TCP port and on a UNIX socket.
61+
62+
.. code-block:: lua
63+
64+
console.listen(<port number>)
65+
console.listen('/var/lib/tarantool/socket_name.sock')
66+
67+
Opening an administrative console through a TCP port is always unsafe.
68+
Check that there are no calls like ``console.listen(<port_number>)``
69+
in the code.
70+
71+
Connecting through a socket requires having the write permission on the
72+
``/var/lib/tarantool`` directory.
73+
Check that write permission to this directory is limited to the ``tarantool`` user.
74+
75+
Limiting the guest user
76+
-----------------------
77+
78+
Connecting to the instance with ``tt connect`` or ``tarantoolctl connect`` without
79+
user credentials (under the ``guest`` user) must be disabled.
80+
81+
There are two ways to check this vulnerability:
82+
83+
* Check that the source code doesn't grant access to the ``guest`` user.
84+
The corresponding code can look like this:
85+
86+
.. code-block:: lua
87+
88+
box.schema.user.grant('guest',
89+
'read,write',
90+
'universe',
91+
nil, { if_not_exists = true }
92+
)
93+
94+
Besides searching for the whole code pattern,
95+
search for any entries of ``'universe'``.
96+
97+
* Try connecting with ``tt connect`` to each Tarantool node.
98+
99+
For more details, refer to the documentation on
100+
:ref:`access control <authentication>`.
101+
102+
Authorization in the web UI
103+
---------------------------
104+
105+
Using the web interface must require logging in with a username and password.
106+
See more details in the documentation on
107+
:ref:`configuring web interface authorization <cartridge-auth-enable>`.
108+
109+
Running under the tarantool user
110+
--------------------------------
111+
112+
All Tarantool instances should be running under the ``tarantool`` user.
113+
114+
Limiting access to the tarantool user
115+
-------------------------------------
116+
117+
The ``tarantool`` user must be a non-privileged user without the ``sudo`` permission.
118+
Also, it must not have a password set to prevent logging in via SSH or ``su``.
119+
120+
121+
Keeping two or more snapshots
122+
-----------------------------
123+
124+
In order to have a reliable backup, a Tarantool instance must keep
125+
two or more latest snapshots.
126+
This should be checked on each Tarantool instance.
127+
128+
The :ref:`snapshot_count <cfg_checkpoint_daemon-checkpoint_count>` value
129+
determines the number of kept snapshots.
130+
Configuration values are primarily set in the configuration files
131+
but :doc:`can be overridden </book/cartridge/cartridge_api/modules/cartridge.argparse>`
132+
with environment variables and command-line arguments.
133+
So, it's best to check both the values in the configuration files and the actual values
134+
using the console:
135+
136+
.. code-block:: tarantoolsession
137+
138+
tarantool> box.cfg.checkpoint_count
139+
---
140+
- 2
141+
142+
143+
Enabled write-ahead logging (WAL)
144+
---------------------------------
145+
146+
Tarantool records all incoming data in the write-ahead log (WAL).
147+
The WAL must be enabled to ensure that data will be recovered in case of
148+
a possible instance restart.
149+
150+
Secure values of ``wal_mode`` are ``write`` and ``fsync``:
151+
152+
.. code-block:: tarantoolsession
153+
154+
tarantool> box.cfg.wal_mode
155+
---
156+
- write
157+
158+
An exclusion from this requirement is when the instance is processing data,
159+
which can be freely rejected.
160+
For example, when Tarantool is used for caching.
161+
Then WAL can be disabled to reduce i/o load.
162+
163+
For more details, see the
164+
:ref:`wal_mode reference <cfg_binary_logging_snapshots-wal_mode>`.
165+
166+
The logging level is INFO or higher
167+
-----------------------------------
168+
169+
The logging level should be set to 5 (``INFO``), 6 (``VERBOSE``), or 7 (``DEBUG``).
170+
Application logs will then have enough information to research a possible security breach.
171+
172+
.. code-block:: tarantoolsession
173+
174+
tarantool> box.cfg.log_level
175+
---
176+
- 5
177+
178+
For a full list of logging levels, see the
179+
:ref:`log_level reference <cfg_logging-log_level>`.
180+
181+
182+
Logging with journald
183+
---------------------
184+
185+
Tarantool should use ``journald`` for logging.

0 commit comments

Comments
 (0)