Skip to content

REMOTE_USER not available to proxied applications #14

Open
bos opened this Issue Mar 29, 2011 · 2 comments

2 participants

@bos
bos commented Mar 29, 2011

I'm using mod_proxy and mod_auth_openid together, with a rewrite rule that should populate the X-Forwarded-User header from the contents of REMOTE_USER:

<Proxy *>
    AuthType OpenID
    require valid-user

    RewriteCond %{LA-U:REMOTE_USER} (.+)
    RewriteRule . - [E=RU:%1]
    RequestHeader add X-Forwarded-User %{RU}e
</Proxy>

The trouble is that the header set in the proxied requests always looks like this:

X-Forwarded-User: (null)

I can see that the OpenID session cookie is present in the request, though.

According to the mod-proxy-add-user github project, mod_auth_openid may not be setting REMOTE_USER at the right time, which is why it's not available.

@bmuller
Owner
bmuller commented Apr 15, 2011

I'll try to take a look at this over the weekend.

@ghost
ghost commented Jun 28, 2011

I found a workaround to this by adding the following line after r->user is set...

  r->user = apr_pstrdup(r->pool, idchar);
+ apr_table_set(r->headers_in, "X-Forwarded-User", r->user);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.