I am using djangosaml2 to authenticate my users. I've been using it for a long time now with no problem. I am currently in the process of upgrading Python and Django to newer versions and the authentication does not work anymore.
Using the logs, I see that the authentication in djangosaml2 is successful but in my view, the request.user is an anonymous user.
Here are the working and none-working library versions that I use:
- Python: 2.7 --> 3.8
- Django: 1.9 --> 1.11
- djangosaml2: 0.17.2 (in both evns.)
- pysaml2: 4.0.5 --> 6.5.1 (tested also with 4.0.5)
Additional Info:
I see that the call to /saml2/acs/ redirects to / (access to my site) and the response includes the session_id.
The next HTTP call - to / - includes the received session_id.
However, in the Database I do not see this session id. As the session id is not found in the Dbase, it is indeed considered as anonymous.
Why is the session id is not stored?