Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to relax Jenkins security rules for Allure?

Tags:

jenkins

allure

I tried to add this in Jenkins Script Console, but it didn't help:

"-Dhudson.model.DirectoryBrowserSupport.CSP=default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline';"

How to do this? Or what is wrong?

like image 267
Алексей Песоцкий Avatar asked Feb 03 '16 15:02

Алексей Песоцкий


People also ask

On which two factors Jenkins security depends?

Security Architecture of Jenkins The key components of this mechanism are the followings: Permission, which represents an activity that requires a security privilege. This is usually a verb, like "configure", "administer", "tag", etc. Authentication , which represents the current user and roles (AKA groups) he/she has.


1 Answers

You posted the start parameter for java. If you would like to test it inside the console try this:

System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline';")

If you want to change the property for every start, you can add:

-Dhudson.model.DirectoryBrowserSupport.CSP="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline';"

to your start parameter, so that it might look like:

java -Dhudson.model.DirectoryBrowserSupport.CSP="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline';" -jar jenkins.war

If you need further informations, you can take a look at JENKINS Configuring Content Security Policy

like image 170
S.Spieker Avatar answered Oct 08 '22 13:10

S.Spieker