Intuitive Syntax
Write policies that read like natural language while maintaining the precision of code
From Logic to Access – Effortlessly.
PolicyFlow is a powerful DSL for crafting fine-grained authorization policies with clarity and precision. Designed for APIs, it streamlines complex access control into clean, readable rules. Built for scale, auditability, and developer happiness.
// A policy governing actions within the 'documents' namespace.
policy DocumentAccess {
actions: ["documents:**"] // This policy will only run for document-related actions.
rules {
rule AllowAdminsToRead {
// Check if the action is specifically 'documents:read:confidential'
when action == "documents:read:confidential" AND "admin" in user.roles
then ALLOW
}
rule AllowEditorsToWrite {
// Check if the action is any kind of 'write' action within the documents namespace.
when action.Matches("documents:write:*") AND "editor" in user.roles
then ALLOW
}
}
}
Write policies that read like natural language while maintaining the precision of code
Built for enterprise-scale policy management with modular design and composition
Rich tooling, comprehensive testing framework, and excellent IDE integration