Re: Shibboleth login
Tonu Mikk <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <CABDFm8i-p7OPNekQ31yxoRvi0rZ+YAWNaOwMeRk5gy-TdN1U9A@mail.gmail.com> |
This is a good proof that it works. I have the files from you Tom! Thanks for sharing those. I will use them to try to create the Apache config using mod_wsgi. My environment is a bit different - Python 2.7 and no virtual environment. I am not familiar with ansible. On Fri, Jan 4, 2019 at 11:41 AM Tom Ekberg <[email protected]> wrote: > FYI > > > I have the latest (less a few updates, perhaps) roundup using > > > > - apache with mod_wsgi and mod_shib2 > - virtualenv > - python 3 > - deploy with ansible to remote host > - PostgreSQL 11.1 > > > Since I work for the state of Washington, any/all of my code is available > upon request. So far I have 2 trackers working and am gradually converting > our other 12 trackers. > > > > > > > ------------------------------ > *From:* Tonu Mikk <[email protected]> > *Sent:* Friday, January 4, 2019 8:40 AM > *To:* [email protected] > *Cc:* [email protected] > *Subject:* Re: [Roundup-users] Shibboleth login > > My Apache config is using a proxy (below). This is essentially the same as > when using the Roundup's built in server. I can try changing it to use > mod_wsgi instead and then dropping the wsgi makeserver from the Roundup's > wsgi config file. It would be nice if the proxy method worked as well > though. I am not at all sure how mod_wsgi and Shibboleth will play > together. > > <VirtualHost *:443> > ServerName oranges.drc.umn.edu > <Location /> > AuthType shibboleth > ShibRequestSetting requireSession 1 > Require valid-user > RequestHeader set REMOTE-USER %{REMOTE_USER}s > </Location> > > ProxyPass /Shibboleth.sso ! > ProxyPass / http://localhost:8080/ > > SSLEngine on > # cert file reference omitted > > </VirtualHost> > > > > On Thu, Jan 3, 2019 at 7:02 PM John P. Rouillard <[email protected]> > wrote: > > Hi Tonu: > > In message < > CABDFm8jz8jH_DrHMfDZpx6KCUDZdY+WdUkWO5nUR9oiji45OWA@mail.gmail.com> > , > Tonu Mikk writes: > >This is getting me closer. The Shibboleth login works now. I > >authenticated with Shibboleth and that opens the Roundup tracker. > > Hurray success. Ralf Schlatterbeck can you chime in here since you > run wsgi. > > >However I get a new error immediately after logging in and when I click on > >the links in the menu. For example when I click on the "User List" menu > >item, I get the following message: > > > >127.0.0.1 - - [03/Jan/2019 14:04:22] "GET /user HTTP/1.1" 200 5658 > >Traceback (most recent call last): > > File "/usr/lib64/python2.7/wsgiref/handlers.py", line 86, in run > > self.finish_response() > > File "/usr/lib64/python2.7/wsgiref/handlers.py", line 127, in > >finish_response > > for data in self.result: > >TypeError: 'NoneType' object is not iterable > >127.0.0.1 - - [03/Jan/2019 14:04:22] "GET /user HTTP/1.1" 500 59 > >---------------------------------------- > >Exception happened during processing of request from ('127.0.0.1', 42120) > >Traceback (most recent call last): > > File "/usr/lib64/python2.7/SocketServer.py", line 295, in > >_handle_request_noblock > > self.process_request(request, client_address) > > File "/usr/lib64/python2.7/SocketServer.py", line 321, in > process_request > > self.finish_request(request, client_address) > > File "/usr/lib64/python2.7/SocketServer.py", line 334, in finish_request > > self.RequestHandlerClass(request, client_address, self) > > File "/usr/lib64/python2.7/SocketServer.py", line 649, in __init__ > > self.handle() > > File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 124, in > handle > > handler.run(self.server.get_app()) > > File "/usr/lib64/python2.7/wsgiref/handlers.py", line 92, in run > > self.close() > > File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 33, in close > > self.status.split(' ',1)[0], self.bytes_sent > >AttributeError: 'NoneType' object has no attribute 'split' > >---------------------------------------- > > > >I suspect this has something to do with the strip() function. Any thoughts > >on how to fix it? > > I don't think it's the strip function, you can always remove the > .strip() to check. I suspect the strip isn't needed unless the name is > space padded. > > It looks like result (self.resul) is never returned/set. > > >> == > >> from roundup.cgi.wsgi_handler import RequestDispatcher > >> > >> class MyDispatcher(RequestDispatcher): > >> def __call__(self, environ, start_response): > >> environ['REMOTE_USER'] = environ['HTTP_REMOTE_USER'].strip() > >> RequestDispatcher.__call__(self,environ,start_response) > >> > >> from wsgiref.simple_server import make_server > >> > >> # use our request dispatcher > >> tracker_home = 'demo' > >> app = MyDispatcher(tracker_home) > >> > >> httpd = make_server('', 8917, app) > >> httpd.serve_forever() > >> == > > https://issues.roundup-tracker.org/issue2551005 mentions: > > > https://stackoverflow.com/questions/12408871/setup-roundup-with-wsgi-and-apache > > Can you read through that issue and its links. The stackoverflow > recommends removing the make_server/serve_forever with their mod_wsgi > config. Ralf's example doesn include those at all. I am not sure what > apache config setup needs to be used with the altered wsgi or what > your apache config looks like. > > Maybe something else from that issue will give you an idea. I have > never used wsgi and really don't have any ideas. > > Sorry, I think I have reached the depth of my knowledge here. > > -- > -- 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 > -- 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
Outlook-vg4lic20.jpg
(image/jpeg, 14.3 KB) - not displayed