Apache2 revese proxy with basic authentication: Client sends wrong "Authorization" header

1

I'm trying to get jupyterhub working again behind an Apache2 reverse proxy with BasicAuth.

Since I updated it to Jupyterhub 1.1, it spits out a number of Invalid response: 401 Unauthorized when loading files like static/lab/vendors~main.52a0cabd079a8f53ed4d.js.

The Problem is that the client sends requests with the following request header:

Authorization: token 0024afb0.................181548ab

What it should look like:

Authorization: Basic aG9lbH................E5OTQ=

Do you have any idea what this might causes?

My current configuration looks like this:

<Location /jupyter>                                                                                                                                                                                                                                                                                                          

        AuthName "..."
        AuthType Basic
        AuthBasicProvider ldap
        ... # other ldap stuff

        Require valid-user

        # Preserve Host header to avoid cross-origin problems
        ProxyPreserveHost On

        ProxyPass        "http://.../jupyter" keepalive=On
        ProxyPassReverse "http://.../jupyter"
        ProxyPassReverse "https://.../jupyter"

        # JupyterHub
        RewriteCond %{HTTP:Connection} Upgrade [NC]
        RewriteCond %{HTTP:Upgrade} websocket [NC]

        RewriteRule /jupyter/(.*) ws://.../jupyter/$1 [P,L]
        RewriteRule /jupyter/(.*) http://.../jupyter/$1 [P,L]

        # TimeOut 600

</Location>

Hoeze

Posted 2019-09-13T09:17:39.323

Reputation: 141

No answers