Dynamic Code Loader for Multi-User Systems
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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.
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.
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
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.
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.
Data Source
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.


