Edge Server CSRF Protection via Token Tagging and Validation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing CSRF protection methods are inefficient, particularly when dealing with multiple browser windows or non-HTTPS traffic, and often require significant computational resources at the origin server, while also being vulnerable to token misuse by malicious actors.

Innovation Solution

Implementing token tags at the edge server to indicate when a token is required for resource access or actions, allowing the edge server to generate and validate tokens, cache resources, and provide CSRF protection across HTTP and HTTPS traffic, including JavaScript applications, thereby offloading security checks from the origin server.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If token validation is performed at the origin server for each request, then CSRF protection is provided, but the burden on the origin server increases and processing efficiency decreases

Engineering Contradiction:
ImproveCSRF protectionVSAvoidorigin server processing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts the token validation function from the origin server and relocates it to the edge server. The edge server generates tokens, embeds them in resources, and validates them in incoming requests, thereby removing the security validation burden from the origin server while maintaining CSRF protection.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The edge server acts as an intermediary between client devices and the origin server. It performs token validation as part of the request processing pipeline before forwarding requests to the origin server, thereby protecting against CSRF attacks without requiring the origin server to perform validation checks.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If cookies are used to store tokens for CSRF protection, then token validation can be performed, but additional security measures are required and the system becomes more complex

Engineering Contradiction:
Improvetoken validation capabilityVSAvoidsecurity system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

Instead of using cookies to store tokens, the patent embeds tokens directly into the HTML resources (such as hidden form fields or meta tags). This copying approach allows the token to be automatically included in requests without requiring additional client-side scripts or cookie management, simplifying the overall security system.

Inventive Principle:
Principle #26Copying

3Productivity

If CSRF protection is implemented without token tags, then resource caching is limited, but implementing token tags requires modifications to website code

Engineering Contradiction:
Improveresource caching efficiencyVSAvoidwebsite code modification requirement
Core Design Contradiction:
ProductivityVSEase of manufacture

Solution Approach 1:

The edge server automatically detects token tags in resources and performs token generation and validation without requiring manual configuration or modification of the website code. The system self-adapts to the presence of token tags and implements CSRF protection transparently, maintaining ease of website deployment while enabling efficient resource caching.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10911485B2Providing cross site request forgery protection at an edge server
Publication Date: 2021.02.02 CLOUDFLARE INC
  • US10911485B2 patent drawing
  • US10911485B2 patent drawing
  • US10911485B2 patent drawing

AI summary

An edge server receives a request from a client device to access a resource. The edge server determines whether the requested resource includes a tag within the code of the resource. When the edge server determines there is the tag in the resource, the edge server generates a token, associates the token with the resource (e.g., inserts the token in the code of the resource), and sends the resource to the requesting client device. In response to subsequent requests from the client device for actions to be performed with respect to the resource, the edge server determines whether the action requires a token. When the requested action requires the token, the edge server extracts the token in the request and processes the request after validating the token.