Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

problem using openid behind proxy #2

Open
osallou opened this issue Dec 10, 2012 · 7 comments
Open

problem using openid behind proxy #2

osallou opened this issue Dec 10, 2012 · 7 comments

Comments

@osallou
Copy link
Member

osallou commented Dec 10, 2012

When behind a web proxy, there is an issue with openid.
After authentication on remote provider, user is redirected back to the site on a wrong address, the one given in [server:main] for host and port.

It does not seem to take into account the value defined in init.py:

config.add_openid_login(realm='....

@osallou
Copy link
Member Author

osallou commented Dec 11, 2012

Ok, independently from realm setup from config, it seems it was related to a proxy configuration in Apache (missing ProxyPreserveHost On).

Seems to "work" now. though, on page return it fails:

after openid provider url is back to:

http://mobyletest.genouest.org/login/openid/callback?janrain_nonce=2012-12-11T12%3A20%3A30ZDB7OMm

and it ends with an 500 internal error

@asaladin
Copy link
Contributor

The return url looks fine. You should have more details for the internal error on the console logs

@osallou
Copy link
Member Author

osallou commented Dec 11, 2012

Here are the logs


Generated checkid_setup request to http://www.myopenid.com/server with assocication XXXXXXXXX
2012-12-11 13:32:04 [12708] [ERROR] Error handling request
Traceback (most recent call last):
  File "/root/mobyle2/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 103, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/root/mobyle2/local/lib/python2.7/site-packages/pyramid/router.py", line 251, in __call__
    response = self.invoke_subrequest(request, use_tweens=True)
  File "/root/mobyle2/local/lib/python2.7/site-packages/pyramid/router.py", line 227, in invoke_subrequest
    response = handle_request(request)
  File "/root/mobyle2/local/lib/python2.7/site-packages/pyramid_debugtoolbar/toolbar.py", line 106, in toolbar_tween
    return handler(request)
  File "/root/mobyle2/local/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween
    response = handler(request)
  File "/root/mobyle2/local/lib/python2.7/site-packages/pyramid/router.py", line 117, in handle_request
    root = root_factory(request)
  File "/root/mobyle2/local/lib/python2.7/site-packages/velruse/providers/openid.py", line 246, in callback
    raise ThirdPartyFailure("No OpenID Session has begun.")
ThirdPartyFailure: No OpenID Session has begun.
2012-12-11 13:32:04,980 ERROR [gunicorn.error][MainThread] Error handling request
Traceback (most recent call last):
  File "/root/mobyle2/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 103, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/root/mobyle2/local/lib/python2.7/site-packages/pyramid/router.py", line 251, in __call__
    response = self.invoke_subrequest(request, use_tweens=True)
  File "/root/mobyle2/local/lib/python2.7/site-packages/pyramid/router.py", line 227, in invoke_subrequest
    response = handle_request(request)
  File "/root/mobyle2/local/lib/python2.7/site-packages/pyramid_debugtoolbar/toolbar.py", line 106, in toolbar_tween
    return handler(request)
  File "/root/mobyle2/local/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween
    response = handler(request)
  File "/root/mobyle2/local/lib/python2.7/site-packages/pyramid/router.py", line 117, in handle_request
    root = root_factory(request)
  File "/root/mobyle2/local/lib/python2.7/site-packages/velruse/providers/openid.py", line 246, in callback
    raise ThirdPartyFailure("No OpenID Session has begun.")
ThirdPartyFailure: No OpenID Session has begun.

@asaladin
Copy link
Contributor

looks like it's working now. BTW you should deactivate the pyramid debug toolbar, or set it to only recognize pre-defined IP.

@osallou
Copy link
Member Author

osallou commented Dec 11, 2012

it will be deactivated, it was for testing.

I still have the error.

However, while testing with toolbar I see an error in the json.dump of views.py:

TypeError: datetime.date(1974, 7, 29) is not JSON serializable

the dump of the result from openid contains my birthdate, and it fails to serialize it.

@asaladin
Copy link
Contributor

i was able to login on your portal, it worked but not anymore...

@asaladin
Copy link
Contributor

works again just now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants