Web Service Sandbox for Secure Cross-Domain JSONP

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing technologies face challenges in securely bypassing the same-origin policy to enable cross-domain requests while protecting the originating domain from potential security risks associated with JSONP, which can introduce vulnerabilities to malicious script code injection.

Innovation Solution

A web service sandbox system is implemented, using a sandbox service as an intermediary between the user agent and the web service, which includes an event listener, message poster, and response parser to process JSONP responses, ensuring that script elements are executed in a secure environment and preventing malicious scripts from affecting the user agent's session.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If JSONP is used to enable cross-domain requests, then the ability to retrieve content from other domains is improved, but the security risk from malicious script code injection increases

Engineering Contradiction:
Improvecross-domain request capabilityVSAvoidsecurity risk from malicious scripts
Core Design Contradiction:
Adaptability or versatilityVSObject-affected harmful factors

Solution Approach 1:

The patent introduces a sandbox service as an intermediary between the user agent and the web service. The sandbox service receives requests from the user agent, forwards them to the web service, and returns responses without executing script elements. This mediator enables cross-domain communication while preventing malicious scripts from reaching the user agent, thus resolving the contradiction between cross-domain capability and security.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If script elements are executed in the JSONP response to bypass same-origin policy, then cross-domain data retrieval is enabled, but the originating domain becomes vulnerable to attacks

Engineering Contradiction:
Improvecross-domain data accessVSAvoidintegrity of originating domain
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent extracts and removes script elements from the JSONP response before returning it to the user agent. The sandbox service parses the response, identifies and removes script elements, and returns only the data portion. This extraction approach enables cross-domain data access while eliminating the security risk posed by script execution in the originating domain.

Inventive Principle:
Principle #2Taking out (Extraction)

3Ease of operation

If CORS with wildcard '*' is used to allow any domain, then cross-domain access is simplified, but credentials and cookies cannot be supplied

Engineering Contradiction:
Improvecross-domain access simplicityVSAvoidcredential transmission capability
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The sandbox service acts as a mediator that enables both simple cross-domain access and secure credential transmission. By forwarding requests through the sandbox service, the system can maintain simplicity for basic cases while also supporting credentials and cookies when needed, as the sandbox service handles the cross-domain communication securely without requiring the originating domain to configure complex CORS policies.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentEP3100200B1Web service sandbox system
Publication Date: 2017.12.27 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3100200B1 patent drawingFigure 1
  • EP3100200B1 patent drawingFigure 2
  • EP3100200B1 patent drawingFigure 3

AI summary

A web service sandbox system. The web service sandbox system provides a secure mechanism with little to no risk to an origination domain hosting a user agent for the user agent to retrieve content from a potentially insecure web service hosted in another domain and using JSONP to bypass same-origin policy restrictions. The user agent posts a command message to a separate quarantined web session of a sandbox service acting as intermediary between the user agent web session and the web service. The sandbox service makes the actual call to and parses the response from the web service. Scripts from the response are executed only in the quarantined web session of the sandbox service. The resulting "safe" content obtained from the web service by the sandbox service is returned to the user agent where it may be rendered.