ZDDC/zddc/internal
ZDDC 6cc0d2ae27 feat(zddc-server): /.auth/admin forward_auth endpoint
A machine-only HTTP endpoint that returns 200 if the request's
X-Auth-Request-Email is in the root .zddc admins: list, 403 otherwise.
No body, no redirect — pure authorization decision intended to be
polled by an upstream proxy's forward_auth directive.

The motivating use case is gating /devshell/* (code-server) in the
dev-shell pod on root-admin status before the request ever reaches
code-server, which has no built-in ACL of its own. zddc-server's
own routes keep the existing .zddc cascade ACL and don't go through
this endpoint.

Reuses zddc.IsAdmin (one cached map lookup) so the check is cheap
enough to call on every request. Edits to /srv/.zddc propagate via
the existing fsnotify watcher's policy-cache invalidation.

Tests cover empty email, non-admin, admin, and the bootstrap state
where no root .zddc exists (deny everyone — the safe default).

Docs: zddc/README.md "Forward-auth target for upstream proxies"
section + AGENTS.md notes bullet.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 21:08:39 -05:00
..
apps release: v0.0.8 lockstep 2026-05-01 20:12:48 -05:00
archive feat: lockstep release infra + cascade/.archive fixes + profile perf + page redesign 2026-05-01 20:11:38 -05:00
config feat(zddc-server): CLI flags, --version, CWD-default ZDDC_ROOT 2026-05-01 15:43:31 -05:00
fs Initial commit 2026-04-27 11:05:47 -05:00
handler feat(zddc-server): /.auth/admin forward_auth endpoint 2026-05-01 21:08:39 -05:00
listing feat(zddc-server): user profile page replaces /.admin/ 2026-04-29 16:32:02 -05:00
tlsutil Initial commit 2026-04-27 11:05:47 -05:00
zddc feat: lockstep release infra + cascade/.archive fixes + profile perf + page redesign 2026-05-01 20:11:38 -05:00