Skip to content
Merged
Show file tree
Hide file tree
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
21 changes: 2 additions & 19 deletions docs/src/main/sphinx/security/kerberos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,25 +128,8 @@ Property Description
operation and usage of valid DNS host names.
========================================================= ======================================================

.. note::

Monitor the CPU usage on the Trino coordinator after enabling HTTPS. Java
prefers the more CPU-intensive cipher suites, if you allow it to choose from
a big list. If the CPU usage is unacceptably high after enabling HTTPS,
you can configure Java to use specific cipher suites by setting
the ``http-server.https.included-cipher`` property to only allow
cheap ciphers. Non forward secrecy (FS) ciphers are disabled by default.
As a result, if you want to choose non FS ciphers, you need to set the
``http-server.https.excluded-cipher`` property to an empty list in order to
override the default exclusions.

.. code-block:: text

http-server.https.included-cipher=TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256
http-server.https.excluded-cipher=

The Java documentation lists the `supported cipher suites
<https://docs.oracle.com/en/java/javase/11/security/oracle-providers.html#GUID-7093246A-31A3-4304-AC5F-5FB6400405E2__SUNJSSE_CIPHER_SUITES>`_.
See :ref:`Standards supported <tls-version-and-ciphers>` for a discussion of the
supported TLS versions and cipher suites.

access-controls.properties
^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
59 changes: 55 additions & 4 deletions docs/src/main/sphinx/security/tls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,68 @@ This topic describes how to configure your Trino server to use :ref:`TLS
All authentication technologies supported by Trino require configuring TLS as
the foundational layer.

When configured to use TLS, a Trino server responds to client connections using
TLS 1.2 and TLS 1.3 certificates. The server rejects TLS 1.1, TLS 1.0, and all
SSL format certificates.

.. important::

This page discusses only how to prepare the Trino server for secure client
connections from outside of the Trino cluster to its coordinator.

See the :doc:`Glossary </appendix/glossary>` to clarify unfamiliar terms.

.. _tls-version-and-ciphers:

Supported standards
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very weird title IMO.

"Supported TLS versions and Cipher suites" is more factual and actually conveys information.

-------------------

When configured to use TLS, the Trino server responds to client connections
using TLS 1.2 and TLS 1.3 certificates. The server rejects TLS 1.1, TLS 1.0, and
all SSL format certificates.

The Trino server does not specify a set of supported ciphers, instead deferring
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This statement and the next paragraph are conflicting. Either Trino can exclude and include ciphers or it cannot.

to the defaults set by the JVM version in use. The documentation for Java 11
lists its `supported cipher suites
Comment on lines +32 to +33
Copy link
Copy Markdown
Member

@hashhar hashhar Feb 1, 2022

Choose a reason for hiding this comment

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

Since we talk vendors we should be extra clear when referring to examples here.

Suggested change
to the defaults set by the JVM version in use. The documentation for Java 11
lists its `supported cipher suites
to the defaults set by the JVM version in use. For example Oracle JDK 11
lists its `supported cipher suites

<https://docs.oracle.com/en/java/javase/11/security/oracle-providers.html#GUID-7093246A-31A3-4304-AC5F-5FB6400405E2__SUNJSSE_CIPHER_SUITES>`_.
Comment thread
Ordinant marked this conversation as resolved.
Outdated

Run the following two-line code on the same JVM from the same vendor as
configured on the coordinator to determine that JVM's default cipher list.
Comment on lines +36 to +37
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Run the following two-line code on the same JVM from the same vendor as
configured on the coordinator to determine that JVM's default cipher list.
Run the following code on the same JVM as used by
the coordinator to determine that JVM's default cipher list.


.. code-block:: shell

echo "java.util.Arrays.asList(((javax.net.ssl.SSLServerSocketFactory) \
javax.net.ssl.SSLServerSocketFactory.getDefault()).getSupportedCipherSuites()).stream().forEach(System.out::println)" | jshell -

The default Trino server specifies a set of regular expressions that exclude
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
The default Trino server specifies a set of regular expressions that exclude
By default Trino is configured to exclude

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The configs don't use regex at all. It's just a list.

older cipher suites that do not support forward secrecy (FS).

Use the ``http-server.https.included-cipher`` property to specify a
comma-separated list of ciphers in preferred use order. If one of your preferred
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
comma-separated list of ciphers in preferred use order. If one of your preferred
comma-separated list of ciphers in order of preferred use. If one of your preferred

selections is a non-FS cipher, you must also set the
``http-server.https.excluded-cipher`` property to an empty list to override the
default exclusions. For example:

.. code-block:: text

http-server.https.included-cipher=TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256
http-server.https.excluded-cipher=

Specifying a different cipher suite is a complex issue that should only be
considered in conjunction with your organization's security managers. Using a
different suite may require downloading and installing a different SunJCE
implementation package. Some locales may have export restrictions on cipher
suites. See the discussion in Java documentation that begins with `Customizing
the Encryption Algorithm Providers
<https://docs.oracle.com/en/java/javase/11/security/java-secure-socket-extension-jsse-reference-guide.html#GUID-316FB978-7588-442E-B829-B4973DB3B584>`_.

.. note::

If you manage the coordinator's direct TLS implementatation, monitor the CPU
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What a "direct TLS implementation"?

usage on the Trino coordinator after enabling HTTPS. Java prefers the more
CPU-intensive cipher suites, if you allow it to choose from a big list of
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this comma is redundant

ciphers. If the CPU usage is unacceptably high after enabling HTTPS, you can
configure Java to use specific cipher suites as described in this section.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can be read to mean to verbatim set the config shared above which I don't beleive is what we intend to mean here.


However, best practice is to instead use an external load balancer, as
discussed next.
Comment on lines +74 to +75
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
However, best practice is to instead use an external load balancer, as
discussed next.
However, best practice is to terminate TLS at a load balancer instead as
discussed next.


Approaches
----------

Expand Down