ACM — Tutorial
This is the tutorial part of the ACM — Access Connectivity guide. See also Short info and samples.
Before you begin
Section titled “Before you begin”Choose one resource, two roles and an ownership condition if it matters. Use example users and resources rather than live customer data.
Understand the model
Section titled “Understand the model”Express the decision being made
Section titled “Express the decision being made”A role can describe a collection of permissions, such as the ability for Support to inspect reservation details. A resource supplies the target of a decision. Some decisions also depend on attributes: a Traveler can inspect their own reservation but not another traveler’s. Name those conditions explicitly so a reviewer can compare the expected decision for two similar requests.
The matrix is a useful overview because it exposes missing or surprising declarations. A green-looking cell is still only a representation of a rule or default. Establish what an unconfigured cell means and how conflicting rules are resolved in the supported workflow. Do not infer these semantics from colour or from the presence of a navigation link.
Connect the declaration to enforcement
Section titled “Connect the declaration to enforcement”A rule can affect screens, domain operations and data resources. The visible screen is only one possible entry point; a direct API request must meet the intended access policy too. Connect the rule to the actual enforcement point and test the target engine’s behavior after export.
A coverage check asks whether required rules are present. A policy test asks whether a particular request receives the intended decision. An application test can then show whether that decision is applied before protected work occurs. These are complementary checks. Start with one allowed and one denied fixture, then add ownership and missing-rule cases as the policy becomes more expressive.
Visual walkthrough
Section titled “Visual walkthrough”The same role, a different owner. Two reservation cards show distinct owner labels; Alex requests each; the ownership condition explains opposite decisions.
Pause and predict: Why does one Traveler request pass while the other is denied?
This is the text storyboard for a proposed short illustrated film. The written walkthrough and exercises are available now; a published movie will be added after its scenes, captions and model references have been reviewed.
Import / export
Section titled “Import / export”ACM rules use an ACCESS_RULE grammar with a linter for predicate validity; outbound, the matrix exports as Cerbos YAML, OPA Rego, or AWS Cedar policies so the access decisions generated here run in a real policy engine. The CLI surface is five subcommands: the three Postgres-backed projections — ctxbrew acm matrix (role × screen matrix), acm audit-log (who changed which rule, newest first), and acm check-coverage (exit 1 if any screen has no rule — the completion gate as a command) — plus acm generate (regenerate the projections via the Studio API) and the file-based acm export-policy --file <acm.json> --target cerbos|opa|cedar, which needs no project or database (--out writes the policy to a file). Details: Import & Export.
