Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REMOTE_USER not available to proxied applications #14

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

REMOTE_USER not available to proxied applications #14

bos opened this issue Mar 29, 2011 · 2 comments

Comments

@bos
Copy link

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
Copy link
Owner

bmuller commented Apr 15, 2011

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

@ghost
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants