Skip to main content
Version 3.0

Who gets into Trino
and what they can query.

Four scenarios: login through LDAP, login through Active Directory, access control through Ranger, and how certificates reach the pod. Each one covers: the chart default, what changes in the cluster, and the values file commented line by line.

ChartVersion3.0.3TypeapplicationAppVersion478
CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+

The tdp-trino chart starts Trino without authentication. Security is enabled on three fronts, all in the values file: LDAP (or Active Directory) authenticates who signs in, HTTPS protects the password in transit, and Ranger decides what each user can query. When any of them is enabled, certificates, passwords and secrets become deployment prerequisites.

Your environment

If you fill in your environment details here, the page's examples and commands use what you entered. The namespace, release name and values file are your choices, not the chart's.

Scenarios​

HTTPS in the coordinator, PASSWORD authentication type, and an authenticator pointing to the directory.

This tab makes Trino ask for a username and password and validate them against the company's LDAP directory. By default, Trino does not request a password: anyone reaching the Service's HTTP port (service.port) supplies any username and queries.

You want only people with a directory account to sign in. Trino only validates passwords over HTTPS. So requiring login means enabling three things currently disabled, all in the coordinator, the pod that receives the queries:

  • HTTPS, with a keystore (the file containing the certificate and key) supplied through a Secret;
  • the PASSWORD authentication type;
  • the password-authenticator.properties file, which tells Trino where the LDAP server is and how to build each user's DN.

The workers, the pods that run the queries, remain unchanged.

Chart default

HTTP on the service.port port, empty authenticationType, no keystore, no authenticator file.

With LDAP

HTTPS on the server.config.https.port port, with the keystore from the tdp-trino-certs-secret Secret, authenticationType: PASSWORD, the authenticator pointing to your server, and an internal secret shared by the coordinator and workers.

The login path, with and without LDAP

Who can query

Your choice changes the commands and passages below.

namespace <NAMESPACE>HTTPWho queriesusername onlyCoordinatorHTTPWorker ×2unchanged
  1. Who queries. Provides any username, without a password, over HTTP, on the port defined in service.port. Chart default: no login (HTTP).
  2. Coordinator. No authentication: accepts any username. Chart default: HTTP without authentication, empty accessControl. (tdp-trino.server.config.authenticationType)
  3. Workers. Execute queries. None of this page's scenarios changes the workers; only the coordinator authenticates and authorizes. Chart default: initial count in server.workers.

Who can query: Anyone (default)

namespace <NAMESPACE>HTTPWho queriesusername onlyCoordinatorHTTPWorker ×2unchanged
  1. Who queries. Provides any username, without a password, over HTTP, on the port defined in service.port. Chart default: no login (HTTP).
  2. Coordinator. No authentication: accepts any username. Chart default: HTTP without authentication, empty accessControl. (tdp-trino.server.config.authenticationType)
  3. Workers. Execute queries. None of this page's scenarios changes the workers; only the coordinator authenticates and authorizes. Chart default: initial count in server.workers.

Who can query: LDAP users only

namespace <NAMESPACE>HTTPSbindWho queriesusername + passwordCoordinatorHTTPS · PASSWORDWorker ×2unchangedSecretkeystore.jksLDAP serverDN bind
  1. Who queries. Provides a username and password; the coordinator only accepts them over HTTPS, on the port defined in server.config.https.port. Chart default: no login (HTTP).
  2. Coordinator. Validates the username and password in the directory before accepting the query (authenticationType PASSWORD). Chart default: HTTP without authentication, empty accessControl. (tdp-trino.server.config.authenticationType: PASSWORD)
  3. Workers. Execute queries. None of this page's scenarios changes the workers; only the coordinator authenticates and authorizes. Chart default: initial count in server.workers.
  4. Keystore Secret. Created by you before deployment. The chart mounts it directly at /etc/trino/certs in the coordinator; Trino reads the HTTPS certificate and key from it. Chart default: does not exist. (tdp-trino.coordinator.additionalVolumes)
  5. LDAP server. The coordinator builds the user's DN from the bind pattern and attempts authentication with the supplied password. Chart default: none. (password-authenticator.properties → ldap.user-bind-pattern)
Switch above: with LDAP, the keystore Secret, HTTPS in the coordinator and the LDAP server checked at each login appear.

Anyone (default). The coordinator answers over HTTP on the service.port port and accepts any username, without a password. Anyone: Best suited when Trino runs in a lab or in a closed cluster.

This is how the chart starts. There is nothing to add to the values file.

