freeipa / freeipa-community-portal

[ABANDONED] FreeIPA Community Portal extension
GNU General Public License v3.0
4 stars 6 forks source link

HTTP error 500 without Kerberos credentials #3

Open tiran opened 8 years ago

tiran commented 8 years ago

The server should react more gracefully to internal errors like missing Kerberos credentials. Instead of a HTTP error 500, the portal should show an error page like "The community portal isn't correctly configured. Please contact the administrator."

[Fri Aug 07 12:21:31.944164 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201] mod_wsgi (pid=1608): Exception occurred processing WSGI script '/var/www/wsgi/freeipa_community_portal.wsgi'.
[Fri Aug 07 12:21:31.944296 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201] Traceback (most recent call last):
[Fri Aug 07 12:21:31.944411 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201]   File "/var/www/wsgi/freeipa_community_portal.wsgi", line 4, in <module>
[Fri Aug 07 12:21:31.944594 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201]     from freeipa_community_portal import app
[Fri Aug 07 12:21:31.944687 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201]   File "/srv/freeipa-community-portal/lib/python2.7/site-packages/freeipa_community_portal/app.py", line 30, in <module>
[Fri Aug 07 12:21:31.944869 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201]     from freeipa_community_portal.model.user import User
[Fri Aug 07 12:21:31.944974 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201]   File "/srv/freeipa-community-portal/lib/python2.7/site-packages/freeipa_community_portal/model/__init__.py", line 30, in <module>
[Fri Aug 07 12:21:31.945114 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201]     api.Backend.rpcclient.connect() # pylint: disable=no-member
[Fri Aug 07 12:21:31.945206 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201]   File "/usr/lib/python2.7/site-packages/ipalib/backend.py", line 63, in connect
[Fri Aug 07 12:21:31.945455 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201]     conn = self.create_connection(*args, **kw)
[Fri Aug 07 12:21:31.945539 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201]   File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 776, in create_connection
[Fri Aug 07 12:21:31.946006 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201]     principal = get_current_principal()
[Fri Aug 07 12:21:31.946101 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201]   File "/usr/lib/python2.7/site-packages/ipalib/util.py", line 76, in get_current_principal
[Fri Aug 07 12:21:31.946481 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201]     raise errors.CCacheError()
[Fri Aug 07 12:21:31.946567 2015] [wsgi:error] [pid 1608] [client 10.36.7.206:46201] CCacheError: did not receive Kerberos credentials