Dynamic source values for content security policies
Abstract
Systems and methods dynamically generate content security policy (CSP) headers using CSP definitions having dynamic source values. When a request for a web application is received, a CSP definition corresponding to the web application and having a dynamic source value is retrieved from a repository of CSP definitions. A CSP header is generated based on the CSP definition. The CSP header includes a source value dynamically generated based on the dynamic source value and a domain associated with the requested web application. The CSP header is provided as a response header for the requested web application.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 28 · Forward citations: 0.
Claims (8)
- Claim 1Independent Claim
A computer-implemented method comprising: receiving a request for a web application; retrieving, from a repository of content security policy (CSP) definitions, a CSP definition corresponding to the requested web application, the CSP definition including a dynamic source value; generating a CSP header for the request using the CSP definition, the CSP header including a source value identifying a valid source for one or more resources for the web application, the source value dynamically generated using the dynamic source value and a domain associated with the requested web application; and providing the CSP header as a response header for the requested web application.
- Claim 2Depends on #1
The computer-implemented method of claim 1, wherein the domain associated with the requested web application comprises a top-level domain, a second-level domain, or a subdomain.
- Claim 3Depends on #1
The computer-implemented method of claim 1, wherein the dynamic source value includes a wildcard character and the source value in the CSP header is dynamically generated to include the wildcard character.
- Claim 4Depends on #1
The computer-implemented method of claim 1, wherein the CSP definition includes a static source value; and wherein the CSP header is generated to include the static source value.
- Claim 5Depends on #1
The computer-implemented method of claim 1, wherein the CSP definition includes a second dynamic source value, and wherein the CSP header includes a second source value dynamically generated based on the second dynamic source value and the domain associated with the requested web application.
- Claim 6Depends on #5
The computer-implemented method of claim 5, wherein the source value corresponds to a first directive of the CSP header and the second source value corresponds to a second directive of the CSP header.
- Claim 7Depends on #1
The computer-implemented method of claim 1, wherein the method further comprises: identifying a geographical region associated with the requested web application; and determining the domain associated with the requested web application based on the geographical region.
- Claim 8Independent Claim
One or more computer storage media storing computer-useable instructions that, when used by a computing device, cause the computing device to perform operations, the operations comprising: receiving a request for a web application; retrieving, from a repository of content security policy (CSP) definitions, a CSP definition corresponding to the requested web application, the CSP definition including a dynamic source value that includes a placeholder portion to be dynamically determined when generating CSP headers using the CSP definition; generating a CSP header for the request using the CSP definition, the CSP header including a source value dynamically generated by replacing the placeholder portion of the dynamic source value with a corresponding portion of a domain associated with the requested web application; and providing the CSP header as a response header for the requested web application.
Technical Overview & Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to Indian Patent Application having Application No. 202311049317, filed in India on Jul. 21, 2023, entitled “ DYNAMIC SOURCE VALUES FOR CONTENT SECURITY POLICIES, ” the entirety of which is hereby incorporated by reference. BACKGROUND Content Security Policy (CSP) is a security mechanism that helps to detect and mitigate certain types of attacks, including cross-site scripting (XSS) and data injection attacks. Web application administrators can define a set of CSPs that specify the types of resources, such as scripts, stylesheets, and images, that are allowed to be loaded and executed for a web application and valid sources for each of the different types of resources. By setting these policies, administrators can limit the potential vulnerabilities that can be exploited by malicious actors. When a web application is requested by a client device, a CSP header is returned in response with directives indicating the types of resources (e.g., JavaScript, CSS, images, etc.) that can be loaded and valid sources for the resources. The browser or other application executing the web application on the client device checks the CSP directives and enforces the defined restrictions, blocking or allowing requests based on the specified policies. This helps ensure that only trusted sources are allowed to interact with the web application, reducing the risk of code injection and other malicious activities. SUMMARY Some aspects of the present technology relate to, among other things, a CSP management system that facilitates CSP management, deployment, and violation reporting. The CSP management system allows administrators to generate and edit CSP definitions for various web applications and stores the CSP definitions in a repository. When a specific web application is requested by a client device, the CSP management system retrieves the CSP definition for the web application, generates a CSP header based on th
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (28)
| Patent | Title | Year | Citations |
|---|---|---|---|
| US 11,528,301 B1 | Secure embedding of private content via a dynamically-set security policy | 2022 | 0 |
Non-Patent Literature (10)
- Content Security Policy (CSP) violation error during Proxy Now, SAP Knowledge Base Article, Retrieved from Internet URL:
- <
- https://userapps.support.sap.com/sap/support/knowledge/en/3059464
- >
- , Accessed on May 12, 2023, 3 pages.
- CSP violation report, Retrieved from Internet URL:
- <
- https://csplite.com/csp66/#violation-report
- >
- , Accessed on May 12, 2023, 6 pages.