JN0-336 practice question 3 of 10
What is the purpose of using Content Security Policy (CSP) in web applications?
Full set: 75 questionsThe primary purpose of a Content Security Policy (CSP) is to mitigate and report on certain types of injection attacks, with Cross-Site Scripting (XSS) being the most prominent. CSP is an added layer of security that allows web administrators to control the resources a user agent is allowed to load for a given page. By defining a whitelist of trusted content sources, CSP instructs the browser to only execute scripts from those sources, effectively preventing the browser from loading malicious assets injected into a vulnerable web application.
B. Data transmission is encrypted by protocols like TLS/SSL, not by CSP, which is a policy for loading web page resources.
C. Multi-factor authentication is a process for verifying user identity and is unrelated to preventing script injection attacks.
D. User sessions are managed with mechanisms like cookies and server-side tokens, which are distinct from CSP's function.
- Juniper Networks Knowledge Base, Article KB31991, "[Junos] How to configure HTTP/HTTPS access for J-Web, including ciphers, and headers like HSTS, X-Frame-Options, Content-Security-Policy." This article explicitly shows how to configure a CSP header on a Juniper device to enhance security.
- Mozilla Developer Network (MDN), "Content Security Policy (CSP)." As a definitive resource on web standards, it states, "CSP makes it possible for server administrators to reduce or eliminate the vectors by which XSS can occur by specifying the domains that the browser should consider to be legitimate sources of executable scripts."
Keep practicing
Take the free JN0-336 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other JN0-336 practice questions
- Question 1Which protocol does JIMS commonly use for user authentication?
- Question 2Which of the following devices might JIMS interact with to enforce access control policie…
- Question 4You are asked to ensure that traffic that matches an IDP policy is not impacted until adm…
- Question 5Which component of Juniper Networks vSRX or cSRX provides identity-based access control a…
- Question 6You need to secure communications from a mobile command center which uses a 5G mobile ISP…
- Question 7What is the role of Threat Intelligence Feeds in Advanced Threat Prevention (ATP)?
