-
Notifications
You must be signed in to change notification settings - Fork 127
Enable health check to use mtls to connect to backends #807
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
base: main
Are you sure you want to change the base?
Enable health check to use mtls to connect to backends #807
Conversation
| MONITOR_HTTP_CLIENT_TRUST_STORE_PATH, | ||
| MONITOR_HTTP_CLIENT_TRUST_STORE_PASSWORD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A user could skip setting truststore. Airlift would fallback to some system default truststore.
| } | ||
| else { | ||
| identityHeader = new Header("X-Trino-User", backendStateConfiguration.getUsername()); | ||
| identityHeader = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use Optional instead of null.
| private static final String MONITOR_HTTP_CLIENT_KEY_STORE_PATH = "monitor.http-client.key-store-path"; | ||
| private static final String MONITOR_HTTP_CLIENT_KEY_STORE_PASSWORD = "monitor.http-client.key-store-password"; | ||
| private static final String MONITOR_HTTP_CLIENT_TRUST_STORE_PATH = "monitor.http-client.trust-store-path"; | ||
| private static final String MONITOR_HTTP_CLIENT_TRUST_STORE_PASSWORD = "monitor.http-client.trust-store-password"; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I was thinking of something like this, WDYT?
| private static final String MONITOR_HTTP_CLIENT_KEY_STORE_PATH = "monitor.http-client.key-store-path"; | |
| private static final String MONITOR_HTTP_CLIENT_KEY_STORE_PASSWORD = "monitor.http-client.key-store-password"; | |
| private static final String MONITOR_HTTP_CLIENT_TRUST_STORE_PATH = "monitor.http-client.trust-store-path"; | |
| private static final String MONITOR_HTTP_CLIENT_TRUST_STORE_PASSWORD = "monitor.http-client.trust-store-password"; | |
| private static final List<String> REQUIRED_MONITOR_MTLS_KEYS = List.of( | |
| "monitor.http-client.key-store-path", | |
| "monitor.http-client.key-store-password", | |
| "monitor.http-client.trust-store-path", | |
| "monitor.http-client.trust-store-password"); |
Description
Today, Trino Gateway’s health monitors authenticate to backend clusters using either:
This creates operational burdens for deployments that must rotate or manage shared credentials, and it exposes unnecessary authentication material in gateway configs.
This PR introduces optional mTLS-based authentication for health checks, allowing deployments to rely solely on client certificates when connecting to backend JMX or metrics endpoints.
backendState.monitorMtlsEnabled: true/falseWhen
monitorMtlsEnabled=true, the health monitors switch to certificate-based auth and no longer send any identity headers. Startup validation for TLS required configuration is also added.If
monitorMtlsEnabledis false (default), existing behavior is unchanged, provides the backward compatibility.Test
Build passed.
Tested with local gateway the health check is working as expected.
Additional context and related issues
NA
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required, with the following suggested text:
* Fix some things.