CSRF Mechanism Using Trusted Referer Attribute
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for mitigating Cross-Site Request Forgery (CSRF) vulnerabilities in web applications are either ineffective, disrupt normal operations, or have high implementation costs, and lack reliability, especially when dealing with non-web clients and complex authentication scenarios.
Innovation Solution
A CSRF mechanism that analyzes HTTP requests for a resource, detecting both conventional and trusted referer attributes to determine if the request originates from a trusted source, thereby rejecting potentially malicious requests and preventing CSRF attacks.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a CSRF filter is used to inject scripts and verifiable session identifiers, then CSRF protection is improved, but compatibility with non-web clients and ease of operation deteriorate
Solution Approach 1:
The patent introduces a trusted referer attribute as an intermediary mechanism that bridges the gap between CSRF protection requirements and client compatibility. Instead of requiring complex client-side script injection, the server adds a trusted referer attribute to redirect responses, which the client then forwards in subsequent requests. This intermediary attribute enables CSRF verification without disrupting normal client operations or requiring client upgrades.
Solution Approach 2:
The patent extracts the CSRF verification mechanism from the client side and places it entirely on the server side. By removing the need for client-side script execution and verifiable identifier propagation, the solution achieves universal compatibility across all HTTP clients while maintaining robust CSRF protection through server-side referer attribute validation.
2Reliability
If HTTP requests with referrer attributes are rejected, then CSRF protection is improved, but normal web operations including authentication and SSO deteriorate
Solution Approach 1:
The patent applies local quality by making the referrer attribute verification context-dependent. Instead of uniformly rejecting all requests with referrer attributes, the server checks whether the referrer matches the trusted referer attribute that was previously established during authentication. This localized verification approach protects against CSRF attacks while allowing legitimate authenticated requests to proceed normally.
Solution Approach 2:
The patent implements preliminary action by establishing the trusted referer attribute during the authentication process before actual resource access occurs. This pre-established trust relationship enables the server to later distinguish between legitimate requests (those with matching trusted referer attributes) and malicious CSRF requests, thereby protecting normal web operations including SSO flows.
3Reliability
If session-based authentication is used, then trust between web site and client is improved, but vulnerability to CSRF attacks increases
Solution Approach 1:
The patent creates a composite authentication mechanism that combines session-based authentication with referer attribute verification. The session identifier maintains the trust relationship between client and server, while the trusted referer attribute adds an additional layer of verification that prevents CSRF attacks. This composite approach leverages the strengths of both mechanisms while mitigating their individual weaknesses.
Data Source
AI summary
Cross-Site Request Forgery attacks are mitigated by a CSRF mechanism executing at a computing entity. The CSRF mechanism is operative to analyze information associated with an HTTP request for a resource. The HTTP request typically originates as an HTTP redirect from another computing entity, such as an enterprise Web portal. Depending on the nature of the information associated with the HTTP request, the HTTP request may be rejected because the CSRF mechanism determines that the request is or is likely associated with a CSRF attack. To facilitate this determination, the approach leverages a new type of “referer” attribute, a trustedReferer, which indicates that the request originates from a server that has previously established a trust relationship with the site at which the CSRF mechanism executes. The trustedReferer attribute typically is set by the redirecting entity, and in an HTTP request header field dedicated for that attribute.


