Re: Shibboleth login

Tonu Mikk <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <CABDFm8gyiT-UfpSPSShUwWz=xahgkvxgUfkKHMsXtJsDfPq-6g@mail.gmail.com>
Thanks, I tried adding to the wsgi config file (support.py)

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

I get the following error:
[swadm@drcweb-prd trackers]$ python support.py
Traceback (most recent call last):
  File "support.py", line 2, in <module>
    os.environ['REMOTE_USER'] = os.environ['HTTP_REMOTE_USER'].strip
  File "/usr/lib64/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'HTTP_REMOTE_USER'

I wonder if the os.environ is different than the wsgi environment?  The
HTTP_REMOTE_USER is definately present in wsgi environment.

On Mon, Dec 31, 2018 at 8:22 PM John P. Rouillard <[email protected]> wrote:

> 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.
>
>

-- 
Tonu Mikk
Adaptive Technologist | Disability Resource Center |
diversity.umn.edu/disability
University of Minnesota | umn.edu
[email protected] | 612-625-3307

_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
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.