Skip to main content

The most recent patch for this version is 26.1.6.  Learn more  

Version: 26.1

Write ALFA policies

When use cases, attribute dictionaries, and tests are defined, go ahead and create an ALFA policy.

  1. First, delete the existing policies that came with the APD example code (src/authorizationDomain/alfaSpecifications/*).

  2. Create a new ALFA file in this directory:

    /src/authorizationDomain/alfaSpecificaitons/Main.alfa
    namespace acme {
    policy Main {
    apply firstApplicable
    rule {
    permit
    condition acme.role == "manager"
    }
    }
    }
    tip

    Make sure to check the ALFA reference documentationOpens in a new tab

  3. Iterate on your policy until your tests passes.

tip

It is suggested to take the Axiomatics ALFA coursesOpens in a new tab. Contact Axiomatics Customer SupportOpens in a new tab to get access.