fangli/django-saml2-auth

XML Parse error django-saml2-auth SSO when trying to authenticate through okta

vinhta916 opened this issue · 1 comments

This error started after rebuilding my docker container with the same compose file and dockerfile. Nothing has changed.

django_gunicorn | Internal Server Error: /saml2_auth/acs/
django_gunicorn | Traceback (most recent call last):
django_gunicorn |   File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
django_gunicorn |     response = get_response(request)
django_gunicorn |   File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 126, in _get_response
django_gunicorn |     response = self.process_exception_by_middleware(e, request)
django_gunicorn |   File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 124, in _get_response
django_gunicorn |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
django_gunicorn |   File "/usr/local/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
django_gunicorn |     return view_func(*args, **kwargs)
django_gunicorn |   File "/usr/local/lib/python3.7/site-packages/django_saml2_auth/views.py", line 159, in acs
django_gunicorn |     resp, entity.BINDING_HTTP_POST)
django_gunicorn |   File "/usr/local/lib/python3.7/site-packages/saml2/client_base.py", line 714, in parse_authn_request_response
django_gunicorn |     binding, **kwargs)
django_gunicorn |   File "/usr/local/lib/python3.7/site-packages/saml2/entity.py", line 1194, in _parse_response
django_gunicorn |     response = response.verify(keys)
django_gunicorn |   File "/usr/local/lib/python3.7/site-packages/saml2/response.py", line 1051, in verify
django_gunicorn |     if self.parse_assertion(keys):
django_gunicorn |   File "/usr/local/lib/python3.7/site-packages/saml2/response.py", line 937, in parse_assertion
django_gunicorn |     if not self._assertion(assertion, False):
django_gunicorn |   File "/usr/local/lib/python3.7/site-packages/saml2/response.py", line 817, in _assertion
django_gunicorn |     if not self.condition_ok():
django_gunicorn |   File "/usr/local/lib/python3.7/site-packages/saml2/response.py", line 616, in condition_ok
django_gunicorn |     raise Exception("Not for me!!!")
django_gunicorn | Exception: Not for me!!!```

Not sure what happened. The error disappeared after a while