ZDDC/zddc/internal
ZDDC f7233237cd feat(server): collapse dot-guard into one admin-gated .zddc.d reserve
Replace the blanket "block every dot/underscore segment" dispatch guard
with a single reserved namespace, .zddc.d/, which is admin-only at every
depth. Everything else dot-prefixed is now ordinary ACL-governed content;
a leading dot only hides an entry from listings (UI), not from the ACL.

.zddc.d/ holds the bearer-token store, so it must stay closed even under a
broad operator grant (e.g. `*: rwcd`). The path-tree cascade has no
match-this-name-at-any-depth rule, so .zddc.d/ is gated by segment name via
a hard rule that overrides operator ACLs — on reads in dispatch (404,
existence-hidden) and on writes in authorizeAction (403 defense-in-depth
for direct callers). Token validation is unaffected: it reads
.zddc.d/tokens directly from the filesystem in ACLMiddleware, before the
HTTP-layer gate.

The segment match is case-insensitive (strings.EqualFold): ZDDC_ROOT may
sit on a case-insensitive filesystem (SMB/CIFS/Azure Files) where .ZDDC.D
resolves to the same dir, so a write to a case-varied path — e.g. a MOVE
destination header that skips dispatch's canonical case-folding — must not
slip past the gate and plant a forged token. The dispatch gate also runs
BEFORE the raw .zddc view so the reserve's own cascade
(/<dir>/.zddc.d/.zddc) is existence-hidden rather than leaked by
ServeZddcFile. Regression tests cover both.

To keep all bookkeeping inside the one reserve, relocate the last two
caches under it (both regenerable, no data migration): the apps cache
_app/ -> .zddc.d/apps/ and the per-directory MD-conversion cache
<dir>/.converted/ -> <dir>/.zddc.d/converted/.

New internal/handler/sidecar.go defines ReservedSidecar + the
HasReservedSidecar / ActiveAdminForSidecar predicates used by both the
dispatch read-gate and the write-path gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 13:23:00 -05:00
..
apps feat(server): collapse dot-guard into one admin-gated .zddc.d reserve 2026-06-03 13:23:00 -05:00
archive fix(archive): log swallowed walkdir errors during transmittal indexing 2026-05-21 16:41:29 -05:00
auth feat(server): self-issued bearer tokens + --no-auth flag 2026-05-08 07:40:28 -05:00
cache fix(cache): track background revalidation goroutines; drain on shutdown + in tests 2026-05-21 16:21:37 -05:00
config docs+server: document the .zddc bootstrap config + warn at startup 2026-05-19 12:40:47 -05:00
convert refactor(convert): wrapper-in-image owns the sandbox; Go just exec's binaries 2026-05-19 07:47:58 -05:00
fs feat(browse,tables): flat-peer clients + dual-mode cross-party aggregate 2026-06-03 12:35:31 -05:00
handler feat(server): collapse dot-guard into one admin-gated .zddc.d reserve 2026-06-03 13:23:00 -05:00
jsonschema feat(forms): augment served schema with cascade field_codes + locks 2026-05-19 09:58:21 -05:00
listing refactor(history): store under .zddc.d/history/; drop .history carve-out + dead .devshell 2026-06-02 13:48:41 -05:00
policy feat(listing): per-entry verbs string for client-side capability gating 2026-05-21 08:14:25 -05:00
tlsutil feat(server): TLS hardening per NIST SP 800-52 Rev. 2 + HSTS 2026-05-04 17:55:52 -05:00
zddc feat(browse,tables): flat-peer clients + dual-mode cross-party aggregate 2026-06-03 12:35:31 -05:00
zipfs feat(zddc): serve a .zip as a virtual directory (zipfs + dispatch intercept) 2026-05-12 12:17:47 -05:00