academic-innovation / django-lti

LTI Advantage support for Django projects.
https://academic-innovation.github.io/django-lti/
MIT License
16 stars 7 forks source link

Support more secure Content-Security-Policy headers #10

Open michaelwheeler opened 2 years ago

michaelwheeler commented 2 years ago

Currently to make Django projects embeddable within an LMS, we need to disable the django.middleware.clickjacking.XFrameOptionsMiddleware middleware. This eliminates a barrier, but opens the site up to potential clickjacking attacks. The more flexible and recommended way of handling these security restrictions is to use Content-Security-Policy headers, with frame-ancestors listing allowable domains. It might be a good idea to have some functionality built into our library to automatically generate the list of allowable domains with the set of active platforms or registrations.