Skip to main content
← Back to list
01Issue
FeatureShippedSwamp Club
Assigneesstack72

Relationships

#1046 docs: declarative grants directory how-to and reference updates

Opened by stack72 · 7/8/2026· Shipped 7/8/2026

Parent

Related to #662 (serve authentication & authorization) and #1037 (declarative grants directory).

Summary

Document the new `grants/` directory feature — writing grant definitions as YAML files, validating and applying via reload, and coexistence with CLI-created grants.

Pages to create/update

New: How-to — Manage grants with files

Location: `content/manual/how-to/swamp-serve/manage-grants-with-files.md`

Covers:

  • Creating the `grants/` directory (created by `swamp repo init`)
  • Writing YAML grant files with examples: ```yaml

    grants/platform-team.yaml

    grants:
    • subject: idp-group:platform-eng effect: allow actions: [run] resource: workflow:@acme/*
    • subject: idp-group:platform-eng effect: allow actions: [run] resource: workflow:@acme/* condition: 'tags.env == "staging"' ```
  • Multiple files for different teams/concerns (`platform-team.yaml`, `compliance.yaml`, etc.)
  • Applying changes: `swamp access reload --server wss://...`
  • What reload does: validates all files → reconciles (creates new, revokes removed, skips unchanged) → rebuilds policy snapshot → returns full grant list
  • Validation failures reject the entire reload — current policy unchanged
  • Removing grants: delete the entry from the file or delete the entire file, then reload
  • Coexistence with CLI grants: both are just grants in the same store, `source` column in `grant list` shows where each came from (`method`, `file:platform-team.yaml`, `config`)
  • The file is not the only source of truth — CLI grants and file grants coexist independently
  • Accepted file extensions: `.yaml` and `.yml`
  • Flat directory only — no subdirectories

Update: reference/swamp-serve/authorization.md

Add to the "Grant source types" table:

Source Description
`file:` Loaded from a YAML file in the `grants/` directory

Document that the reconciler only touches `source: file:*` grants — CLI and config grants are never modified by the reconciler.

Update: reference/swamp-serve/access-commands.md

Document the enhanced `reload` command behavior:

  • Reads and validates all files in `grants/`
  • Reconciles file grants (creates new, revokes removed for deleted files/entries)
  • Rebuilds policy snapshot
  • Returns reconciliation summary + full active grant list
  • Validation failure aborts the entire reload

Update: how-to/swamp-serve/manage-access-grants.md

Add a cross-link: "For managing grants as files checked into git, see Manage grants with files."

Scope

Documentation only — no code changes. All in the swamp-club/swamp-club repo under `content/manual/`.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 4 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

7/8/2026, 11:19:10 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/8/2026, 10:12:54 PM

Sign in to post a ripple.