Inline vs reference
ALFA's flexible structure enables the creation of reusable policy elements, promoting modularity and efficient policy development. You can define policies, rules, and policy sets independently and reuse them in other policies by referencing their unique names. This approach reduces redundancy and simplifies policy maintenance.
When referencing a policy or rule within another policy, the compiler inlines the referenced element, effectively embedding it into the referencing policy. This ensures that the referenced element is part of the overall policy structure and contributes to the overall access control decision-making process.
However, although policies and rules are inlined during compilation, their original definitions remain unchanged. This means you can update the original element without affecting the referencing policies. This approach maintains the integrity of the policy structure while enabling flexible modification and reuse of policy components.