Skip to content

fix(MetricsAuthFilter): Match metrics endpoints on the routed path - #78

Merged
giggsoff merged 1 commit into
develop/4.4.0/4.2.0.2from
feature/metrics-auth-routed-path-4.2.0.2
Oct 27, 2026
Merged

giggsoff merged 1 commit into
develop/4.4.0/4.2.0.2from
feature/metrics-auth-routed-path-4.2.0.2

Conversation

@giggsoff

@giggsoff giggsoff commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

MetricsAuthFilter decided on the raw request URI, while Jetty routes on the normalized path.

Now the decision uses the routed context (getContextPath, getServletPath, getPathInfo). Only these skip UI auth:

  • MetricsServlet / PrometheusServlet contexts under /metrics/
  • /executors/prometheus in the /metrics context (PrometheusResource)

Verified on a cluster with the Spark Connect UI and the History Server (SPNEGO + TLS):

  • UI, REST API and history need a ticket
  • /metrics/prometheus, /metrics/executors/prometheus and /metrics/applicationHistory/prometheus stay open

…ilter

Decide whether a request targets a metrics endpoint from the context that
Jetty routed it to, instead of the raw request URI. Only the metrics
contexts themselves are exempt: a path under /metrics that no metrics
context claims is served by the root context, and the /metrics Jersey
context exempts only /executors/prometheus.
@giggsoff giggsoff changed the title NGSOK-1852 Match metrics endpoints on the routed path in MetricsAuthFilter: spark4 fix(MetricsAuthFilter): Match metrics endpoints on the routed path in MetricsAuthFilter: spark4 Oct 22, 2026
@giggsoff giggsoff changed the title fix(MetricsAuthFilter): Match metrics endpoints on the routed path in MetricsAuthFilter: spark4 fix(MetricsAuthFilter): Match metrics endpoints on the routed path Oct 22, 2026
@giggsoff
giggsoff marked this pull request as ready for review October 22, 2026 07:07
@giggsoff giggsoff self-assigned this Oct 22, 2026
@giggsoff
giggsoff merged commit 01f50d3 into develop/4.4.0/4.2.0.2 Oct 27, 2026
70 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants