Skip to content

Commit 6696a5f

Browse files
committed
Add tt-ee 2.5.1 authentication features
1 parent 55e6c89 commit 6696a5f

File tree

3 files changed

+219
-5
lines changed

3 files changed

+219
-5
lines changed

doc/tooling/tt_cli/connect.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ If no credentials are provided for a remote connection, the user is automaticall
104104
Encrypted connection
105105
~~~~~~~~~~~~~~~~~~~~
106106

107-
To connect to instances that use SSL encryption, provide the SSL certificate and
108-
SSL key files in the ``--sslcertfile`` and ``--sslkeyfile`` options. If necessary,
109-
add other SSL parameters -- ``--sslcafile`` and ``--sslciphers``.
107+
To connect to instances that use :ref:`SSL encryption <configuration_connections_ssl>`,
108+
provide the SSL certificate and SSL key files in the ``--sslcertfile`` and ``--sslkeyfile`` options.
109+
If necessary, add other SSL parameters -- ``--sslcafile`` and ``--sslciphers``.
110110

111111
Script evaluation
112112
~~~~~~~~~~~~~~~~~

doc/tooling/tt_cli/export.rst

Lines changed: 108 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,23 @@ the ``customers.jsonl`` file:
130130
131131
$ tt tdg2 export localhost:3301 customers:customers.jsonl
132132
133-
If the ``customers`` type has four fields (``id``, ``firstname``, ``lastname``, and ``age``), the file with exported data might look like this:
133+
If token authentication is enabled in TDG2, pass the application token in the ``-token`` option:
134+
135+
.. code-block:: console
136+
137+
$ tt tdg2 export localhost:3301 customers:customers.jsonl \
138+
--token=2fc136cf-8cae-4655-a431-7c318967263d
139+
140+
If the ``customers`` type has four fields (``id``, ``firstname``, ``lastname``, and ``age``),
141+
the file with exported data might look like this:
134142

135143
.. code-block:: json
136144
137145
{"age":30,"first_name":"Samantha","id":1,"second_name":"Carter"}
138146
{"age":41,"first_name":"Fay","id":2,"second_name":"Rivers"}
139147
{"age":74,"first_name":"Milo","id":4,"second_name":"Walters"}
140148
141-
If an object contains a ``null`` value in a field, this field skipped:
149+
``null`` field values are skipped:
142150

143151
.. code-block:: json
144152
@@ -168,11 +176,55 @@ Set the ``tt tdg2 export`` batch size less or equal to 1000:
168176
169177
$ tt tdg2 export localhost:3301 customers:customers.jsonl --batch-size=1000
170178
179+
.. _tt-export-auth:
180+
181+
Authentication
182+
--------------
183+
184+
When connecting to the cluster with enabled authentication, specify access credentials
185+
in the ``--username`` and ``--password`` command options:
186+
187+
.. code-block:: console
188+
189+
$ tt crud export localhost:3301 customers:customers.csv \
190+
--username myuser -password p4$$w0rD
191+
192+
.. _tt-export-ssl:
193+
194+
Encrypted connection
195+
--------------------
196+
197+
To connect to instances that use :ref:`SSL encryption <configuration_connections_ssl>`,
198+
provide the SSL certificate and SSL key files in the ``--sslcertfile`` and ``--sslkeyfile`` options.
199+
If necessary, add other SSL parameters in the ``--ssl*`` options.
200+
201+
.. code-block:: console
202+
203+
$ tt crud export localhost:3301 customers:customers.csv \
204+
--username myuser -password p4$$w0rD \
205+
--auth pap-sha256 --sslcertfile certs/server.crt \
206+
--sslkeyfile certs/server.key
207+
208+
For connections that use SSL but don't require additional parameters, add the ``--use-ssl``
209+
option:
210+
211+
.. code-block:: console
212+
213+
$ tt crud export localhost:3301 customers:customers.csv \
214+
--username myuser -password p4$$w0rD \
215+
--use--ssl
216+
171217
.. _tt-export-options:
172218

173219
Options
174220
-------
175221

222+
.. option:: --auth STRING
223+
224+
**Applicable to:** ``tt crud export``, ``tt tdg2 export``
225+
226+
Authentication type: ``chap-sha1`` or ``pap-sha256``.
227+
176228
.. option:: --batch-queue-size INT
177229

178230
The maximum number of tuple batches in a queue between a fetch and write threads (the default is ``32``).
@@ -226,6 +278,60 @@ Options
226278

227279
Export data using a :ref:`read view <read_views>`.
228280

281+
.. option:: --sslcafile STRING
282+
283+
**Applicable to:** ``tt crud export``, ``tt tdg2 export``
284+
285+
The path to a trusted certificate authorities (CA) file for encrypted connections.
286+
287+
See also :ref:`tt-export-ssl`.
288+
289+
.. option:: --sslcertfile STRING
290+
291+
**Applicable to:** ``tt crud export``, ``tt tdg2 export``
292+
293+
The path to an SSL certificate file for encrypted connections.
294+
295+
See also :ref:`tt-export-ssl`.
296+
297+
.. option:: --sslciphersfile STRING
298+
299+
**Applicable to:** ``tt crud export``, ``tt tdg2 export``
300+
301+
The list of SSL cipher suites used for encrypted connections, separated by colons (``:``).
302+
303+
See also :ref:`tt-export-ssl`.
304+
305+
.. option:: --sslkeyfile STRING
306+
307+
**Applicable to:** ``tt crud export``, ``tt tdg2 export``
308+
309+
The path to a private SSL key file for encrypted connections.
310+
311+
See also :ref:`tt-export-ssl`.
312+
313+
.. option:: --sslpassword STRING
314+
315+
**Applicable to:** ``tt crud export``, ``tt tdg2 export``
316+
317+
The password for the SSL key file for encrypted connections.
318+
319+
See also :ref:`tt-export-ssl`.
320+
321+
.. option:: --sslpasswordfile STRING
322+
323+
**Applicable to:** ``tt crud export``, ``tt tdg2 export``
324+
325+
A file with list of passwords to the SSL key file for encrypted connections.
326+
327+
See also :ref:`tt-export-auth`.
328+
329+
.. option:: --token STRING
330+
331+
**Applicable to:** ``tt tdg2 export``
332+
333+
An application token for connecting to TDG2.
334+
229335
.. option:: --username STRING
230336

