Set content security policy at Jenkins startup

Description

STDCI summary requires some content security policy to be set so that Jenkins won't add blocking headers to the summary HTML.

The required policy is:

sandbox allow-scripts; default-src 'self' https://cdnjs.cloudflare.com; img-src 'self'; style-src 'self' https://cdnjs.cloudflare.com;

Documentation can be found here

Activity

Show:

Former user July 25, 2018 at 12:28 AM

Settings applied to Prod, closing

Former user July 19, 2018 at 12:45 PM

Thanks for providing the page. It looked fine when I opened it and had the following CSP:

Content-Security-Policy: sandbox allow-scripts; default-src 'self' https://cdnjs.cloudflare.com; img-src 'self'; style-src 'self' https://cdnjs.cloudflare.com;

I assume it was set using the script console. The only error in JS console that I see is when clicking on the "log" link: "Refused to apply inline style ..." - I assume that is OK since the log is open raw anyways. If not we should add 'unsafe-inline' to default-src but that would potentially lower security.

Applied the value through hudson.model.DirectoryBrowserSupport.CSP and updated the patch

Former user July 19, 2018 at 6:45 AM

http://jenkins-staging.phx.ovirt.org/job/jenkins_standard-check-patch/1636/artifact/ci_build_summary.html

I think we should give higher priority to this task since is writing some code to allow projects to choose which UI they want to see.

Former user July 3, 2018 at 10:40 AM

Indeed, there seems to have been a misunderstanding about the reasoning behind this change. could you please share a page that is broken without the required change? I want to see what we are fixing so that we can ensure it works and Prod can be patched.

Barak Korren July 3, 2018 at 8:20 AM

you don't need to "solve" this, as I commented on the Puppet patch, you shouldn't have don this at all in the first place. asked you to relex CPS settings in jenkins not add more setting in Apache.

Fixed

Details

Assignee

Reporter

Priority

Created June 14, 2018 at 7:46 AM
Updated September 2, 2018 at 3:50 PM
Resolved July 25, 2018 at 12:28 AM

Flag notifications