1- Security considerations
2- =======================
1+ Introduction
2+ ============
33
44Authentication and Authorization are quite security relevant topics on its own.
55Make sure you understand SAML2 and its implications, specifically the
@@ -12,9 +12,24 @@ need for direct communication between SP and IdP. However, for security the use
1212of cryptographic signatures (both while sending and receiving messages) must be
1313examined and the private keys in use must be kept closely guarded.
1414
15+ Content Security Policy
16+ =======================
17+
1518When using POST-Bindings, the Browser is presented with a small HTML-Form for
1619every redirect (both Login and Logout), which is sent using JavaScript and
1720sends the Data to the selected IdP. If your application uses technices such as
1821Content Security Policy, this might affect the calls. Since Version 1.9.0
1922djangosaml2 will detect if django-csp is installed and update the Content
2023Security Policy accordingly.
24+
25+ [ Content Security Policy] ( https://content-security-policy.com/ ) is an important
26+ HTTP-Extension to prevent User Input or other harmful sources from manipulating
27+ application data. Usage is strongly advised, see
28+ [ OWASP Control] ( https://owasp.org/www-community/controls/Content_Security_Policy ) .
29+
30+ To enable CSP with [ django-csp] ( https://django-csp.readthedocs.io/ ) , simply
31+ follow their [ installation] ( https://django-csp.readthedocs.io/en/latest/installation.html )
32+ and [ configuration] ( https://django-csp.readthedocs.io/en/latest/configuration.html )
33+ guides: djangosaml2 will automatically blend in and update the headers for
34+ POST-bindings, so you must not include exceptions for djangosaml2 in your
35+ global configuration.
0 commit comments