Skip to content

Commit

Permalink
Add Trino configuration docs
Browse files Browse the repository at this point in the history
- with process forwarding config only for now
  • Loading branch information
mosabua committed Apr 12, 2024
1 parent 5807104 commit ab9e814
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,32 @@ various cloud platforms, such as Amazon EKS also work. However Amazon Athena
does not work since it uses alternative, custom protocols and lacks the concept
of individual clusters.

### Trino configuration

From a users perspective Trino Gateway acts as a transparent proxy for one
or more Trino clusters. The following Trino configuration tips should be
taken into account for all clusters behind the Trino Gateway.

Process forwarding must be enabled:

```commandline
http-server.process-forwarded=true
```

Without this setting, first requests go from the user to Trino Gateway and then
to Trino correctly. However, the URL for subsequent next URIs for more results
in a query provided by Trino is then using the local URL of the Trino cluster,
and not the URL of the Trino Gateway. This circumvents the Trino Gateway for all
these requests, and is contrary to the purpose of using the Trino Gateway. In
scenarios, where the local URL of the Trino cluster is private to the Trino
cluster on the DNS/network level, these following calls might not work at all
for users.

This setting is also required for Trino to authenticate in the case TLS is
terminated at the Trino Gateway. Normally it refuses to authenticate plain HTTP
requests, but if `http-server.process-forwarded=true` it authenticates over
HTTP if the request includes `X-Forwarded-Proto: HTTPS`.

## Configuration

After downloading or building the JAR, rename it to `gateway-ha.jar`,
Expand Down

0 comments on commit ab9e814

Please sign in to comment.