Dynamic Code Loader for Multi-User Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Multi-user systems face safety concerns due to the ability of users to introduce malicious custom logic via user-defined rules, which can lead to system termination and unauthorized access to resources, compromising security and stability.

Innovation Solution

A dynamic code loader is implemented to filter and validate user-defined code at runtime, using a whitelist and blacklist to ensure only authorized elements are used, preventing malicious code execution and maintaining system integrity.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If users are allowed to introduce arbitrary custom logic via user-defined code, then system variability and flexibility are improved, but security and stability deteriorate due to potential malicious code execution

Engineering Contradiction:
Improvesystem variabilityVSAvoidsystem stability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent segments the code loading process into distinct phases: compilation phase where security checks are performed, and execution phase where validated code runs. This separation allows user-defined code to be flexible and variable while the security validation layer ensures stability by preventing malicious code from reaching execution.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary security validation mechanism that acts as a mediator between user-defined code and the system execution environment. This intermediary layer validates code during compilation and enforces security policies during execution, allowing system variability while maintaining stability by blocking malicious code before it can harm the system.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If users can specify arbitrary Event Condition Action rules, then expressivity of custom logic is improved, but security risks increase due to potential unauthorized access and system termination

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

Solution Approach 1:

The patent applies preliminary action by performing security validation during the compilation phase before the code is deployed to execution. Security policies are checked in advance, and only validated code is allowed to run. This preliminary security check prevents malicious code from causing harm while maintaining full expressivity of user-defined rules.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent converts the potential harm of unrestricted user code into a benefit by using the compilation phase as an opportunity to perform security validation. The same compilation process that enables expressivity also serves as a security checkpoint, transforming the risk of arbitrary code into a controlled environment where security policies can be enforced before execution.

Inventive Principle:
Principle #22Blessing in disguise (Convert harm into benefit)

3Reliability

If comprehensive security validation is performed on user-defined code, then system security is improved, but execution performance may deteriorate due to additional validation overhead

Engineering Contradiction:
Improvesystem securityVSAvoidexecution performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments security validation into two distinct phases: compilation-time validation and runtime enforcement. During compilation, comprehensive security checks are performed on user-defined code. During execution, the validated code runs with minimal overhead since the heavy validation work was already done during compilation. This segmentation maintains high security while preserving execution performance.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary security validation during the compilation phase, moving the computationally intensive security checks away from the execution phase. By validating code beforehand, the system ensures comprehensive security checking without imposing performance penalties during runtime, as the validation overhead is incurred only once during compilation rather than on every execution.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10540154B2Safe loading of dynamic user-defined code
Publication Date: 2020.01.21 SAP SE
  • US10540154B2 patent drawing
  • US10540154B2 patent drawing
  • US10540154B2 patent drawing

AI summary

Disclosed herein are system, method, and computer program product embodiments for dynamically loading user-defined code into a multi-user system. An embodiment operates by receiving an action represented by source code including one or more elements of a programming language from a user of a multi-user system; compiling the source code into compiled code, the compiling further including modifying the action based on a filter including at least one of the one or more elements so that the compiled code represents the modified action; and executing the complied code on the multi-user system.