Re: Shibboleth login

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hi Tonu:

In message
<CABDFm8g24B=2vifajtnWqyvXjCv9oZ-+DpJZxfZZmrvR42gySg@mail.gmail.com>,
Tonu Mikk writes:

>Thanks John for the suggestions!  I was not able to configure Shibboleth to
>work with Apache ProxyPass and the Roundup's standalone webserver
>configuration.  I am afraid this is due to my own incompetence not due to
>the detailed instructions you provided.
>
>I switched gears a bit and tried running roundup as wsgi handler
><http://roundup.sourceforge.net/docs/installation.html#wsgi-handler> and
>then proxying to the server with Apache.  When I run the WSGI Demo app
><https://docs.python.org/2/library/wsgiref.html#module-wsgiref.simple_server>
>it returns the environment variables and I can see that it returns
>HTTP_REMOTE_USER value.  However, Roundup seems to expect REMOTE_USER value
>not HTTP_REMOTE_USER.  There is an example of how to change the name in Trac
>configuration <https://trac.edgewall.org/wiki/TracModWSGI>:
>
>environ['REMOTE_USER'] = environ['HTTP_REMOTE_USER'].strip()
>
>
>How could I change the WSGI directions provided in the roundup
>documentation to incorporate
>
>"environ['REMOTE_USER'] = environ['HTTP_REMOTE_USER'].strip()" ?
>
>
>Roundup's wsgi configuration:
>
>from wsgiref.simple_server import make_server
># obtain the WSGI request dispatcherfrom roundup.cgi.wsgi_handler
>import RequestDispatchertracker_home = 'demo'
>app = RequestDispatcher(tracker_home)
>httpd = make_server('', 8917, app)
>httpd.serve_forever()

This is a shot in the dark but, does this work?

==
import os
os.environ['REMOTE_USER'] = os.environ['HTTP_REMOTE_USER']

from wsgiref.simple_server import make_server

# obtain the WSGI request dispatcher
from roundup.cgi.wsgi_handler import RequestDispatcher
tracker_home = 'demo'
app = RequestDispatcher(tracker_home)

httpd = make_server('', 8917, app)
httpd.serve_forever()
==

basically modify the environment array to map HTTP_REMOTE_USER to
REMOTE_USER before calling the RequestDispatcher.

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.