Skip to content
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

Add username and password section #11012

Merged
merged 1 commit into from
Feb 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 32 additions & 7 deletions docs/src/main/sphinx/installation/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,35 @@ The recommended TLS implementation is to use a globally trusted certificate. In
this case, no other options are necessary, since the JVM running the CLI
recognizes these certificates.

Use ``--help`` to see information about specifying the keystore, truststore, and
other authentication details as required.

Authentication
--------------

You can override your username with the ``--user`` option. It defaults to your
operating system username. If your Trino server requires password
authentication, use the ``--password`` option to have the CLI prompt for a
password. You can set the ``TRINO_PASSWORD`` environment variable with the
password value to avoid the prompt.
The Trino CLI supports many :doc:`/security/authentication-types` detailed in
the following sections:

Use ``--help`` to see information about specifying the keystore, truststore, and
other authentication details as required. If using Kerberos, see :doc:`/security/cli`.
Username and password authentication
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Username and password authentication is typically configured in a cluster with
the ``PASSWORD`` authentication type.

If your Trino server requires password authentication, use the ``--password``
option to have the CLI prompt for a password. If your cluster uses a different
username, you can override your username with the ``--user`` option. It defaults
to your operating system username.

The following code example connects to the server, establishes your user name,
and prompts the CLI for your password:

.. code-block:: text

./trino --server https://trino.example.com --user=myusername --password

You can set the ``TRINO_PASSWORD`` environment variable with the password value
to avoid the prompt.

.. _cli-external-sso-auth:

Expand Down Expand Up @@ -116,6 +134,12 @@ JWT authentication
To access a Trino cluster configured to use :doc:`/security/jwt`, use the
``--access-token=<token>`` option to pass a JWT to the server.

Kerberos authentication
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for other reviewers .. we are doing this for now in this PR.. we soon get rid of the other docs and migrate all the info into here.. but one step at a time

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👣

^^^^^^^^^^^^^^^^^^^^^^^

If your cluster is secured with Kerberos authentication, see
:doc:`/security/cli`.

Pagination
----------

Expand Down Expand Up @@ -262,3 +286,4 @@ To view debug information, including the stack trace for failures, use the
...
at java.base/java.lang.Thread.run(Thread.java:834)
select count(*) from tpch.tiny.nations