Skip to content

Commit 6d99cd5

Browse files
update CSP to match commit a422674f15099d6bd3fc3fa1879c2b23adffdc86 (#144)
Co-authored-by: labkey-jeckels <5114642+labkey-jeckels@users.noreply.github.com>
1 parent d548178 commit 6d99cd5

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

application.properties

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -165,32 +165,33 @@ context.workDirLocation=/work/Tomcat/localhost
165165

166166
## START OF CSP ENFORCE BLOCK (DO NOT CHANGE THIS TEXT)
167167
csp.enforce=\
168-
default-src 'self' https: ;\
169-
connect-src 'self' ${LABKEY.ALLOWED.CONNECTIONS} ;\
170-
object-src 'none' ;\
171-
style-src 'self' https: 'unsafe-inline' ;\
172-
img-src 'self' https: data: ;\
173-
font-src 'self' data: ;\
174-
script-src 'self' 'unsafe-eval' 'strict-dynamic' 'nonce-${REQUEST.SCRIPT.NONCE}' ;\
175-
base-uri 'self' ;\
168+
default-src 'self' https: ; \
169+
connect-src 'self' ${CONNECTION.SOURCES} ; \
170+
object-src 'none' ; \
171+
style-src 'self' https: 'unsafe-inline' ${STYLE.SOURCES} ; \
172+
img-src 'self' https: data: ${IMAGE.SOURCES} ; \
173+
font-src 'self' data: ${FONT.SOURCES} ; \
174+
script-src 'self' 'unsafe-eval' 'strict-dynamic' 'nonce-${REQUEST.SCRIPT.NONCE}' ; \
175+
base-uri 'self' ; \
176176
upgrade-insecure-requests ;\
177-
frame-ancestors 'self' ;\
178-
report-uri https://www.labkey.org/admin-contentsecuritypolicyreport.api?${CSP.REPORT.PARAMS} ;
177+
frame-ancestors 'self' ; \
178+
frame-src 'self' ${FRAME.SOURCES} ; \
179+
report-uri https://www.labkey.org/admin-contentSecurityPolicyReport.api?cspVersion=e10&${CSP.REPORT.PARAMS} ;
179180
## END OF CSP ENFORCE BLOCK (DO NOT CHANGE THIS TEXT)
180181

181182
## START OF CSP REPORT BLOCK (DO NOT CHANGE THIS TEXT)
182183
csp.report=\
183-
default-src 'self' ; /* Limit the default to only the current server */\
184-
connect-src 'self' ${CONNECTION.SOURCES} ; /* For security purposes limit allowed connection sources, can be substituted and appended via the LabKey Admin UI */\
185-
object-src 'none' ; /* These tags are not currently used by LKS */\
186-
style-src 'self' 'unsafe-inline' ${STYLE.SOURCES} ; /* We currently have a few inline <style> tags that we are weeding out */\
187-
img-src 'self' data: ; /* Limit image loading locations */\
188-
font-src 'self' data: ${FONT.SOURCES} ; /* Limit font source loading locations */\
189-
script-src 'unsafe-eval' 'strict-dynamic' 'nonce-${REQUEST.SCRIPT.NONCE}' ; /* Limit scripts that are allowed to those with nonces or transitive scripts */\
190-
base-uri 'self' ; /* Limit the base tags to only source from current server */\
191-
frame-ancestors 'self' ; /* Only allow iframe resources to the current server */\
192-
frame-src 'self' ${FRAME.SOURCES} ; /* Only allow iframe resources from the current server plus explicitly declared external sources */\
193-
report-uri https://www.labkey.org/admin-contentsecuritypolicyreport.api?${CSP.REPORT.PARAMS} ; /* Reports any encountered CSP conflicts to the supplied URL */
184+
default-src 'self' ; /* Limit the default to only the current server */\
185+
connect-src 'self' ${CONNECTION.SOURCES} ; /* Limit allowed connection sources */\
186+
object-src 'none' ; /* These tags are not currently used by LKS */\
187+
style-src 'self' 'unsafe-inline' ${STYLE.SOURCES} ; /* We currently have a few inline <style> tags that we are weeding out */\
188+
img-src 'self' data: ${IMAGE.SOURCES} ; /* Limit image loading locations */\
189+
font-src 'self' data: ${FONT.SOURCES} ; /* Limit font source loading locations */\
190+
script-src 'unsafe-eval' 'strict-dynamic' 'nonce-${REQUEST.SCRIPT.NONCE}' ; /* Limit scripts to those with nonces or transitive scripts */\
191+
base-uri 'self' ; /* Limit the base tags to only source from current server */\
192+
frame-ancestors 'self' ; /* Limit iframe content destinations (who can load this server's content into an iframe) */\
193+
frame-src 'self' ${FRAME.SOURCES} ; /* Limit iframe content sources (from what servers can this server's iframe content be loaded) */\
194+
report-uri https://www.labkey.org/admin-contentSecurityPolicyReport.api?cspVersion=r11&${CSP.REPORT.PARAMS} ; /* Report any encountered CSP violations to the supplied URL */
194195
## END OF CSP REPORT BLOCK (DO NOT CHANGE THIS TEXT)
195196

196197
## Load optional application.properties if file exists - used for one-off labkey cloud use cases etc.

0 commit comments

Comments
 (0)