Skip to content

Promethues client_python doesn't support TLS as well as authentication #761

Closed

Description

@sriharshabm

Current Prometheus client_python does support basic auth towards pushgateway but it doesn't support TLS as well as authentication towards prometheus server. Is there any plan to support it? Will it be accepted if we are ready to contribute?

Activity

  1. csmarchbanks commented on Feb 2, 2022

    @csmarchbanks
    Member

    Hello, I assume you are referring to start_http_server, in which case there are no plans to support it right now. The goal of that function is to keep it as basic as possible and for more advanced use cases users should set up the server themselves.

  2. fernandino143 commented on Sep 6, 2022

    @fernandino143

    I was reading this I think I got so confused - #120

    So, my point is that when the OP mentioned "it doesn't support TLS as well as authentication towards prometheus server" I was wondering if it would be possible to have TLS enabled on the pushgateway server. The answer is YES.

    However, how in God's name is the handler supposed to be configured in order to pass on the certificate/key or a bundle on the client side in order for the TLS portion to actually work? I mean, the implementations of basic_auth_handler and default_handler are only using basic_auth (username / pwd) to authenticate? Am I missing something? Or is this the case where I literally have to create my own handler?

  3. csmarchbanks commented on Sep 6, 2022

    @csmarchbanks
    Member

    Rereading this issue, I think it is covering two separate things:

    1. Lack of TLS authentication when using the pushgateway. I would be happy to accept a change to add a TLS handler for push gateway.
    2. Lack of Authentication for Prometheus scraping - this client has no plans to support auth when serving metrics via start_http_server.
  4. fernandino143 commented on Sep 7, 2022

    @fernandino143

    I would love to help (1) but I'm getting humiliated when trying to create one myself when using the latest python client

  5. csmarchbanks commented on Sep 20, 2022

    @csmarchbanks
    Member

    @fernandino143 I created #841 to support this, would you mind giving it a try on your system? Any feedback on how it is implemented/the arguments is also welcome!

  6. fernandino143 commented on Sep 21, 2022

    @fernandino143

    Yep. That's very similar to the one I had in #838 and closed it (internal stuff). But you made it look good. Give me a few moments to test this properly, but I think it does the trick.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions