What Apache module are you using to handle authentication?

If that Apache module is not configured/implemented to set the necessary 
attribute in the internal Apache request object, then there will not be an 
attribute for the currently logged in user to be copied into the REMOTE_USER 
attribute.

In other words, it is pretty well out of the control of mod_wsgi and it is 
dependent on the Apache authentication module being used doing the correct 
thing, or of you configuring that Apache module to set the user attribute 
correctly.

Graham

On 14/02/2014, at 1:02 AM, Henry Medina <[email protected]> wrote:

> Hello All,
> 
>      I have a flask app that needs to run on apache using mod_wsgi.  I'm 
> having an issue passing remote_user to the app.  If I try to get 
> flask.request.environ['REMOTE_USER'], I get None, and if do 
> os.environ['USER'], I get the user that apache is running as.  The way I look 
> at it, apache is not passing on the remote user to wsgi.  Here's the 
> virtualhost config:
> 
> WSGISocketPrefix /var/run/wsgi
> WSGIPassAuthorization On
> 
> <VirtualHost *>
>     ServerName server-fqdn
> 
>     WSGIDaemonProcess console user=admin group=apache threads=5
>     WSGIScriptAlias / /var/www/app/web/app.wsgi
> 
>     <Directory /var/www/app/web>
>         WSGIProcessGroup console
>         WSGIApplicationGroup %{GLOBAL}
>         Order deny,allow
>         Allow from all
>     </Directory>
> </VirtualHost>
> 
> This is an internal application, and users are logging in from their windows 
> machine.  If the remote_user var gets passed to the wsgi app, then the app 
> will do its thing and authenticate against AD.  At the moment, it can't do 
> that, since I can't get the ever elusive 'REMOTE_USER' var passed on 
> properly.  Any ideas?
> 
> 
> Thanks,
> 
> Henry
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to