Abstract
Natural language access control policies (NLACPs) play a pivotal role in access control systems, yet the scarcity of high-quality public datasets severely hinders advancements in natural language processing (NLP)/machine learning (ML)-driven policy automation. Existing datasets, constrained by labor-intensive manual curation, confidentiality barriers, and rigid synthesis methods, suffer from limited scale, semantic inconsistency, and poor adaptability to emerging domains such as smart healthcare and the Internet of Vehicles (IoV). To address this critical gap, we propose GenPy, a novel framework leveraging large language models (LLMs) like ChatGPT and domain-specific knowledge graphs to systematically generate scalable, semantically rich NLACP datasets. GenPy pioneers the integration of LLMs into NLACP synthesis, offering three core innovations: a generation module combining knowledge graphs with prompt engineering to produce diverse, domain-aligned policies; an annotation module employing few-shot learning to filter nonpolicy statements and ensure quality; and a policy management module resolving redundancies and conflicts while enabling conflict injection for optimization research. By embedding domain semantics (e.g., IoV compliance with automotive data laws), GenPy enriches traditional datasets and supports fine-grained policy requirements. Experiments demonstrate that GenPy generates more than 5000 high-quality NLACPs across multiple domains, achieving an $F1$ -score of exceeding 93% in NLACP classification tasks. Notably, augmenting the classification models in RAGent with GenPy-generated data improves NLACP classification accuracy by 2%–9%, validating its practical utility. Our work establishes the first LLM-based pipeline that integrates knowledge graphs with customizable prompts to generate semantically rich NLACPs, supporting fine-grained access control models, NLACP identification, and policy management across diverse security requirements. We provide an open-source repository of policies, code, and technical frameworks to catalyze future research in access control automation. The dataset and implementation are publicly available at https://github.com/fe1w0/NLACP-LLM
Funding Information
  • National Natural Science Foundation of China (62302358)
  • Natural Science Foundation of Shaanxi Province (2025JC-JCQN-089)