Open PKizzle opened 11 months ago
Thanks for the notice, I must've missed this in the django 5.0 release notes. For the time being we'll stay with the pickle serializer; there'd have to be quite a few changes to make the JSON serializer work since we store things like FlowPlan
instances in the session, and we rely on them being serialized as-is with all the database models
I do in general agree that there are potential security concerns with pickle but I think its outside of the threat model as if someone was able to write data to the session in an uncontrolled way (be it with pickle or json), they could become any user
I understand that moving away from pickle requires a lot of work in the form of custom de-/serialization methods. Could you make a rough estimate how many classes require custom de-/serialization in order to move to the JSON serializer?
If someone would want to work on that topic how is it possible to debug the session serialization? The log files do not contain any errors hinting in that direction.
The main one I'm thinking of is the flow executor which stores the flow plan with all bindings and such in the session, but realistically all uses of the session would have to be inspected to be sure
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug With the upcoming Django 5.0 release (currently release candidate 1 is available) the PickleSerializer is no longer supported. Currently authentik uses this serializer for session serialization. This also has security implications as the PickleSerializer is deemed dangerous. Switching to the JSONSerializer is currently not possible as it prevents authentik from starting up correctly.
To Reproduce
Expected behavior Authentik should startup correctly.
Screenshots Prometheus alert https://ok8.sh/i/hguJa6.png
Logs authentik-server.log authentik-worker.log
Version and Deployment (please complete the following information):