1tdp-trino:
2server:
3 config:
4 https:
5 enabled: false
6 authenticationType: ""

The coordinator serves only HTTP, on the service.port port.

  1. HTTPS disabled (linha 5). The coordinator serves only HTTP, on the service.port port.
  2. No authenticator (linha 6). Empty: Trino accepts any username, without a password. To require login, switch above to LDAP users only.
Chart default: HTTP, no authentication

LDAP users only. At each login, the coordinator builds the user's DN from the bind pattern and tries to authenticate against the LDAP server with the password supplied. To do so, it answers over HTTPS on the server.config.https.port port, with the keystore mounted from the Secret. LDAP users only: Best suited when Trino leaves the lab and only people with a company directory account may query.

Click the markers to understand each line. Secrets remain as placeholders for you to replace in your file.

1tdp-trino:
2server:
3 config:
4 https:
5 enabled: true
6 port: 8443
7 keystore:
8 path: "/etc/trino/certs/keystore.jks"
9 authenticationType: "PASSWORD"
10
11additionalConfigProperties:
12 - "internal-communication.shared-secret=<SHARED_SECRET>"
13 - "http-server.https.keystore.key=<KEYSTORE_PASSWORD>"
14
15coordinator:
16 additionalVolumes:
17 - name: data-volume
18 emptyDir: {}
19 - name: trino-certs
20 secret:
21 secretName: tdp-trino-certs-secret
22
23 additionalVolumeMounts:
24 - name: data-volume
25 mountPath: /data/trino
26 - name: trino-certs
27 mountPath: /etc/trino/certs
28 readOnly: true
29
30 additionalConfigFiles:
31 password-authenticator.properties: |
32 password-authenticator.name=ldap
33 ldap.url=ldap://<LDAP_HOST>:389
34 ldap.allow-insecure=true
35 ldap.user-bind-pattern=uid=${USER},cn=users,cn=accounts,dc=<LDAP_DOMAIN>,dc=com
36
37 # LDAP timeouts and caching
38 ldap.cache-ttl=1h
39 ldap.timeout.connect=1m
40 ldap.timeout.read=1m

Enables the coordinator's HTTPS port and points to the keystore mounted from the Secret. Without HTTPS, Trino refuses password authentication.

  1. HTTPS (linha 4). Enables the coordinator's HTTPS port and points to the keystore mounted from the Secret. Without HTTPS, Trino refuses password authentication.
  2. authenticationType (linha 9). PASSWORD enables the password authenticator. The file below specifies that LDAP validates the password.
  3. Internal secret (linha 12). Shared key between the coordinator and workers. Generate a strong value and keep it outside the page.
  4. Keystore password (linha 13). The keystore.jks password. Rotate it periodically.
  5. data-volume (linha 17). The chart already provides this volume. Because Helm replaces the entire list, repeat it here. The same applies to worker lists.
  6. Certificates Secret (linha 19). Created in the first procedure step, with keystore.jks. Scenario 4 shows the PVC alternative.
  7. Authenticator (linha 30). The password-authenticator.properties file reaches the coordinator through additionalConfigFiles.
  8. LDAP server (linha 33). Server address as seen from inside the cluster. In production, prefer LDAPS and remove allow-insecure.
  9. Bind pattern (linha 35). How the username entered becomes a DN in your directory: ${USER} is replaced with the name supplied in the client. Replace the domain with your own. Active Directory uses a different pattern (scenario 2).
LDAP: HTTPS, authentication type and authenticator file

Create the Secret containing the keystore

The keystore is mounted from the Secret in the coordinator, so the Secret must exist before deployment.

Terminal input
kubectl create secret generic tdp-trino-certs-secret \
--from-file=keystore.jks=<LOCAL_PATH>/keystore.jks \
--namespace <NAMESPACE>

Add the LDAP block to the values file

Replace the secret, server and domain placeholders with your own.

<LDAP_HOST> is the LDAP address as seen from inside the cluster; <LDAP_DOMAIN>, the directory DN components; <SHARED_SECRET>, a strong value for Trino's internal communication; <KEYSTORE_PASSWORD>, the keystore password.

Apply to the release

The coordinator restarts with HTTPS.

Terminal input
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-trino \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>

Success criteria

The coordinator ConfigMap contains password-authenticator.properties and an LDAP user can sign in through the HTTPS port (server.config.https.port). The Service name derives from the release: <RELEASE_NAME>-tdp-trino, or just <RELEASE_NAME> when the release name already contains tdp-trino.

