Query Engine Frontend Proxy API for Secure User-Defined Function Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Distributed databases face challenges in achieving security without compromising performance and flexibility, particularly in multiuser environments where user-defined functions can pose security risks by executing code that interferes with security filters or accesses unauthorized data.

Innovation Solution

Implementing a query engine frontend with a proxy API that isolates user programs from the query engine, wrapping user-defined functions into enveloped functions executed in a sandboxed security environment, thereby preventing direct interaction with the query engine and reducing security risks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If user-defined functions are executed directly in the query engine, then flexibility and performance are improved, but security risks increase due to potential code interference with security filters

Engineering Contradiction:
ImproveflexibilityVSAvoidsecurity risks
Core Design Contradiction:
Adaptability or versatilityVSObject-affected harmful factors

Solution Approach 1:

The system segments the execution environment by creating a separate sandboxed domain for user-defined functions, isolating them from the main query engine. This allows flexible execution of user code while preventing security risks through environmental separation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A proxy API serves as an intermediary layer between user-defined functions and the query engine. The proxy validates and mediates all interactions, enabling flexible function execution while maintaining security by filtering and controlling access to the query engine.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If security filters are implemented in the query engine, then security is improved, but performance deteriorates due to additional processing overhead

Engineering Contradiction:
ImprovesecurityVSAvoidperformance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

Security validation and filtering are performed preliminarily at the proxy API layer before code execution. By establishing security controls in advance, the system maintains high security while allowing optimized execution without repeated security checks during runtime.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The proxy API acts as a mediator that handles security filtering separately from the main query processing path. This allows security checks to be performed efficiently without adding overhead to the critical query execution path.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Ease of operation

If user programs are installed on the query engine, then ease of operation is improved, but device complexity increases due to integration requirements

Engineering Contradiction:
Improveease of operationVSAvoidsystem complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The proxy API serves as an intermediary that provides a simplified interface for users while handling complex integration and isolation requirements in the background. Users interact with the simple proxy interface, while the complex sandboxing and security mechanisms operate transparently.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system creates a copied interface (proxy API) that mirrors the original query engine interface. This copying allows users to operate with a simplified view while the underlying complexity of isolation and security management is handled by the proxy layer.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS12038923B1Secure query processing
Publication Date: 2024.07.16 AMAZON TECH INC
  • US12038923B1 patent drawing
  • US12038923B1 patent drawing
  • US12038923B1 patent drawing

AI summary

A distributed database keeps user-defined functions separate from a query engine by using a frontend. The frontend allows a user-defined function to interact with a proxy application processing interface (API) that is based on an API of the query engine. The frontend sends serialized data to the query engine in order to interact with the API of the query engine. The user-defined function is executed in security environments separate from the frontend and the query engine.