[fix] expose prestodb auth parameters and wire authorization into all metrics#4188
Open
orangeCatDeveloper wants to merge 2 commits into
Open
Conversation
… metrics (apache#2838) The prestodb template's http sections referenced authType/username/password placeholders in authorization blocks, but the params were never defined, so the UI offered no way to enter credentials. Define the missing params, and add the authorization block to the cluster (priority 0 availability) and node metrics which previously sent unauthenticated requests, causing auth-enabled PrestoDB deployments to be marked down. Update en/zh-cn help docs and add an e2e test that collects all metric groups through a mock server enforcing HTTP Basic Auth.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed?
Fixes #2838 — PrestoDB with authentication enabled cannot be monitored: the form has no username/password fields.
Root cause, two layers in
app-prestodb.yml:status/taskmetrics reference^_^authType^_^/^_^username^_^/^_^password^_^in theirauthorizationblocks, but these params were never declared — so the UI never shows the input fields.cluster(priority-0 availability probe) andnodemetrics have noauthorizationblock at all — so even with credentials, the probe gets 401 and the whole monitor is marked down.Fix:
authType/username/passwordparams (same structure asapp-api.yml)authorizationblock toclusterandnode, so all 4 metric groups authenticateTested:
PrestodbMonitorE2eTest(runs in CI): mock server enforcing Basic Auth; with credentials all 4 metric groups collect, without credentials collection fails with 401. Placeholders are filled the production way (WheelTimerTask#initJobMetrics), so a future metric missing the authorization block fails this test.prestodb/prestodocker with password-file auth + HTTPS: same results, and all template field names match the live API responses.Checklist
Add or update API