Terminal input
kubectl -n <NAMESPACE> get configmap
kubectl -n <NAMESPACE> port-forward svc/<RELEASE_NAME>-tdp-trino 8443:8443 &
trino --server https://localhost:8443 \
--user <LDAP_USER> \
--password \
--insecure
To return to HTTP

Remove the HTTPS, authenticationType and authenticator settings from the file and run helm upgrade -f again. Clients return to the HTTP port (service.port).

allow-insecure-over-http is no shortcut for skipping HTTPS

http-server.authentication.allow-insecure-over-http=true exists as a Trino flag, but is not a safe way to avoid the HTTPS configuration above. With the flag enabled, the X-Trino-User/X-Trino-Password header login path accepts any username and password combination, including a nonexistent user: the flag does not relax transport security, it disables password checking. Standard HTTP Basic Auth still refuses to send passwords over plain HTTP in this mode ("Password not allowed for insecure authentication"), but the header path does not. Never use this flag outside a fully trusted and isolated environment.

When something goes wrong​

Troubleshooting

Paste the error message or choose a symptom. The answer includes the cause, what to do and the command.

  1. LDAP login fails. Cause: LDAP URL, bind pattern, connectivity or user permissions. In Active Directory, the DN comes from CN, and the generic uid=… pattern does not work. What to do: Test binding with the DN built from ldap.user-bind-pattern. In Active Directory, use the full UPN (usuario@dominio) in ldap.user-bind-pattern, as in scenario 2.
  2. Pod does not start with LDAP. Cause: The keystore Secret does not exist in the namespace, its file does not have the name used in https.keystore.path, or http-server.https.keystore.key is not the keystore password. What to do: Check that the Secret exists, that the file has the name used in https.keystore.path and that the password in http-server.https.keystore.key is the keystore password.
  3. Client cannot connect. Cause: Wrong port for the mode in use. What to do: HTTP without login uses the service.port port. HTTPS with LDAP uses server.config.https.port.
  4. Certificate error. Cause: The file name in the Secret does not match the path in https.keystore.path. What to do: Create the Secret with the file under the same name used in https.keystore.path.
  5. PVC is not created. Cause: trinoCerts.pvc.enabled disabled, missing StorageClass or failed copy Job. What to do: Check namespace events and the Job log.
  6. Ranger does not enforce policies. Cause: ranger.service.name differs from the Trino service name registered in Ranger. What to do: Check the service name in the Ranger interface and use the same name in ranger.service.name.

Best practices​

  • Use LDAPS in production instead of unencrypted LDAP.
  • Rotate keystore passwords periodically.
  • Restrict the LDAP bind user's permissions.
  • Monitor authentication logs.

All parameters​

The chart prefix is already filled in. Keys without a prefix belong at the root of the values file.

16 of 16 parameters

ParameterDescriptionChart default
tdp-trino.server.config.https.enabledHTTPS and loginEnables HTTPS in Trino. Required for LDAP, Ranger and secure exposurefalse
tdp-trino.server.config.https.portHTTPS and loginTrino HTTPS port8443
tdp-trino.server.config.https.keystore.pathHTTPS and loginKeystore path inside the podempty
tdp-trino.server.config.authenticationTypeHTTPS and loginAuthentication type. PASSWORD for LDAP, AD or a password fileempty
tdp-trino.additionalConfigPropertiesHTTPS and loginExtra Trino properties: shared secret, keystore password[]
tdp-trino.coordinator.additionalVolumesFiles in the coordinatorExtra coordinator volumes (Secret or PVC containing certificates)data-volume (emptyDir em /data/trino)
tdp-trino.coordinator.additionalVolumeMountsFiles in the coordinatorExtra volume mount pointsdata-volume at /data/trino
tdp-trino.coordinator.additionalConfigFilesFiles in the coordinatorExtra coordinator files: LDAP authenticator, Ranger XML files{}
tdp-trino.accessControlAuthorizationAuthorization configuration (Ranger plugin){}
trinoCerts.pvc.enabledCertificatesCreates a PVC for certificatesfalse
trinoCerts.pvc.nameCertificatesPVC nametrino-certs-pvc
trinoCerts.pvc.sizeCertificatesPVC size1Gi
trinoCerts.secret.enabledCertificatesMounts the certificates Secret in the copy Jobfalse
trinoCerts.secret.nameCertificatesCertificates Secret nametdp-trino-certs-secret
trinoCerts.copyJob.enabledCertificatesRuns the Job that prepares the PVCfalse
trinoCerts.copyJob.commandCertificatesCopy Job shell commands (Secret mounted at /tmp/certs, PVC at /etc/trino/ssl)not set (copies nothing)

Next steps​