Skip to main content
QUICK REVIEW

[Paper Review] DePLOI: Applying NL2SQL to Synthesize and Audit Database Access Control

Pranav Subramaniam, Sanjay Krishnan|arXiv (Cornell University)|Feb 11, 2024
Digital Rights Management and SecurityComputer Science3 citations
TL;DR

This paper introduces Intent-Based Access Control for Databases (IBAC-DB), a novel paradigm that uses natural language access control matrices (NLACM) to specify policies and LLMs to automatically synthesize and audit SQL-based access control configurations. The proposed LLM4AC system achieves near-perfect F1 scores in benchmark evaluations, demonstrating high accuracy and robustness across diverse databases and perturbations.

ABSTRACT

In every enterprise database, administrators must define an access control policy that specifies which users have access to which tables. Access control straddles two worlds: policy (organization-level principles that define who should have access) and process (database-level primitives that actually implement the policy). Assessing and enforcing process compliance with a policy is a manual and ad-hoc task. This paper introduces a new access control model called Intent-Based Access Control for Databases (IBAC-DB). In IBAC-DB, access control policies are expressed using abstractions that scale to high numbers of database objects, and are traceable with respect to implementations. This paper proposes DePLOI (Deployment Policy Linter for Organization Intents), a LLM-backed system leveraging access control-specific task decompositions to accurately synthesize and audit access control implementation from IBAC-DB abstractions. As DePLOI is the first system of its kind to our knowledge, this paper further proposes IBACBench, the first benchmark for evaluating the synthesis and auditing capabilities of DePLOI. IBACBench leverages a combination of current NL2SQL benchmarks, real-world role hierarchies and access control policies, and LLM-generated data. We find that DePLOI achieves high synthesis accuracies and auditing F1 scores overall, and greatly outperforms other LLM prompting strategies (e.g., by 10 F1 points).

Motivation & Objective

  • To address the critical gap between high-level access control policies (written in natural language) and their low-level implementation in SQL databases.
  • To automate the translation of natural language access control policies into correct, executable SQL GRANT statements and views.
  • To enable automated auditing of existing database configurations against specified policies to detect misconfigurations.
  • To reduce the risk of security breaches and compliance failures caused by manual, error-prone access control configuration.
  • To provide a reliable, scalable, and generalizable system that works across different databases and policy variations.

Proposed method

  • Proposes a new format called the Natural Language Access Control Matrix (NLACM) to express access control policies in human-readable, intent-focused natural language.
  • Designs a reference architecture for IBAC-DB that decouples policy specification from database-specific implementation logic.
  • Builds LLM4AC, a prototype system that uses large language models to map NLACMs to SQL GRANTs, roles, and views in PostgreSQL.
  • Employs a differencing algorithm to compare policy intent (NL) with actual database configurations (SQL) for auditing and validation.
  • Uses perturbation-based testing to evaluate robustness, including synonym replacement, column value substitution, and structural changes.
  • Applies few-shot prompting and context engineering to improve LLM generalization and reduce hallucination in policy-to-SQL mapping.
Figure 1. Access Control Policies (Written in Natural Language Documents) to Process (Written in SQL GRANT statements)
Figure 1. Access Control Policies (Written in Natural Language Documents) to Process (Written in SQL GRANT statements)

Experimental results

Research questions

  • RQ1Can natural language access control policies be accurately and consistently translated into executable SQL access control statements using LLMs?
  • RQ2How does the performance of LLM-based policy-to-SQL mapping vary across different databases and policy perturbations?
  • RQ3To what extent can LLMs detect mismatches between specified access control policies and their actual database implementations?
  • RQ4What are the main failure modes of LLMs in this task, and how can they be mitigated?
  • RQ5Is the proposed IBAC-DB framework robust and generalizable across diverse enterprise policy and database configurations?

Key findings

  • LLM4AC achieves near-perfect F1 scores in role-view mapping and privilege subsumption tasks, significantly outperforming baseline methods like zero-shot prompting and sentence embeddings.
  • The system shows minimal performance variation across different databases and perturbation types, indicating strong robustness and generalization.
  • LLM4AC's performance drops slightly when comparing NL to its keyword synonym perturbations, due to LLM hallucination assuming incorrect answers are not among choices.
  • Performance is also lower when mapping NL with column values substituted for column indicators, again due to hallucination when column values are used instead of names.
  • The system performs perfectly in privilege subsumption evaluation with no variation across databases or perturbations, indicating high reliability in this specific task.
  • The study identifies that context length limitations hinder effective use of column value hints, suggesting a need for larger-context LLMs for full robustness.
Figure 2. Comparison of NL2SQL Translation by LLM method, with respect to syntax and Forward-Reverse-Forward (FRF) Accuracy. Columns are access control policies.
Figure 2. Comparison of NL2SQL Translation by LLM method, with respect to syntax and Forward-Reverse-Forward (FRF) Accuracy. Columns are access control policies.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.