Synthesizing Access Control Policies using Large Language Models

1 st Adarsh Vatsa, 2 nd Pratyush Patel, 3 rd William Eiers · 2025

Read Synthesizing Access Control Policies using Large Language Models by 1 st Adarsh Vatsa, 2 nd Pratyush Patel, 3 rd William Eiers (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-11573.txt.

Introduction

Adarsh Vatsa, Pratyush Patel, and William Eiers ask whether language models can write cloud access policies that actually say what the admin means. Hand-written policies in systems like the leading cloud's dialect grow tangled and error-prone, and a wrong line can lock out staff or leak data. The team tests zero-shot generation from two kinds of specification.

One gives the model a concrete list of requests to allow or deny; the other describes the intent in plain words. Bare prompting falls short, they argue. Structured prompts built on the policy language's own syntax do markedly better in early experiments. The paper charts how much prompt engineering this safety-critical task demands.

Catalog record

CREATOR1 st Adarsh Vatsa, 2 nd Pratyush Patel, 3 rd William Eiers
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE19 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2503-11573

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Synthesizing Access Control Policies using Large Language Models 1 st Adarsh Vatsa, 2 nd Pratyush Patel, 3 rd William Eiers Abstract Cloud compute systems allow administrators to write access control policies that govern access to private data. While policies are written in convenient languages, such as AWS Identity and Access Management Policy Language, manually written policies often become complex and error prone. In this paper, we investigate whether and how well Large Language Models (LLMs) can be used to synthesize access control policies. Our investigation focuses on the task of taking an access control request specification and zero-shot prompting LLMs to synthesize a well-formed access control policy which correctly adheres to the request specification. We consider two scenarios, one which the request specification is given as a concrete list of requests to be allowed or denied, and another in which a natural language description is used to specify sets of requests to be allowed or denied. We then argue that for zero-shot prompting, more precise and structured prompts using a syntax based approach are necessary and experimentally show preliminary results validating our approach. I Introduction Modern cloud computing platforms allow customers to secure their data through access control policies . Most cloud computing services have their own access control specification language for writing policies. The goal of crafting an access control policy is to create rules adhering to specifications for allowing and denying access while minimizing requests, or permissions, required to complete a given task. Manually crafting access control policies is tedious and often error prone, as ensuring the policy gives enough access to perform a given task while simultaneously controlling the correct level of permissions is difficult and requires immense domain-specific knowledge. Large Language Models (LLMs) have shown exceptional capabilities in code generation and summarization, highlighting the lucrative prospects particularly in automation and software engineering. In this work, we investigate how to leverage large language models for policy synthesis in a verification-based approach. Given a request specification as input, we leverage the natural language capabilities of large language models to automatically synthesize an access control policy which correctly adheres to the request specification. Our work aims to answer the following research questions: RQ1: Can LLMs synthesize valid access control policies from a given whitelist and blacklist set of requests? RQ2: Can LLMs correctly synthesize access control policies given a natural language description of the allowed or denied requests? RQ3: Can well-crafted, more structured prompts improve the capability of LLMs in generating correct policies? The rest of the paper is structured as follows. In Section II we discuss the work most related to our approach. In Section III we briefly overview access control policies and an approach to verify them. In Section IV we discuss the dataset we use in our approach, and discuss our process for synthesizing and evaluating access control policies using large language models. In Section V we discuss our experimental evaluation. Finally, in Section VI we conclude the paper. II Related Work There is existing work for assisting the creation of policies [ 1 , 2 ] but these techniques lack automated techniques for policy creation with verifiable guarantees. Policy mining is another popular approach [ 3 , 4 ] and has been used to automatically generate policy specifications from a given set of allowed or denied accesses. In [ 5 , 6 ] the authors propose LLMs as a coding assistant to help administrators write software enforcing access control. Constraint solving approaches for policy analysis has been a subject of recent research, particularly in the proprietary Zelkova tool used within AWS [ 7 ] which translates policies into SMT formulas. The work in [ 8 , 9 ] extended this by introducing quantitative analysis for reasoning about the permissiveness of policies, and was recently applied to quantitative policy repair [ 10 ] . III Analyzing Access Control Policies An access control policy specifies who can do what under which conditions. Access control policies consist of sets of rules specifying which principals can perform which actions on which resources under which conditions . Given an access request and associated policy, access is granted if and only if there exists a rule in the policy allowing access and no rules in the policy explicitly deny access. Given an access control policy \mathbb{P} , one can reason over the requests allowed by \mathbb{P} by encoding the set of requests allowed by \mathbb{P} into a Satisfiability Modulo Theories formula \llbracket\mathbb{P}\rrbracket where satisfying solutions to \llbracket\mathbb{P}\rrbracket correspond to requests allowed by \mathbb{P} . For full details of this encoding, we refer the reader to [ 8 , 9 ] . The permissiveness of \mathbb{P} is a measure of how many requests are allowed by \mathbb{P} . Thus, to compute the permissiveness of \mathbb{P} , one must count the number of requests allowed by \mathbb{P} , which corresponds to computing |\llbracket\mathbb{P}\rrbracket| , the number of satisfying solutions to \llbracket\mathbb{P}\rrbracket . Given two policies \mathbb{P}_{1} , \mathbb{P}_{2} , we can compare the requests allowed by checking the satisfiability of \llbracket\mathbb{P}_{1}\rrbracket\land\neg\llbracket\mathbb{P}_{2}\rrbracket (requests allowed by \mathbb{P}_{1} but not \mathbb{P}_{2} ) and \neg\llbracket\mathbb{P}_{1}\rrbracket\land\llbracket\mathbb{P}_{2}\rrbracket (requests allowed by \mathbb{P}_{2} but not \mathbb{P}_{1} ): • If both \llbracket\mathbb{P}_{1}\rrbracket\land\neg\llbracket\mathbb{P}_{2}\rrbracket and \neg\llbracket\mathbb{P}_{1}\rrbracket\land\llbracket\mathbb{P}_{2}\rrbracket are unsatisfiable, then they allow the same set of requests • If \llbracket\mathbb{P}_{1}\rrbracket\land\neg\llbracket\mathbb{P}_{2}\rrbracket is satisfiable but \neg\llbracket\mathbb{P}_{1}\rrbracket\land\llbracket\mathbb{P}_{2}\rrbracket is unsatisfiable, then \mathbb{P}_{1} accepts all the requests \mathbb{P}_{2} does and more, so we say that \mathbb{P}_{1} is strictly more permissive than \mathbb{P}_{2} • If \llbracket\mathbb{P}_{1}\rrbracket\land\neg\llbracket\mathbb{P}_{2}\rrbracket is unsatisfiable but \neg\llbracket\mathbb{P}_{1}\rrbracket\land\llbracket\mathbb{P}_{2}\rrbracket is satisfiable, then \mathbb{P}_{2} accepts all the requests \mathbb{P}_{1} does and more, we say that \mathbb{P}_{2} is strictly more permissive than \mathbb{P}_{1} • If both are satisfiable, then both \mathbb{P}_{1} and \mathbb{P}_{2} accept different sets of requests and so we say they are incomparable. By computing |\llbracket\mathbb{P}_{1}\rrbracket\land\neg\llbracket\mathbb{P}_{2}\rrbracket| (the number of requests allowed by \mathbb{P}_{1} but not by \mathbb{P}_{2} ) and |\neg\llbracket\mathbb{P}_{1}\rrbracket\land\llbracket\mathbb{P}_{2}\rrbracket| (the number of requests allowed by \mathbb{P}_{2} but not by \mathbb{P}_{1} ) one can quantify the relative permissiveness between \mathbb{P}_{1} and \mathbb{P}_{2} . Computing the count can be done by a model counting constraint solver. IV Methodology In this section we outline our policy datasets, the access control request specifications, how we evaluate the synthesized policies, and our experiment configuration. IV-A Policy Dataset To the best of our knowledge, there is no existing dataset for policy analysis nor prompting methodology for their creation using large language models. Moreover, there is a shortage of existing policy datasets for research purposes [ 9 ] and recent research on access control policies has been done on closed-source datasets [ 7 , 11 ] . Thus, to investigate how well LLMs can generate access control policies, we consider the initial set of 40 policies from Quacky [ 9 ] dataset and extend the dataset with 7 more synthetically generated policies. The 40 policies from Quacky were taken from AWS user forums and consisted of policies that users posted to receive feedback or troubleshoot their policies. We extended this dataset by manually crafting 7 more policies which were similar in complexity but varied in their intention: from policies allowing or denying certain roles and principals in accessing objects within specific S3 buckets, to policies managing EC2 instances or the creation and/or deletion of IAM roles.

Read the complete text