Skip to content

[fix] expose prestodb auth parameters and wire authorization into all metrics#4188

Open
orangeCatDeveloper wants to merge 2 commits into
apache:masterfrom
orangeCatDeveloper:fix/issue-2838-prestodb-auth-params
Open

[fix] expose prestodb auth parameters and wire authorization into all metrics#4188
orangeCatDeveloper wants to merge 2 commits into
apache:masterfrom
orangeCatDeveloper:fix/issue-2838-prestodb-auth-params

Conversation

@orangeCatDeveloper

@orangeCatDeveloper orangeCatDeveloper commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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:

  1. The status/task metrics reference ^_^authType^_^ / ^_^username^_^ / ^_^password^_^ in their authorization blocks, but these params were never declared — so the UI never shows the input fields.
  2. The cluster (priority-0 availability probe) and node metrics have no authorization block at all — so even with credentials, the probe gets 401 and the whole monitor is marked down.

Fix:

  • declare authType / username / password params (same structure as app-api.yml)
  • add the authorization block to cluster and node, so all 4 metric groups authenticate
  • update en / zh-cn help docs

Tested:

  • new 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.
  • verified against a real prestodb/presto docker with password-file auth + HTTPS: same results, and all template field names match the live API responses.

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

Add or update API

  • I have added the necessary e2e tests and all cases have passed.

… 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.
@github-actions github-actions Bot added doc Improvements or additions to documentation monitoring-template backend labels Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend doc Improvements or additions to documentation monitoring-template

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Question] The configurations for PrestoDB does not expose the interface for users to setup username/password

2 participants