Foreign Key Reference Substitution in Database Security

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database systems face issues when evaluating queries that involve foreign key relations, as they may not adequately verify user permissions to access referenced tables, leading to unexpected responses and errors, particularly when users attempt to dereference foreign key values without proper access rights.

Innovation Solution

The system evaluates the context of a query supplemental to the query itself, generating a response that substitutes a substitute value for foreign key references to tables that the user is not permitted to access, thereby preventing errors and ensuring security compliance by providing a consistent and secure data set.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If the database system returns foreign key reference values to users who have access to the first table, then the user receives complete data for their query, but the user may attempt to dereference values pointing to restricted tables causing security exceptions and errors

Engineering Contradiction:
Improvedata completenessVSAvoidsecurity compliance
Core Design Contradiction:
Loss of informationVSReliability

Solution Approach 1:

The patent introduces an intermediary mechanism that intercepts foreign key reference values before returning them to the user. The system evaluates the user's context and access rights, then substitutes restricted foreign key values with placeholder values. This intermediary process prevents direct access to restricted tables while maintaining the appearance of complete data, thereby resolving the contradiction between data completeness and security compliance.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If the database system evaluates user permissions for each foreign key reference, then security is maintained, but query processing time increases

Engineering Contradiction:
Improvesecurity enforcementVSAvoidquery processing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements preliminary action by pre-evaluating user context and access rights before the query execution completes. The system determines which foreign key references are accessible based on the user's context (such as location, device, or organizational hierarchy) in advance, and prepares substitute values for restricted references. This preliminary evaluation prevents the need for time-consuming permission checks during query processing, thus maintaining security while minimizing performance impact.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If the system provides substitute values for restricted foreign key references, then security exceptions are prevented, but the user loses information about referenced records in restricted tables

Engineering Contradiction:
Improveerror preventionVSAvoidreference information
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The patent applies local quality by providing different types of information at different locations in the data structure. For foreign key references that are accessible, the system provides the actual reference values. For restricted foreign key references, the system provides substitute values that maintain the data structure integrity but indicate restricted access. This localized differentiation allows the system to prevent errors in restricted areas while preserving information in accessible areas, thus resolving the contradiction between error prevention and information preservation.

Inventive Principle:
Principle #3Local quality

Data Source

PatentEP3458979B1Reconciling foreign key references and table security policies
Publication Date: 2020.07.29 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3458979B1 patent drawingFigure 1
  • EP3458979B1 patent drawingFigure 2
  • EP3458979B1 patent drawingFigure 3

AI summary

Some database tables include a relational field, where a record of the table stores a foreign-key reference value that identifies a related record of a second table. While fulfilling a request comprising a query over the database, the system may identify a context of the request, wherein the context is supplemental to the query, and wherein the context relates to the relational field. For example, a security policy may permit a requester to query the first table, but restrict the requester from accessing the second table that the relational field of the first table references, where dereferencing the relational field may cause unexpected results. Instead, the system may evaluate the context of the request, and may fulfill the request based on the context by providing a response that substitutes, for the value that references the second table, a substitute value that does not reference the second table.