Skip to content

v0.8.0

Choose a tag to compare

@hxx0611 hxx0611 released this 18 Aug 10:03
· 24 commits to main since this release

v0.8.0 — Admin Authentication, Telegram Notifications & Encrypted Secrets

Added

  • Admin authentication: one-time /setup wizard with scrypt-hashed admin password, /login / /logout, one-time recovery code for password reset (recovery rotates the session secret, invalidating all old sessions).
  • HMAC-signed admin session: signed, HttpOnly, SameSite=Lax cookies with expiry + entropy; no third-party auth dependency.
  • Protected pages and Server Actions: /, /domains/[id], /notifications and every mutating Server Action require an authenticated admin session.
  • Telegram notification channel: create/edit Telegram channels from the notification UI; bot token validated via Telegram getMe (server-side only) before saving.
  • Encrypted notification secret storage: AES-256-GCM (iv:tag:ciphertext) for the Telegram bot token; ENCRYPTION_KEY read from the environment (required in production).
  • Telegram sender secret resolution: encrypted store first, legacy TELEGRAM_BOT_TOKEN env fallback, controlled failure when neither is available (decryption failure never falls back).
  • Notification configuration UI: channel CRUD, rule CRUD, token configuration status, delivery retry.
  • Migration 0006: admin_settings and notification_secrets tables.

Security

  • Telegram bot tokens encrypted at rest; never rendered back into HTML/RSC/client bundles — only CONFIGURED/NOT CONFIGURED status exposed.
  • Unified, non-enumerating auth errors.
  • SSRF protection kept: HTTPS-only outbound with per-redirect re-validation.
  • No secret in logs: tokens, passwords, recovery codes, encryption keys never appear in logs/worker output/errors.

Changed

  • Version bumped v0.7.3 → v0.8.0.
  • Channel types now include Telegram alongside Webhook and Email.
  • Secret handling moved to encrypted storage with legacy env fallback.

Fixed

  • Notification configuration pages previously public; now admin-authenticated.
  • Documentation synchronized with the implemented feature set (README bilingual, docs, CHANGELOG).

Compatibility

  • Migration 0006 adds two tables; existing data preserved (non-destructive).
  • Production requires ENCRYPTION_KEY (32-byte / 64 hex). Existing TELEGRAM_BOT_TOKEN deployments keep working via legacy fallback.
  • Node.js >= 22 supported (22 / 24 / 26 CI-tested).