disabling CSP

47 views
Skip to first unread message

Richard Ginga

unread,
May 3, 2017, 8:10:49 AM5/3/17
to jenkins...@googlegroups.com
I can disable CSP from the script console with this

System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")

what is the correct syntax for setting this a jenkins start time on Ubuntu

-Dhudson.model.DirectoryBrowserSupport.CSP=\"\

-Dhudson.model.DirectoryBrowserSupport.CSP="

-Dhudson.model.DirectoryBrowserSupport.CSP= 

--
Dick Ginga
Build Engineer

Victor Martinez

unread,
May 4, 2017, 2:21:44 PM5/4/17
to Jenkins Users
In your case you need to override with an empty string with double quotes.

You can find further drtails in the below wiki:
- https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy
- https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties

Cheers

Richard Ginga

unread,
May 4, 2017, 2:32:51 PM5/4/17
to jenkins...@googlegroups.com
Thank you, i read all that but it still came back each time. I'll try the ""

thanks again


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/df514688-c7df-40d6-b2e9-efc08751f857%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Victor Martinez

unread,
May 4, 2017, 3:34:05 PM5/4/17
to Jenkins Users
If it doesn't work then you can force it through the groovy.init.d folder:

I just realized I used it in the past with something like since I couldn't find the way to escape all those flags within the java properties, so I created a groovy file under the groovy.init.d file and it worked like a charm.

Cheers

Richard Ginga

unread,
May 4, 2017, 4:44:16 PM5/4/17
to jenkins...@googlegroups.com
Victor, thanks, that was my problem, getting the correct output by escaping things

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages