Skip to content

Commit

Permalink
chore: added a FAQ in the Documentation related to unsolicited respon…
Browse files Browse the repository at this point in the history
…se 403
  • Loading branch information
peppelinux committed May 22, 2021
1 parent 3f49c1e commit 57ad2ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions docs/source/contents/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@ case of a problem, much harder to debug.

Following that pattern then I should import the application with
import saml but unfortunately that module name is already used in pysaml2.

**saml2.response.UnsolicitedResponse: Unsolicited response**

If you are experiencing issues with unsolicited requests this is due to the fact that
cookies not being sent when using the HTTP-POST binding. You have to configure samesite
djangosaml2 middleware (see setup documentation) and also consider upgrading
to Django 3.1 or higher.
If you can't do that, configure "allow_unsolicited" to True in pySAML2 configuration.
4 changes: 2 additions & 2 deletions docs/source/contents/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ You can even configure the SAML cookie name as follows::
SAML_SESSION_COOKIE_NAME = 'saml_session'

Remember that in your browser "SameSite=None" attribute MUST also
have the "Secure" attribute, which is required in order to use "SameSite=None".
have the "Secure" attribute, which is required in order to use "SameSite=None"::

SESSION_COOKIE_SECURE = True

Expand All @@ -80,7 +80,7 @@ have the "Secure" attribute, which is required in order to use "SameSite=None".
djangosaml2 will attempt to set the ``SameSite`` attribute of the SAML session cookie to ``None`` so that it can be
used in cross-site requests, but this is only possible with Django 3.1 or higher. If you are experiencing issues with
unsolicited requests or cookies not being sent (particularly when using the HTTP-POST binding), consider upgrading
to Django 3.1 or higher.
to Django 3.1 or higher. If you can't do that, configure "allow_unsolicited" to True in pySAML2 configuration.

Authentication backend
======================
Expand Down

0 comments on commit 57ad2ba

Please sign in to comment.