RAP and Content Security Policy [message #1820908] |
Fri, 31 January 2020 07:09  |
Eclipse User |
|
|
|
I am currently working on a content security policy (CSP) for our RAP based application. Unfortunately, I could not find any resources regarding CSP and RAP. So, I started to define the policy step-by-step based on the errors reported in the browser and came up with the following policy which seems to work (at least no errors occurred during testing):
default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'
However, this means that the policy needs to allow unsafe inline style attributes and script tag bodies as well as unsafe dynamic code evaluation (e.g. text-to-JavaScript mechanisms such as JavaScript eval()). Unfortunately, RAP is using such constructs.
Obviously, this is not a safe policy. Does anyone have experience regarding CSP and RAP? Are there any recommendations or best practices regarding CSP and RAP? Are there any plans to improve the RAP source code in order to be able to define a safe policy?
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04196 seconds