231337
A username for connecting to the instance.

doc/tooling/tt_cli/import.rst

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ The objects are described in the ``customers.jsonl`` file.
184184
185185
$ tt tdg2 import localhost:3301 customers.jsonl:customers
186186
187+
If token authentication is enabled in TDG2, pass the application token in the ``-token`` option:
188+
189+
.. code-block:: console
190+
191+
$ tt tdg2 import localhost:3301 customers.jsonl:customers \
192+
--token=2fc136cf-8cae-4655-a431-7c318967263d
193+
187194
The input file can look like this:
188195

189196
.. code-block:: json
@@ -220,11 +227,58 @@ To automatically confirm a batch import operation, add the ``--force`` option:
220227
--force
221228
222229
230+
.. _tt-import-auth:
231+
232+
Authentication
233+
--------------
234+
235+
When connecting to the cluster with enabled authentication, specify access credentials
236+
in the ``--username`` and ``--password`` command options:
237+
238+
.. code-block:: console
239+
240+
$ tt crud import localhost:3301 customers.csv:customers \
241+
--header --match=header \
242+
--username myuser -password p4$$w0rD
243+
244+
.. _tt-import-ssl:
245+
246+
Encrypted connection
247+
--------------------
248+
249+
To connect to instances that use :ref:`SSL encryption <configuration_connections_ssl>`,
250+
provide the SSL certificate and SSL key files in the ``--sslcertfile`` and ``--sslkeyfile`` options.
251+
If necessary, add other SSL parameters in the ``--ssl*`` options.
252+
253+
.. code-block:: console
254+
255+
$ tt crud import localhost:3301 customers.csv:customers \
256+
--header --match=header \
257+
--username myuser -password p4$$w0rD \
258+
--auth pap-sha256 --sslcertfile certs/server.crt \
259+
--sslkeyfile certs/server.key
260+
261+
For connections that use SSL but don't require additional parameters, add the ``--use-ssl``
262+
option:
263+
264+
.. code-block:: console
265+
266+
$ tt crud import localhost:3301 customers.csv:customers \
267+
--header --match=header \
268+
--username myuser -password p4$$w0rD \
269+
--use--ssl
270+
223271
.. _tt-import-options:
224272

225273
Options
226274
-------
227275

276+
.. option:: --auth STRING
277+
278+
**Applicable to:** ``tt crud import``, ``tt tdg2 import``
279+
280+
Authentication type: ``chap-sha1`` or ``pap-sha256``.
281+
228282
.. option:: --batch-size INT
229283

230284
**Applicable to:** ``tt crud import``, ``tt tdg2 import``
@@ -377,6 +431,54 @@ Options
377431
For CSV, double quotes are used by default (``"``).
378432
The double symbol of this option acts as the escaping symbol within input data.
379433

434+
.. option:: --sslcafile STRING
435+
436+
**Applicable to:** ``tt crud import``, ``tt tdg2 import``
437+
438+
The path to a trusted certificate authorities (CA) file for encrypted connections.
439+
440+
See also :ref:`tt-import-ssl`.
441+
442+
.. option:: --sslcertfile STRING
443+
444+
**Applicable to:** ``tt crud import``, ``tt tdg2 import``
445+
446+
The path to an SSL certificate file for encrypted connections.
447+
448+
See also :ref:`tt-import-ssl`.
449+
450+
.. option:: --sslciphersfile STRING
451+
452+
**Applicable to:** ``tt crud import``, ``tt tdg2 import``
453+
454+
The list of SSL cipher suites used for encrypted connections, separated by colons (``:``).
455+
456+
See also :ref:`tt-import-ssl`.
457+
458+
.. option:: --sslkeyfile STRING
459+
460+
**Applicable to:** ``tt crud import``, ``tt tdg2 import``
461+
462+
The path to a private SSL key file for encrypted connections.
463+
464+
See also :ref:`tt-import-ssl`.
465+
466+
.. option:: --sslpassword STRING
467+
468+
**Applicable to:** ``tt crud import``, ``tt tdg2 import``
469+
470+
The password for the SSL key file for encrypted connections.
471+
472+
See also :ref:`tt-import-ssl`.
473+
474+
.. option:: --sslpasswordfile STRING
475+
476+
**Applicable to:** ``tt crud import``, ``tt tdg2 import``
477+
478+
A file with list of passwords to the SSL key file for encrypted connections.
479+
480+
See also :ref:`tt-import-auth`.
481+
380482
.. option:: -success STRING
381483

382484
The name of a file with rows that were imported (the default is ``success``).
@@ -394,6 +496,12 @@ Options
394496

395497
Symbols specified in this option cannot intersect with ``--dec-sep``.
396498

499+
.. option:: --token STRING
500+
501+
**Applicable to:** ``tt tdg2 import``
502+
503+
An application token for connecting to TDG2.
504+
397505
.. option:: --username STRING
398506

399507
A username for connecting to the instance.

0 commit comments

Comments
 (0)