Automatic Content Security Policy Generation via Proxy Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Setting up a Content Security Policy (CSP) to prevent code injection attacks is complex and opaque for network resource owners, requiring significant effort and expertise.

Innovation Solution

An automatic mechanism for determining a CSP using a cloud-based proxy service that analyzes network resource requests and responses, identifies additional resources, and generates a CSP policy transparently, without requiring the network resource owner's direct involvement.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a CSP policy is manually configured by the network resource owner, then security protection against code injection attacks is achieved, but the complexity and difficulty of configuration increases significantly

Engineering Contradiction:
Improvesecurity protectionVSAvoidconfiguration complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system enables automatic generation of CSP policies by having the network resource owner's browser automatically report loaded content origins to the proxy server, which then generates the appropriate CSP policy without requiring manual configuration by the resource owner

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

A proxy server acts as an intermediary between the network resource owner and the CSP configuration system, receiving automatic reports from browsers about loaded content and generating appropriate CSP policies based on this information

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If a CSP policy is manually configured by the network resource owner, then security protection against code injection attacks is achieved, but the time and effort required for setup increases

Engineering Contradiction:
Improvesecurity protectionVSAvoidconfiguration time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary action by having the browser automatically report all content origins before the CSP policy needs to be generated, allowing the proxy server to have the policy ready without requiring time-consuming manual configuration

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The browser automatically performs the data collection and reporting function that would otherwise require manual effort from the network resource owner, enabling automatic CSP policy generation

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12166800B2Method and apparatus of automatic generation of a content security policy for a network resource
Publication Date: 2024.12.10 CLOUDFLARE INC
  • US12166800B2 patent drawing
  • US12166800B2 patent drawing
  • US12166800B2 patent drawing

AI summary

Methods and apparatuses for automatic determination of a content security policy for a network resource are described. A proxy server receives from a first authenticated client device a first request for a first network resource, retrieves the first network resource and transmits a first response to the first client device that includes a content tracker that causes the client device to report information on additional network resources identified when the first client device interprets the first network resource. A content security policy is determined based on the reported information. The proxy server receives, from a second client device, a second request for the first network resource. The proxy server transmits, to the second client device, a second response that includes the content security policy that is determined based on the information on the additional network resources.