Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - With CKAN vulnerability upgrade 2.9.9, getting the error below #89

Open
COGTeamGDMP opened this issue May 30, 2023 · 0 comments

Comments

@COGTeamGDMP
Copy link

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

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

No branches or pull requests

1 participant