You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behaviour
Should be able to SSO in to CKAN
Logs
Getting the error below when trying to SSO after upgrade to CKAN 2.9.9 and change beaker.session to cookie.
Traceback (most recent call last):
File "/usr/lib/ckan/ckan-py3/src/ckan/ckan/config/middleware/flask_app.py", line 66, in call
return self.app(environ, start_response)
File "/usr/lib/ckan/ckan-py3/src/ckan/ckan/config/middleware/common_middleware.py", line 114, in call
return self.app(environ, start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/repoze/who/middleware.py", line 86, in call
app_iter = app(environ, wrapper.wrap_start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/fanstatic/publisher.py", line 224, in call
return self.app(environ, start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/fanstatic/injector.py", line 64, in call
response = request.get_response(self.app)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/webob/request.py", line 1313, in send
status, headers, app_iter = self.call_application(
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/webob/request.py", line 1278, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/flask/app.py", line 2463, in call
return self.wsgi_app(environ, start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/middleware.py", line 156, in call
return self.wrap_app(environ, session_start_response)
File "/usr/lib/ckan/ckan-py3/src/ckan/ckan/config/middleware/common_middleware.py", line 58, in call
return self.app(environ, start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/flask/app.py", line 2453, in wsgi_app
return response(environ, start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/werkzeug/wrappers/base_response.py", line 699, in call
start_response(status, headers)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/middleware.py", line 150, in session_start_response
session.persist()
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/session.py", line 875, in persist
self._session().save()
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/session.py", line 723, in save
self._create_cookie()
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/session.py", line 737, in _create_cookie
val = self._encrypt_data()
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/session.py", line 381, in _encrypt_data
data = self.serializer.dumps(session_data)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/util.py", line 469, in dumps
return zlib.compress(json.dumps(data).encode('utf-8'))
File "/usr/lib/python3.8/json/init.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python3.8/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.8/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python3.8/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type NameID is not JSON serializable
The text was updated successfully, but these errors were encountered:
Describe the bug
With CKAN vulnerability, we are asked to upgrade to CKAN 2.9.9 and set session to use cookie.
https://docs.ckan.org/en/2.9/changelog.html
ckanext-saml2auth version affected
v1.3.0
Expected behaviour
Should be able to SSO in to CKAN
Logs
Getting the error below when trying to SSO after upgrade to CKAN 2.9.9 and change beaker.session to cookie.
Traceback (most recent call last):
File "/usr/lib/ckan/ckan-py3/src/ckan/ckan/config/middleware/flask_app.py", line 66, in call
return self.app(environ, start_response)
File "/usr/lib/ckan/ckan-py3/src/ckan/ckan/config/middleware/common_middleware.py", line 114, in call
return self.app(environ, start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/repoze/who/middleware.py", line 86, in call
app_iter = app(environ, wrapper.wrap_start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/fanstatic/publisher.py", line 224, in call
return self.app(environ, start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/fanstatic/injector.py", line 64, in call
response = request.get_response(self.app)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/webob/request.py", line 1313, in send
status, headers, app_iter = self.call_application(
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/webob/request.py", line 1278, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/flask/app.py", line 2463, in call
return self.wsgi_app(environ, start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/middleware.py", line 156, in call
return self.wrap_app(environ, session_start_response)
File "/usr/lib/ckan/ckan-py3/src/ckan/ckan/config/middleware/common_middleware.py", line 58, in call
return self.app(environ, start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/flask/app.py", line 2453, in wsgi_app
return response(environ, start_response)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/werkzeug/wrappers/base_response.py", line 699, in call
start_response(status, headers)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/middleware.py", line 150, in session_start_response
session.persist()
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/session.py", line 875, in persist
self._session().save()
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/session.py", line 723, in save
self._create_cookie()
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/session.py", line 737, in _create_cookie
val = self._encrypt_data()
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/session.py", line 381, in _encrypt_data
data = self.serializer.dumps(session_data)
File "/usr/lib/ckan/ckan-py3/lib/python3.8/site-packages/beaker/util.py", line 469, in dumps
return zlib.compress(json.dumps(data).encode('utf-8'))
File "/usr/lib/python3.8/json/init.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python3.8/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.8/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python3.8/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type NameID is not JSON serializable
The text was updated successfully, but these errors were encountered: