Skip to content

Commit 57ad2ba

Browse files
committed
chore: added a FAQ in the Documentation related to unsolicited response 403
1 parent 3f49c1e commit 57ad2ba

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs/source/contents/faq.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,11 @@ case of a problem, much harder to debug.
2626

2727
Following that pattern then I should import the application with
2828
import saml but unfortunately that module name is already used in pysaml2.
29+
30+
**saml2.response.UnsolicitedResponse: Unsolicited response**
31+
32+
If you are experiencing issues with unsolicited requests this is due to the fact that
33+
cookies not being sent when using the HTTP-POST binding. You have to configure samesite
34+
djangosaml2 middleware (see setup documentation) and also consider upgrading
35+
to Django 3.1 or higher.
36+
If you can't do that, configure "allow_unsolicited" to True in pySAML2 configuration.

docs/source/contents/setup.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ You can even configure the SAML cookie name as follows::
7171
SAML_SESSION_COOKIE_NAME = 'saml_session'
7272

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

7676
SESSION_COOKIE_SECURE = True
7777

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

8585
Authentication backend
8686
======================

0 commit comments

Comments
 (0)