-
Notifications
You must be signed in to change notification settings - Fork 8
Support CSP Nonce for Jinja2 Assets #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add support for CSP Nonces for strict-dynamic directive.
- Added change log file.
- Continued unsafe inline stuffs.
- More inline things. - More nonce usage.
- More inline things. - More nonce usage.
- Move data images to actual images.
- Set no-cache for logged in users. - Updated change log files.
- Fixed nonce typos. - Removed dev console log. - Added TODO comments.
wardi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be rough to merge with the next version of ckan, but maybe still better than copying all these templates to ckanext-canada.
The bits that reference svgs that actually live in ckanext-canada should be moved over there or the svg files should be moved here, though
- Revert any overrides, they ar ein canada plugin now.
|
Yeah merging is gunna be a pain for sure, made sure to put the comments in so it can help us in the future |
- Revert any overrides, they ar ein canada plugin now.
- Revert any overrides, they ar ein canada plugin now.
- New validator for http header values.
Another thing from the VA scan, we need to support the
strict-dynamicdirective in the Content-Security-Policy header to properly use the WET scripts and WET JS Builder. Thestrict-dynamicdirective basically says that other scripts are allowed to add script node objects to the DOM and those scripts are allowed to get executed. This NEEDS to have nonces to work securely though. And it seems that if you have thestrict-dynamicdirective set, some browsers will ignore some of the other directives so we need to add the nonce to all assets, hence this code addition.The
CSP_NONCEenviron value gets set in thecanada_securityplugin now from this PR: open-data/ckanext-canada#1599