Skip to content

fix(auth): local authz adapter picks up tuples written by other processes - #154

Merged
zumbrunn merged 2 commits into
mainfrom
fix/local-authz-reload-153
Nov 12, 2026
Merged

zumbrunn merged 2 commits into
mainfrom
fix/local-authz-reload-153

Conversation

@zumbrunn

Copy link
Copy Markdown
Member

Closes #153.

  • AuthzLocalAdapter rescans data/permissions/ at most once per second (configurable via refreshIntervalMs), adding new tuple files and dropping removed ones. Previously rejected files (e.g. unsigned under strict HMAC) are retried, so authz:sign against a live server works too.
  • Files known before a listing are the only removal candidates, so an in-process write racing a rescan is not dropped.
  • Tests: cross-adapter add/delete visibility, throttling, in-process writes surviving a rescan.
  • Fixes the "immediately effective" comment in users-create.ts; docs PR in dune-docs.

Not covered: the DB-backed authz adapter (already shared across processes).

🤖 Generated with Claude Code

zumbrunn and others added 2 commits November 11, 2026 12:45
…sses

The index was built once at startup, so CLI-created users/grants (and
revokes) did not apply to a running server until restart. Rescan
data/permissions/ at most once a second.

Closes #153

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ons dir

Files that fail HMAC verification are still retried on every rescan so
authz:sign can pick them up, but are only logged again when their content
changes. A missing data/permissions/ is treated as all files gone. Adds
tests for sign-later, invalid HMAC, log-once and the missing directory, and
documents the in-process delete race.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@zumbrunn
zumbrunn merged commit 0f64110 into main Nov 12, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI-written users/grants don't take effect on a running server (local authz index never reloads)

1 participant