arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.15799cs.AI
收藏

Prose2Policy (P2P): 一个实用的LLM管道,用于将自然语言访问策略翻译成可执行的Rego

Prose2Policy (P2P): A Practical LLM Pipeline for Translating Natural-Language Access Policies into Executable Rego

Apple(苹果公司)

Vatsal Gupta, Darshan Sreenivasamurthy

AI总结:

Prose2Policy通过自然语言访问控制策略转化为可执行Rego代码,实现政策检测、组件提取、模式验证等全流程,提升部署可靠性和审计性。

摘要:

Prose2Policy (P2P) 是一个基于LLM的实用工具,用于将自然语言访问控制策略(NLACPs)转化为可执行的Rego代码(Open Policy Agent, OPA的政策语言)。它提供了一个模块化、端到端的管道,执行政策检测、组件提取、模式验证、检查、编译、自动测试生成和执行。Prose2Policy旨在弥合人类可读的访问要求与机器可执行的政策即代码(PaC)之间的差距,同时强调部署的可靠性和可审计性。我们在ACRE数据集上评估了Prose2Policy,并展示了接受策略的编译率为95.3%,自动化测试达到82.2%的正测试通过率和98.9%的负测试通过率。这些结果表明,Prose2Policy生成的Rego政策在语法上稳健且行为上一致,适用于零信任和合规驱动的环境。

英文摘要:

Prose2Policy (P2P) is a LLM-based practical tool that translates natural-language access control policies (NLACPs) into executable Rego code (the policy language of Open Policy Agent, OPA). It provides a modular, end-to-end pipeline that performs policy detection, component extraction, schema validation, linting, compilation, automatic test generation and execution. Prose2Policy is designed to bridge the gap between human-readable access requirements and machine-enforceable policy-as-code (PaC) while emphasizing deployment reliability and auditability. We evaluated Prose2Policy on the ACRE dataset and demonstrated a 95.3\% compile rate for accepted policies, with automated testing achieving a 82.2\% positive-test pass rate and a 98.9\% negative-test pass rate. These results indicate that Prose2Policy produces syntactically robust and behaviorally consistent Rego policies suitable for Zero Trust and compliance-driven environments.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