Skip to content

Proxy authentication available in reverse proxy mode #4473

Closed

Description

@monelgordillo

Problem Description

Currently, the proxy authentication feature is not available in reverse proxy mode. Per documentation "Proxy Authentication
Asks the user for authentication before they are permitted to use the proxy. Authentication headers are stripped from the flows, so they are not passed to upstream servers. For now, only HTTP Basic authentication is supported. The proxy auth options are not compatible with the transparent, socks or reverse proxy mode."

Proposal

Proxy authentication for reverse proxy mode.

Alternatives

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the proposal here.

Activity

  1. added
    kind/feature
    on Mar 1, 2021
  2. r00t- commented on Mar 2, 2021

    @r00t-
    Contributor

    can you explain the use-case you see for this?

    specifically, a reverse-proxy looks like a regular server to a client, so no client should ever send Proxy-Authorization headers to it, even if asked to.
    consider https://docs.mitmproxy.org/stable/concepts-modes/#reverse-proxy

    i can only guess that you are hoping to use mitmproxy to provide authentication for the service it's reverse-proxying?
    in that case, proxy authentication is the wrong protocol to use.
    it would probably be possible to write some code that has mitmproxy perform regular http authentication, if one really wanted to.

  3. added a commit that references this issue on Mar 10, 2021
    8085728
  4. mhils commented on Mar 10, 2021

    @mhils
    Member

    We do in fact support authentication in reverse proxy mode, mitmproxy automatically falls back to Basic Auth. I've updated the doc! 😃

  5. monelgordillo commented on Mar 10, 2021

    @monelgordillo
    Author

    We do in fact support authentication in reverse proxy mode, mitmproxy automatically falls back to Basic Auth. I've updated the doc! 😃

    Thank you! I see it.

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

    kind/feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions