GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Prometheus HTTP endpoint can have custom authentication · Issue #6013 · open-telemetry/opentelemetry-java

Prometheus HTTP endpoint can have custom authentication  #6013

New issue
Copy link
New issue
Copy link
Closed
Closed
Prometheus HTTP endpoint can have custom authentication #6013
Copy link
Labels
Feature RequestSuggest an idea for this projecthelp wanted

Description

@asafm
asafm
opened on Nov 26, 2023
Issue body actions

Is your feature request related to a problem? Please describe.
Prometheus HTTP endpoint today is unauthenticated. Some attributes may contain sensitive data, hence having the ability to customize access to it would solve that.

Describe the solution you'd like
Ability to customize the HttpContext created for metrics handler, using a functional interface (Consumer<HttpContext>) given in the builder of ProtheusHttpServer. This will allow setting authentication using Filter or Autheticator.

Describe alternatives you've considered
Let the apps wrap them selfs with another proxy implementing the authentication. Aside from the complexity of adding another process doing the authentication, there are cases when the authentication is already implemented inside the app for all other HTTP Endpoints, thus it makes sense to do the authentication in the same app using same code and data. Apache Pulsar is an example. Users can provide an AuthenticationProvider plugin, and each request to Pulsar will use it for authentication. Forcing Pulsar users to spin up a proxy which implements the Pulsar code for authentication is awfully complicated.

Activity

  1. asafm
    added
    Feature RequestSuggest an idea for this project
    on Nov 26, 2023
  2. fstab commented on Nov 27, 2023

    @fstab
    fstab
    on Nov 27, 2023
    Member
    More actions

    Related: The upstream HTTPServer from the Prometheus Java client can be configured with an Authenticator, so if #6015 gets merged this could be implemented deferring to upstream API.

  3. asafm commented on Nov 27, 2023

    @asafm
    asafm
    on Nov 27, 2023
    ContributorAuthor
    More actions

    @fstab 6105 has several major drawbacks discussed with @jack-berg at #5940 which makes it too big of an obstacle to merge IMO.

    Specifically in this issue, supporting an Authenticator is so easy in terms of added code, I wouldn't want to bring a mountain of code and dependency just to do it.

  4. echooymxq commented on Sep 22, 2024

    @echooymxq
    echooymxq
    on Sep 22, 2024
    More actions

    What's going on now? the PrometheusHttpServer still can't custom authentication.

  5. jack-berg commented on Sep 23, 2024

    @jack-berg
    jack-berg
    on Sep 23, 2024
    Member
    More actions

    PRs to extend PrometheusHttpServerBuilder with a setAuthenticator(com.sun.net.httpserver.Authenticator) method are welcome.

  6. asafm commented on Sep 25, 2024

    @asafm
    asafm
    on Sep 25, 2024
    ContributorAuthor
    More actions

    I've moved on to another company and don't have time to continue implementing this, sorry.

    Reacted by Trask Stalnaker
  7. jack-berg
    added
    help wanted
    on Jan 6, 2025
  8. jack-berg commented on Dec 19, 2025

    @jack-berg
    jack-berg
    on Dec 19, 2025
    Member
    More actions

    Solved in #7225.

    Reacted by Asaf Mesika
  9. jack-berg
    closed this as completedon Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature RequestSuggest an idea for this projecthelp wanted

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.