Setup
Policy Setup
Section titled “Policy Setup”To work with Brane policies, you need two things:
- A development environment for writing and testing eFLINT policies
- A management tool for deploying policies to your domain’s node
eFLINT Development Environment
Section titled “eFLINT Development Environment”The Haskell eFLINT interpreter provides an interactive REPL for developing and testing policies offline.
Install Haskell
Section titled “Install Haskell”# Ubuntu/Debiansudo apt-get install cabal-install ghccabal updateFor other platforms, see the Haskell installation guide.
Install the eFLINT Interpreter
Section titled “Install the eFLINT Interpreter”git clone https://gitlab.com/eflint/haskell-implementation ./eflintcd eflintcabal configurecabal buildcabal installVerify
Section titled “Verify”eflint-replType :help in the REPL for available commands.
Editor Support
Section titled “Editor Support”Syntax highlighting is available for:
Management Tools
Section titled “Management Tools”Option A: Policy Reasoner GUI (Recommended)
Section titled “Option A: Policy Reasoner GUI (Recommended)”The visual interface is the easiest way to manage policies.
Using Docker:
git clone https://github.com/BraneFramework/policy-reasoner-guicd policy-reasoner-guidocker compose up -dNative installation:
Terminal 1 — start the frontend:
cd clientnpx parcelTerminal 2 — start the backend:
cargo runOption B: branectl
Section titled “Option B: branectl”If you prefer the command line, branectl can manage policies too. Install it following the branectl installation guide.
Authentication
Section titled “Authentication”To manage policies on a worker node, you need an access token generated by the node’s administrator:
# Administrator generates a token for youbranectl generate policy_token <YOUR_NAME> <DOMAIN_ID> 30d \ -s ./config/policy_expert_secret.jsonThe resulting policy_token.json file is your credential. Keep it secure — it grants access to manage the domain’s policies.
Next Steps
Section titled “Next Steps”With your tools installed, proceed to writing policies.