一句话:提出授权策略语言 Cedar,兼顾可读性、快速求值、安全与可分析性,并开源实现。
针对授权逻辑常嵌入应用代码、难以表达与分析的问题,本文设计并实现了授权策略语言 Cedar。Cedar 以简洁直观的语法支持角色、属性和关系三类访问控制模型,其策略结构支持快速做出访问决策;策略验证器利用可选类型帮助编写者避错,同时不增加负担。其设计经过平衡,可进行可靠且完备的逻辑编码,从而支持精确策略分析,例如确保策略重构后授权权限不变。作者在 Lean 中建模 Cedar 并用证明助手验证关键性质,在 Rust 中实现并开源。与 OpenFGA 和 Rego 相比,Cedar 策略可读性相当或更好,性能则显著更优。
Cedar is a new authorization policy language designed to be ergonomic, fast, safe, and analyzable. Rather than embed authorization logic in an application’s code, developers can write that logic as Cedar policies and delegate access decisions to Cedar’s evaluation engine. Cedar’s simple and intuitive syntax supports common authorization use-cases with readable policies, naturally leveraging concepts from role-based, attribute-based, and relation-based access control models. Cedar’s policy structure enables access requests to be decided quickly. Cedar’s policy validator leverages optional typing to help policy writers avoid mistakes, but not get in their way. Cedar’s design has been finely balanced to allow for a sound and complete logical encoding, which enables precise policy analysis, e.g., to ensure that when refactoring a set of policies, the authorized permissions do not change. We have modeled Cedar in the Lean programming language, and used Lean’s proof assistant to prove important properties of Cedar’s design. We have implemented Cedar in Rust, and released it open-source. Comparing Cedar to two open-source languages, OpenFGA and Rego, we find (subjectively) that Cedar has equally or more readable policies, but (objectively) performs far better.
@article{paperbot2527,
title = {Cedar: A New Language for Expressive, Fast, Safe, and Analyzable Authorization},
author = {Joseph W. Cutler and Craig Disselkoen and Aaron Eline and Shaobo He and Kyle Headley and Michael Hicks and Kesha Hietala and Eleftherios Ioannidis and John Kastner and Anwar Mamat and Darin McAdams and Matt McCutchen and Neha Rungta and Emina Torlak and Andrew M. Wells},
journal = {Proceedings of the ACM on Programming Languages},
volume = {8},
number = {OOPSLA1},
year = {2024},
doi = {10.1145/3649835}
}