Edge Server CSRF Token Validation Mechanism
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Cross-Site Request Forgery (CSRF) attacks pose a significant threat to web applications by allowing attackers to transmit unauthorized requests, leading to potential state-changing actions, and existing solutions often require modifying website code and resource-intensive security measures at the origin server.
Innovation Solution
Implementing CSRF protection at the edge server using a token-based system, where a secret key is hashed with additional values like IP address, browser identifier, and expiration time to generate a token value, which is sent to the client and verified upon request, preventing unauthorized state-changing requests from reaching the origin server.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If CSRF protection is implemented at the origin server using traditional methods, then security against CSRF attacks is improved, but website code modification and resource consumption are increased
Solution Approach 1:
The patent introduces an edge server as an intermediary between the client and origin server. The edge server generates and verifies CSRF tokens, acting as a mediator that handles security checks without requiring the origin server to implement complex verification logic. This resolves the contradiction by providing CSRF protection (improving reliability) while avoiding website code modification at the origin server (reducing device complexity).
Solution Approach 2:
The patent segments the CSRF protection function into a separate edge server component, distinct from the origin server. By dividing the system into client, edge server, and origin server components, each with specific responsibilities, the solution provides security without burdening the origin server with complex security implementation, thus improving reliability while reducing device complexity.
2Reliability
If CSRF protection is implemented at the origin server, then security against CSRF attacks is improved, but bandwidth and computing resources are increased
Solution Approach 1:
The edge server performs CSRF token verification in advance, before requests reach the origin server. By conducting security checks preliminarily at the edge server, malicious requests are filtered out beforehand, preventing wasteful consumption of origin server bandwidth and computing resources on invalid requests, thus improving reliability while reducing energy loss.
Solution Approach 2:
The patent extracts the CSRF protection functionality from the origin server and places it at the edge server. This extraction removes the burden of security verification from the origin server, allowing it to focus on core functionality, thereby providing CSRF protection while reducing bandwidth and computing resource consumption at the origin server.
3Reliability
If existing CSRF protection solutions are implemented, then security against CSRF attacks is improved, but website code modification is required
Solution Approach 1:
The edge server serves as an intermediary that handles all CSRF protection logic, generating tokens and verifying requests without requiring the origin server to modify its code. This intermediary approach provides robust CSRF protection while maintaining the origin server's code integrity, thus improving reliability while improving ease of manufacture.
Solution Approach 2:
The solution uses token-based verification where the edge server creates a cryptographic copy (hash) of the secret key and request parameters. This copying mechanism enables verification without requiring the origin server to implement complex security logic, providing CSRF protection while avoiding website code modification.
Data Source
AI summary
A request from a computing device for accessing a resource is received by an edge server, where the request includes a cookie containing a first token value and a second token value. The edge server validates the first token value and a second token value using a third token value generated using hashing algorithm with a secret key and one or more other values. The edge server then compares the received token values with the third token value. When the request is validated, the edge server retrieves the request resource.


