chore(release): bump to 1.15.0 — DC-042/043 Tailscale admin + DC-044 health-check marker
CI / Test & Lint (push) Has been cancelled
CI / Security audit (push) Has been cancelled

This commit is contained in:
Krystie
2026-07-14 02:13:29 -07:00
parent a800f0d74e
commit fb8942a3fa
3 changed files with 23 additions and 3 deletions
+21 -1
View File
@@ -5,18 +5,38 @@ All notable changes to DashCaddy are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [1.15.0] - 2026-07-14
### Added
- **Auto-login page served from API (`GET /api/v1/auth/login-page?service=<id>`).** Chat, Plex, Jellyfin, and Emby auto-login pages are now generated by the API instead of living as 5 KB inline HTML blobs inside Caddyfile `respond` blocks. Caddyfile blocks shrink from ~50 lines to 3. Future login-page changes deploy with the container, no `caddy-apply` needed.
- **Real Tailscale manager (DC-042).** `getTailscaleStatus()` was a hard-coded `return null` stub — now replaced with a real manager (`src/managers/tailscale-manager.js`, 250 LOC) that talks to the local `tailscaled` over the bind-mounted control socket. `/api/v1/tailscale/{status,devices,check-connection}` now return real data. `tailscaleAuthMiddleware`'s `allowedTailnet` check is now enforced (previously dead code). 399 lines of regression tests.
- **Tailscale coordination API client + admin routes (DC-043).** Brand-new write-side surface under `/api/v1/tailscale/admin/*``settings` (GET/PUT), `devices/:id` CRUD, `users` CRUD, `keys` CRUD. Plus `/api/v1/tailscale/settings` PUT. Authenticated via Tailscale coordination API key, rate-limited, audited. 405 LOC client + 257 LOC routes + 1180 LOC of tests across two new test files.
- **X-DashCaddy-HealthCheck probe marker (DC-044).** Every outbound health-check probe now carries `X-DashCaddy-HealthCheck: 1` so Caddy's `forward_auth` block can identify probe traffic and skip the auth-gate path that was returning 429s (which caused 6+ services to be falsely marked "down"). Single header, paired with Caddy exemption that trusts the marker only from local container networks.
- **Security Center — multi-source event pipeline with dashboard UI.** Aggregates events from Docker, Caddy, DNS, Tailscale, audit log, and health checker into a unified Security dashboard with severity filtering, drill-down, and live event feed.
- **API-SURFACE.md — full route inventory.** Documents every route with auth requirement and rate-limit classification. Living reference, regenerable from `src/app.js` mount list.
- **PRODUCT-SPEC.md draft.** Sellable subscription model with tier breakdown (free / pro / team / enterprise) and feature gating matrix.
### Fixed
- **SSO cookie placeholder bug.** `dashcaddy_auth` Caddy snippet had `header_up Cookie {http.request.cookie}` — an invalid placeholder that resolved to empty string at runtime, silently clearing the session cookie before it reached the `forward_auth` gate. SSO worked only via the IP-session fallback (same-IP). Removed the line; Caddy's `forward_auth` forwards all original request headers automatically.
- **Jellyfin/Emby `merge()` syntax error.** `try` block in the auto-login page's `merge()` helper was missing its closing `}` before `catch`, causing a JS syntax error in the browser that silently broke localStorage token merging.
- **`/api/v1/network/ips` ReferenceError (DC-031).** Network detector wasn't destructured into `app.js`, so the Add Service modal's IP fields crashed silently on open. Extracted `src/utilities/network-detector.js` (99 LOC), wired through `src/context/index.js`, added 360-LOC regression test.
- **`/health/ready` false negative (DC-044 sub-fix).** Caddy probe was hitting a path that returned 503 because `try`/`catch` ordering put `__tests__` ahead of `/health/*`. Reordered in `src/app.js`. Tests adjusted accordingly.
- **Legacy `/api/auth/totp/check-session` shim path (DC-044 sub-fix).** Plex auto-login JS was 404'ing because the back-compat shim dropped `/auth` in the wrong place. Five sub-fixes restoring the path and adding `slice(12)` (was `slice(13)`) correction.
- **Dead root `dashcaddy-api/self-updater.js` deleted (DC-036).** 0 runtime callers, leftover from a refactor. Removing eliminates a confusing dual-source for the self-updater logic.
- **`getLocalVersion()` returning `0.0.0` (DC-033, shipped in v1.14.9).** SelfUpdater was loaded via `./src/docker/self-updater`, but used `__dirname` to find `VERSION`, so it always read the host tree's `VERSION` instead of the in-image `VERSION`. Republished v1.14.9 with the fix baked in.
- **`WorkflowEngine.healthCheckService` `servicesStateManager.getState` bug (DC-044).** The bundled-workflows call site used a non-existent `.getState()` method AND forgot to `await`. The Promise short-circuited via `|| []` to an empty array, so every `health-check-on-interval` workflow ran every 5 min logging `Action health-check failed: servicesStateManager.getState is not a function` while silently iterating over zero services. Fixed to `await servicesStateManager.read().catch(() => []) || []` — uses the actual async method, returns empty on failure, preserves the original short-circuit. 5-case regression test in `__tests__/bundled-workflows-health-check.test.js`. **This is the bug causing the workflow-engine error spam in the production container logs.**
- **`WorkflowEngine` init — `new (require(...))()` precedence bug (DC-045).** Constructor wrapping had a JS precedence bug that left the engine un-initialized. Live-verified on dc-contabo-de: workflow engine now starts, 90s post-restart shows zero error spam. Combined with DC-044, workflows now execute end-to-end.
### Changed
- **CLAUDE.md rewrite.** Was describing the old Windows-local `C:/caddy/` + `caddy-api/` layout. Now accurately documents DNS2 as production (`/opt/dashcaddy/`, `caddy-apply`, correct Tailscale IP, SSO architecture).
- **`.gitignore` coverage.** Runtime-generated data files (`audit-log.json`, `backup-history.json`, `credentials.json`, `health-history.json`, etc.), cert directories (`generated-certs/`, `pki/`), and root-level test scripts now ignored.
- **Updater hardening (DC-025).** `dashcaddy-update.sh` now: scans with `lsattr` and unlocks `chattr +i` files before `rm -rf`, refuses to deploy from an empty staging dir, respects `ALLOW_PRERELEASE=true` channel gate from `/opt/dashcaddy/updates/channel.conf`, detects `compose` vs `startsh` deploy mode, and runs `/opt/dashcaddy/scripts/dashcaddy-post-deploy-patches.sh` idempotently before `docker build`. 176 insertions, 43 deletions.
- **`dashcaddy-update.sh` now backs up `trigger.json` + `result.json` (DC-038).** Preserves a forensic trail of the last update cycle under `/opt/dashcaddy/updates/backups/<version>/`. Pure observability — no behavior change.
- **`dashcaddy-post-deploy-patches.sh` repurposed as a verifier (DC-040).** Used to silently patch and continue. Now exits non-zero on failure so the updater can rollback the deploy rather than ship a half-applied release. Fail-loud, not patch-and-continue.
- **All module file defaults route through `platformPaths.dataDir` (DC-039).** Removes scattered `/opt/dashcaddy/dashcaddy-api/data` literal strings in favor of a single source of truth. Makes Windows + Linux + Docker parity clean.
### Security
- **Tailscale admin endpoints are scoped to `allowedTailnet`.** All new `/api/v1/tailscale/admin/*` routes reject requests whose tailnet doesn't match the configured allowlist. Unauthenticated requests get 401; wrong-tailnet requests get 403.
## [1.14.0] - 2026-06-28
+1 -1
View File
@@ -1 +1 @@
42376e2
8ea41e0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "dashcaddy-api",
"version": "1.14.9",
"version": "1.15.0",
"description": "DashCaddy API server - Dashboard backend for Docker, Caddy & DNS management",
"main": "server.js",
"scripts": {