UDF Code Attestation and Integrity Verification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Users face challenges in ensuring that user-defined functions (UDFs) invoked via database queries have not been tampered with, especially when executed in a security domain outside the user's control.

Innovation Solution

A data processing service provides code signing and attestation for UDF code, allowing users to verify that the executed UDF code matches the submitted code and ensuring secure access control.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If UDF code is executed by a system outside the user's trusted domain, then execution flexibility and cloud platform compatibility are improved, but code integrity and security control deteriorate

Engineering Contradiction:
Improveexecution flexibilityVSAvoidcode integrity
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces a code attestation mechanism as an intermediary between the user and the execution system. The attestation service verifies code integrity and authenticity before execution, acting as a trusted mediator that enables remote execution while maintaining security. The service uses cryptographic signatures and attestation tokens to ensure the executed code matches the submitted code without requiring the user to directly control the execution environment.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If multiple versions of UDF are created, then functionality and adaptability are improved, but version control and code identification become unclear

Engineering Contradiction:
ImprovefunctionalityVSAvoidversion identification
Core Design Contradiction:
Adaptability or versatilityVSLoss of information

Solution Approach 1:

The patent uses cryptographic hash values as unique identifiers (analogous to color changes for identification) for each version of UDF code. Each code version is associated with a unique hash value that serves as its fingerprint, enabling clear identification and tracking of specific versions. The attestation mechanism includes version information in the attestation token, ensuring that the executed version matches the intended version without ambiguity.

Inventive Principle:
Principle #32Color changes

3Productivity

If UDF code is stored and executed remotely, then resource utilization and cloud platform leverage are improved, but security control and access management deteriorate

Engineering Contradiction:
Improveresource utilizationVSAvoidunauthorized access
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

The patent implements preliminary security actions before code execution. The attestation service performs verification of code integrity, authenticity, and authorization status before the code is executed on remote resources. The system checks digital signatures, validates attestation tokens, and confirms user authorization in advance, preventing unauthorized access and malicious code execution before they can occur.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12306829B2Execution and attestation of user defined functions in databases
Publication Date: 2025.05.20 DATABRICKS INC
  • US12306829B2 patent drawing
  • US12306829B2 patent drawing
  • US12306829B2 patent drawing

AI summary

A system executes user defined functions (UDFs) invoked by database queries. The UDF includes UDF code specified using a programing language distinct from a database query language. A hash value from the UDF code provided by a client application for creating the UDF is compared with a hash value generated from UDF code invoked by database queries to determine whether the two UDF codes match. If the two hash values fail to match, the system takes an action, for example, storing an indication of UDF code mismatch or disabling subsequent executions of the database queries invoking the UDF. The system may use encoded UDF code that is decoded by the system at runtime using a key obtained from a separate system such as the client application. The client application can disable execution of database queries executing the UDF code by refusing to provide the key.