Commit Graph

30 Commits

Author SHA1 Message Date
b6ab518e2a release: bump minor on the 87 modules converted to Wants=secubox-core (Phase 2)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-19 09:08:22 +02:00
2ec7cef1b2 feat(profiles): Phase 2 — Requires=secubox-core → Wants= on all units (remove hard cascade)
secubox-core.service is a Type=oneshot (mkdir+chown) that RemainAfterExit=yes. A hard
Requires= on ~108 units cascade-stops them all if core is restarted/fails (e.g. a
secubox-core package upgrade) — a thundering-herd outage. After= keeps the ordering;
Wants= keeps the soft dependency without the cascade. Prereq for mass native apply
(Phase 3). Scaffolds (new-module.sh/new-package.sh) updated so future units use Wants=.

Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-19 09:06:54 +02:00
a96c3b1c4a fix(mail): /user/password writes the real dovecot passwd-file (admin reset was a no-op)
The endpoint shelled to 'mailctl user passwd', which writes a host-side copy the
LXC never reads, so admin password resets silently didn't take (login kept
failing). Now generates the SHA512-CRYPT hash via the container's doveadm and
updates DATA_PATH/config/users directly (the bind-mounted file dovecot reads),
normalising any legacy 2-field line to the full 8-field record.

Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-16 12:00:41 +02:00
83c8094141 fix(mail): live TCP-probe status + certs-cyan webui reskin
Status/components/ports now use direct TCP probes instead of lxc-info (which
read the wrong lxc_path and reported everything Stopped); storage reads vmail.
Webui rebuilt in the /certs/ hybrid-skin look: emoji stat-cards, 15s live
pulse, External-mailboxes tab, scanline engine dropped; all endpoints preserved.

Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-16 10:12:32 +02:00
238637e09a release(webui): bump 127 arch:all packages for hybrid-dark reskin bake-in 2026-07-10 09:07:42 +02:00
3197f866e4 feat(webui): fleet reskin — apply hybrid-dark cyan overlay to all 116 crt-light panels
Add /shared/hybrid-dark.css: a shared overlay that remaps the design tokens
(consumed by crt-light.css, sidebar-light.css and every module's inline styles)
to the cyan hybrid-dark palette from /certs/ + /wireguard/. body.hybrid-dark
(specificity 0,1,1) beats :root and inline :root, so one token remap flips the
whole tree — no per-panel rewrite. Each panel gains the overlay <link> + the
hybrid-dark body class (2-line additive swap; crt-light.css kept as base).
See .claude/WEBUI-PANEL-GUIDELINES.md.

Panels with fully bespoke styles (certs/wireguard/users/nac already hybrid;
~14 non-crt-light custom panels) are untouched.
2026-07-10 08:40:10 +02:00
c01f10c474 docs(wiki): refonte 126 modules — snapshots WebUI déterministes + READMEs 4 langues (ref #742)
Capture des 126 dashboards authentifiés (JWT minté serveur, injection localStorage)
avec attente de COMPLÉTION d'affichage déterministe (sentinelles de chargement
purgées + réseau calmé, plafond --delay) au lieu d'un sleep fixe. 126/126 OK.

- capture-screenshots.py: _wait_content_ready déterministe, mode --token (bypass
  login), goto domcontentloaded (plus de stall networkidle sur dashboards live)
- generate-docs.py: 23 modules jusqu'ici non documentés ajoutés (descriptions
  réelles depuis debian/control, EN/FR/DE/ZH), licence MIT→LicenseRef-CMSD-1.0,
  images wiki en URL raw.githubusercontent absolue (relatif = 404 sur GitHub wiki)
- 126 snapshots + thumbnails régénérés
- 126 READMEs paquet succincts + pages wiki MODULES/CATEGORIES ×4 langues

Gap modules documentés vs découverts: 23 → 0.
2026-06-26 10:14:14 +02:00
10c043b97a fix(mail): Roundcube SQLite by default (closes #152)
configure_roundcube writes config.inc.php.local with the SQLite db_dsnw,
a random des_key, tls://localhost IMAP/SMTP, and verify_peer=false for the
LXC self-signed cert; included last so it overrides dbconfig-common's MySQL
default (which 500s with no MariaDB present). Inits the SQLite schema from
/usr/share/dbconfig-common/.../sqlite3 and ships the sqlite3 CLI. Idempotent;
mirrors the verified live gk2 hotfix. Bump 2.3.1 -> 2.3.2.
2026-05-29 09:34:32 +02:00
CyberMind
aba60ae356
feat(/data Phase 1): migrate 5 core packages from /srv to /data with postinst auto-mv (closes #319 Phase 1) (#320)
Phase 1 — 5 high-impact core packages migrated to the canonical
/data storage convention (charter §Storage). Each package's debian/postinst
gains an idempotent migration block that moves legacy /srv/<dir> → /data/<dir>
on upgrade and leaves a symlink behind for back-compat.

* secubox-mitmproxy v1.0.2: migrates /srv/mitmproxy*, /srv/mitmproxy-waf,
  /srv/mitmproxy-in. 8 files in source updated.
* secubox-waf v1.1.1: same dirs (shared with mitmproxy). 5 files updated.
* secubox-mail v2.3.1: migrates /srv/mail. 2 files updated.
* secubox-mail-lxc v2.2.1: migrates /srv/mail. 1 file updated.
* secubox-gitea v1.4.2: migrates /srv/gitea. 4 files updated.

Total: 20 files, 58 substitutions in source. Postinst auto-migration
is service-aware (stop → mv → ln -s → start). Boards previously on
/srv/<pkg> are seamlessly moved; new installs land directly on /data.

Phase 2 (~12 packages) and Phase 3 (3 cosmetic) tracked in #319.

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-21 16:32:41 +02:00
CyberMind
5e93c73600
feat(navbar): consolidate to 6 charter categories + fix dropped menu entries (closes #306) (#307)
The hub's `_compute_menu_sync()` drops menu entries lacking an `id`
field. 6+ packages (lyrion, yacy, zigbee, rustdesk, grafana, authelia)
shipped a different schema (`title/url/section/module`) so they NEVER
appeared in the navbar. Plus the existing CATEGORY_META declared 12
sections (dashboard/security/network/system/core/users/services/
privacy/monitoring/publishing/apps/admin), not the 6 SecuBox charter
modules.

Changes:
* All 121 packages/secubox-*/menu.d/*.json normalised to the canonical
  schema (id, name, path, category, icon, order, description). Legacy
  schema aliases (title/url/module/section) preserved as fallbacks then
  dropped from the file.
* Each menu entry's category remapped to one of the 6 charter modules:
  AUTH (auth/users/identity/zkp/nac/openclaw),
  WALL (crowdsec/waf/mitmproxy/hardening/threat-* /cve-triage/...),
  BOOT (kernel-build/eye-remote/master-link/droplet/cloner/backup/...),
  MIND (ai-gateway/mcp-server/grafana/ndpid/netifyd/glances/...),
  ROOT (system/hub/portal/console/admin/vault/vm/rtty/...),
  MESH (wireguard/dns/tor/matrix/gitea/nextcloud/mail/lyrion/yacy/
        zigbee/dns-provider/rustdesk/... — all network + comms apps).
* secubox-hub v1.4.0 — CATEGORY_META rewritten with the 6 charter
  modules carrying their official color from DESIGN-CHARTER.md and
  the complementary-pair order. DEFAULT_MENU fallback remapped too.
* secubox-zigbee v2.5.3 — www/zigbee/index.html rewritten with the
  canonical SecuBox scaffold (body display:flex, sidebar 220px fixed,
  .main reserving 48px for the global-menu-bar). MESH palette.

Browser side: operators need to clear localStorage sbx_menu_cache (or
hard-refresh after the 1h TTL) to see the new sections after deploy.

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-21 10:03:05 +02:00
CyberMind
99fc829b45
fix(web): rewrite stale /portal/login.html -> /login.html (closes #222) (#223)
PR #169 moved login.html out of secubox-hub to /usr/share/secubox/www/
under secubox-portal's ownership, but 67 source files across the
package set still redirected to /portal/login.html which no longer
exists on disk. nginx fell back to /index.html (hub root) on every
hit, whose checkAuth() bounced back to /portal/login.html, producing
an infinite "Redirecting to login..." loop with no way for any user
to authenticate.

sed -i 's|/portal/login\.html|/login.html|g' across all packages/*/www
sources (82 occurrences). The two prior partial fixes that triggered
this investigation (bcc6a781, 464e3379) only covered a subset and
missed the kiosk root checkAuth in secubox-hub/www/index.html plus
65 module index.html files.

Verified: grep -rl '/portal/login\.html' packages/ | grep -v /debian/
returns empty.

Discovered while testing the firstboot v2-schema+argon2 chain end-to-end
in a VBox amd64 boot of CI run 26082003883 (the #218 image build fix)
— firstboot now works, users.json gets a valid argon2 hash for
admin/secubox, the portal API runs, but the login UI is unreachable
because of this dangling URL.

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-19 11:44:43 +02:00
CyberMind
6aa5e38d7d
Mail Phase 2 — Rspamd migration (closes #153) (#160)
* test(mail): Phase 2 scaffolding — rspamd.sh + templates + routers + bats baseline (ref #153)

* feat(mail): rspamd.sh — install_rspamd + re-entry guard (ref #153)

* feat(mail): Rspamd config templates (9 .conf files) — DKIM/ARC/DMARC/greylist/ratelimit (ref #153)

* feat(mail): lib/mail/rspamd.sh — configure helpers + DKIM keygen + D9 purge gate (ref #153)

* feat(mail): Milestone C — rspamd_client + /rspamd/* router + legacy shims (ref #153)

- rspamd_client.py: httpx wrapper around the Rspamd HTTP controller
  (read /stat /history /graph; write /reload /learnspam /learnham).
- routers/rspamd.py: 11 new endpoints under /api/v1/mail/rspamd/*
  (status, history, scores, reload, learn-{spam,ham}, whitelist CRUD,
  dkim/{domain}/{status,keygen}).
- routers/legacy.py: 14 deprecation shims for the Phase 1 /dkim/*
  /spam/* /grey/* surface. Each emits X-Deprecated-Endpoint: rspamd
  and forwards to the Rspamd equivalent. Removed in v3.0.
- main.py: drops the 14 inline legacy handlers and mounts the two
  routers via app.include_router(). 62/62 Phase 1 endpoint pytest
  still passes.

* feat(mail): Milestone D — mailctl cmd_rspamd dispatcher (ref #153)

Adds rspamd subcommand to mailctl: install / start / stop / restart /
reload / status / dkim-keygen / dns-records / learn-spam / learn-ham /
purge-legacy. The install path calls lib/mail/rspamd.sh helpers in
order: install_rspamd → configure_rspamd_milter → configure_rspamd_controller
→ configure_rspamd_dkim → configure_rspamd_postfix_milter.

The purge-legacy verb requires Rspamd to respond healthy on :11334
before removing SA + OpenDKIM (D9 safety gate).

* feat(mail): Milestone E — install adds rspamd; mail.toml [mail.rspamd]; postinst secrets (ref #153)

- install_mail_packages: now installs rspamd + redis-server + enables
  postfix/dovecot/rspamd at LXC boot (Phase 1 follow-up). Drops Apache/
  Roundcube — they live in the roundcube LXC after the rev. 3 split.
- mail.toml: [mail.rspamd] section (greylist, bayes_autolearn,
  ratelimit_outbound=200/h/user, web_ui_host). horde_url added.
- debian/postinst: on upgrade <2.3, generate /etc/secubox/secrets/
  rspamd-controller.pw (32-byte random) and mkdir /data/volumes/mail/
  rspamd/{dkim,bayes,history,settings} chown 100110 (_rspamd in unpriv).

* feat(mail): Milestone F — rspamd-route-sync-patch deploy helper (ref #153)

Idempotent one-shot script run at deploy time:
1. Removes 10.100.0.{10,11,12} from sync-mitmproxy-routes.sh's
   DEAD_CONTAINER_IPS list so the periodic timer does not reroute
   the mail/horde/roundcube LXC routes to webui.
2. Adds rspamd.gk2.secubox.in → [10.100.0.10, 11334] to both the
   host's /srv/mitmproxy/haproxy-routes.json and the mitmproxy LXC
   copy, then restarts the mitmdump worker.

No source-side nginx vhost added: rspamd UI goes through the
existing HAProxy → mitmproxy_inspector → 10.100.0.10:11334 path.

* feat(mail): bump secubox-mail to 2.3.0 (Phase 2 Rspamd) (ref #153)

* test(mail): Phase 2 13-gate acceptance smoke (ref #153)

Run with: bash tests/scripts/test-mail-phase2-acceptance.sh root@admin.gk2.secubox.in

Gates 1-3 are source-side (parses, pytest, deb path coverage).
Gates 4-11 are board-side (Rspamd listening, Postfix milter wired,
DKIM key generated, modules loaded, web UI via WAF).
Gates 12-13 are post-cutover (legacy purged + Phase 1 regression
check — 5 secubox.in users intact, webmail still WAF-routed).

Every board call uses timeout — Phase 1 lesson, never raw pipes.

* fix(mail): debian/rules ships templates/rspamd/ (path-coverage fix, ref #153)

Phase 1 lesson redux: debian/rules silently misses files unless every
new source-tree subdir gets its explicit cp line. Adds the templates/
rspamd/ install line so the 9 local.d configs + the postfix milter
snippet land at /usr/lib/secubox/mail/templates/rspamd/.

* fix(mail): live-deploy fixes — _rspamd uid via lxc-attach + smoke gate 7/12 (ref #153)

Two issues surfaced during Phase 2 live deploy on admin.gk2.secubox.in:

1. configure_rspamd_controller hardcoded chown to host uid 100110, assuming
   _rspamd is uid 110 inside the LXC. On this Debian 12 image _rspamd is
   uid 107 — rspamd crash-looped with "Permission denied" on secrets.inc.
   Fix: chown via `lxc-attach -- chown _rspamd:_rspamd` so the kernel's
   idmap maps the right uid regardless of image package set. Mode 0640
   instead of 0600 so the worker (uid _rspamd) can read it even if launched
   from a slightly different group context.

2. Smoke gate 7 grepped for the literal string "rspamd" in the first 5
   lines of `rspamc stat`, but rspamc only prints "Results for command:
   stat" + counters. Fix: grep for an always-present stat marker
   ("Messages scanned" or "Pools allocated") with a wider head -10 window.

3. Smoke gate 12 ran `dpkg -l opendkim spamassassin` under `set -e` and
   silently aborted the smoke when the named packages were unknown (the
   success case after purge). Fix: append `|| true` so the grep below is
   the actual gate.

All 13 gates green on admin.gk2.secubox.in after these fixes + the manual
deploy steps (DKIM keygen via lxc-attach, bind-mount entries, HAProxy +
mitmproxy route map for rspamd.gk2.secubox.in).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(mail): rspamd lib + sbin write through live LXC (ref #153)

Phase 2 deploy on admin.gk2.secubox.in surfaced three brittleness points
that the live-deploy fixes patched ad-hoc:

1. configure_rspamd_milter wrote to ${LXC_BASE}/<container>/rootfs/etc/
   rspamd/local.d/ — but on this board the runtime LXC mounts a different
   rootfs (/data/lxc/<container>/rootfs/ per lxc.rootfs.path). Files written
   to the host-side guess landed in a stale shell the running LXC didn't
   see, and the first install's local.d was empty.

2. configure_rspamd_controller had the same path-guess issue plus
   hardcoded chown 100110:100110 (had to be patched in commit 637b2221
   because _rspamd is uid 107 on this image, not 110).

3. rspamd_keygen called rspamadm on the host PATH — rspamadm only exists
   inside the rspamd-installed LXC, so the function errored out on every
   install. The Phase 2 deploy worked around it manually.

This refactor makes all three write THROUGH the live LXC via lxc-attach:
- Each local.d template is streamed in with `lxc-attach -- tee` (kernel
  resolves the rootfs path; idmap applies to the resulting file uid).
- secrets.inc + worker-controller.inc likewise written via tee, then
  chown'd inside the LXC to _rspamd:_rspamd (kernel maps to the correct
  outside-LXC subuid regardless of image).
- rspamd_keygen takes a `container` arg, runs `rspamadm dkim_keygen`
  inside the LXC, writes the keypair to /etc/rspamd-keys/<domain>/ (the
  bind-mounted path; falls back to /var/lib/rspamd/dkim/ if the bind
  mount isn't active yet), and mirrors the DNS TXT to the host data dir
  for DNS-publishing tooling.
- mailctl's `dkim-keygen` subcommand now delegates to the lib function.
- rspamd-route-sync-patch.sh verifies each write (reads back + asserts
  the entry equals expected) and fails loudly on mismatch — the Phase 2
  deploy needed a manual second pass for the mitmproxy LXC copy.

Pre-conditions: configure_rspamd_milter and configure_rspamd_controller
now require the LXC to be RUNNING (added an explicit lxc-info guard).
This matches the cmd_rspamd install path which starts the LXC via
install_rspamd before configuring.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 08:21:23 +02:00
35ba4c2c97 fix(mail): replay Phase 1 fix commits lost in PR #141 squash-merge
The squash-merge of PR #141 dropped the last 4 commits from feature/136,
leaving master with a broken secubox-mail 2.2.0:

* lib/install.sh / lib/lxc.sh / lib/migrate.sh shipped to wrong path
  (debian/rules expects lib/mail/, package only ships users.sh).
* mailctl cmd_install/cmd_start/cmd_stop/cmd_sync/cmd_dkim still call
  /usr/sbin/mailserverctl + /usr/sbin/roundcubectl — those are now
  deprecation shims that exec mailctl, producing the same fork-bomb
  recursion that took down 192.168.1.200 during initial deploy.
* mail-migrate-to-single-lxc.sh in-tree fallback expected old lib path.
* helpers.bash bats fixtures source wrong lib paths.
* Phase 1 post-mortem doc + smoke-gate-11 + cmd_install fix were absent.

This replays the affected files from feature/136 tip
(85394e10) onto master. Net effect identical to a clean merge.

Required before Phase 2 (which sources lib/mail/install.sh).
2026-05-15 17:15:00 +02:00
CyberMind
3219050775
Mail stack: Phase 1 — source-catch-up + legacy package cleanup (#141)
* test(mail): phase1 scaffolding — lib/ stubs + bats red baseline (ref #136)

* feat(mail): lib/lxc.sh — unprivileged veth helpers + bats assertions (ref #136)

* feat(mail): lib/migrate.sh — legacy LXC/toml detectors + I13 data guard (ref #136)

* feat(mail): lib/install.sh — extract Postfix/Dovecot/Roundcube helpers (ref #136)

* feat(mail): mailctl 2.2.0 — canonical paths/IP + migrate-config (ref #136)

* feat(mail): mail.toml schema for single LXC + canonical paths (ref #136)

* fix(mail): API reads canonical config keys; legacy aliases retained (ref #136)

* feat(mail): mailserverctl + roundcubectl reduced to deprecation shims (ref #136)

* feat(mail): mail-migrate-to-single-lxc.sh — defensive scanner (ref #136)

* feat(mail): postinst runs migrate-config + scanner on upgrade <2.2 (ref #136)

* feat(mail): deprecate 3 nginx snippets + WAF integration NEWS (ref #136)

* feat(mail): HAProxy mail-TCP snippet targeting 10.100.0.10 (ref #136)

* feat(mail): bump to 2.2.0 with Breaks/Replaces (ref #136)

* feat(mail): mark mail-lxc/webmail-lxc/webmail transitional 2.2.0 (ref #136)

* test(mail): phase1 endpoint presence pytest (62 routes) (ref #136)

* test(mail): phase1 end-to-end acceptance smoke (ref #136)

---------

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-15 13:26:21 +02:00
bd7dda0c6f feat(secubox): complete meta-script generator Tasks 14-17
Task 14: Arch Profiles
- Add profiles/arch/arm64.yaml and profiles/arch/amd64.yaml
- Add ResolveWithArch() to merger for base → arch → tier chain
- Add tests for arch profile resolution

Task 15: Package secubox.yaml for All Packages
- Add scripts/generate-secubox-yaml.py generator script
- Generate 131 debian/secubox.yaml files with:
  - Category detection (security, network, system, etc.)
  - Tier assignment (all, lite, standard, pro)
  - API socket and UI path detection

Task 16: APT Repository Setup
- Add apt/conf/ reprepro configuration (multi-arch arm64/amd64)
- Add apt/hooks/lintian-check pre-publish validation
- Add scripts/apt-publish.sh and scripts/apt-sync.sh
- Add apt/README.md documentation

Task 17: CI Integration
- Add .github/workflows/build-secubox-cli.yml
- Build for linux-amd64 and linux-arm64
- Version injection via ldflags
- GitHub releases on tag push

Code Quality Fixes (Tasks 10-13):
- Add atomic writes for OTA boot control files (0600 perms)
- Fix NVME device extraction (nvme0n1p2 → nvme0n1)
- Add scanner.Err() checks in hardware detection
- Fix URL injection validation in fetch command
- Add proper cleanup on checksum failures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-11 05:32:29 +02:00
913f6c3bfb Fix body class and menu duplicates across all modules
- Changed body class from "crt-body crt-scanlines" to "crt-light" on all pages
- Fixed portal menu to point to /portal/ instead of /c3box/
- Removed c3box/portal duplicate in menu
- All pages now start with light theme, sidebar.js handles theme switching

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-26 07:11:59 +01:00
cbe7e4ac3a Add CRT light theme across all UI modules
- Create crt-light.css with lighter P31 phosphor colors
- Create sidebar-light.css matching light theme
- Update 49 HTML files to use light theme CSS
- Add apply-light-theme.py script for automated theme application

Theme changes:
- Background: #050803 (dark) -> #e8f5e9 (mint green)
- Cards: #080d05 -> #c8e6c9 (pale green)
- P31 peak: #33ff66 -> #00dd44 (darker for contrast)
- Font: JetBrains Mono / Courier Prime

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 08:55:45 +01:00
a4fa81d349 Add complete package READMEs and multilingual wiki documentation
- Generate README.md for all 45 secubox-* packages with screenshots
- Add multilingual wiki pages (EN, FR, DE, ZH) documenting 47 modules
- Add generate-docs.py tool for documentation generation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-24 15:31:34 +01:00
e3ef51ba8b Apply CRT P31 Phosphor theme to all 38 module UIs
Converted all SecuBox module frontends to CRT design system:
- P31 Phosphor color palette (green phosphor with amber accents)
- Bloom text-shadow effects on headers and active elements
- Monospace Courier Prime typography throughout
- Dark tube glass backgrounds (#050803, #080d05)
- CRT overlays (scanlines, vignette via body classes)

Updated components across all modules:
- Buttons: CRT border glow on hover
- Cards: Inset shadows, ghost borders
- Tables: Amber headers, green data rows
- Badges: Phosphor glow variants
- Modals: Dark backdrop, dim border
- Tabs: Uppercase with letter-spacing
- Forms: Dark inputs with focus glow

Each module now includes:
- crt-system.css (design tokens)
- crt-engine.js (typewriter, audio, toasts)
- Courier Prime font preconnect
- body.crt-body.crt-scanlines classes

Modules updated (38):
auth, backup, c3box, cdn, crowdsec, dns, dpi, droplet,
exposure, gitea, haproxy, hardening, hub, mail, mail-lxc,
mediaflow, metablogizer, mitmproxy, nac, netdata, netmodes,
nextcloud, portal, publish, qos, repo, streamforge, streamlit,
system, tor, traffic, users, vhost, waf, watchdog, webmail,
webmail-lxc, wireguard

Added: scripts/apply-crt-theme.py for future theme updates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-23 18:56:11 +01:00
896e909250 Fix secubox-mail LXC container detection
- Add -P /srv/lxc flag to lxc-info and lxc-attach commands
- Run service as root for LXC access permissions
- Remove systemd sandboxing that blocked LXC operations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-23 07:38:02 +01:00
2cb33850a6 secubox-mail v2.1.0: Enhanced frontend with security dashboard
- Add security features section with toggle switches (DKIM, SpamAssassin, Greylisting, ClamAV)
- Add security score indicator (0-4)
- Add mail logs viewer tab
- Add mailbox repair action
- Add DKIM record display in DNS setup
- Toast notifications for all actions
- Improved component status display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-23 07:26:24 +01:00
d7c8cc19e9 Add secubox-repo and secubox-hardening modules, CI/CD workflows
New modules (35 total):
- secubox-repo v1.0.0: APT repository management
  - repoctl CLI for package management
  - GPG key generation and signing
  - Multi-distribution support (bookworm, trixie)
  - Web dashboard for repository status

- secubox-hardening v1.0.0: Kernel and system hardening
  - hardeningctl CLI for security management
  - Sysctl hardening (ASLR, kptr_restrict, SYN cookies)
  - Module blacklist (uncommon protocols, filesystems)
  - Security benchmark with 100% score on VM

CI/CD workflows:
- build-packages.yml: Dynamic matrix for all packages
- build-image.yml: 5 board images with compression
- publish-packages.yml: APT repo publishing
- release.yml: Unified release orchestration

APT repository scripts:
- export-secrets.sh: Export GPG/SSH keys for GitHub Actions
- local-publish.sh: Local test server
- install.sh: User installation script

Security (Phase 5):
- AppArmor profiles for all services
- Audit rules for SecuBox services
- build-all.sh for local builds

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-22 22:15:01 +01:00
82bddc5fe8 secubox-mail v1.8.0: Add SpamAssassin spam filtering
- mailserverctl v2.4.0: spam setup/enable/disable/status/update commands
- Install SpamAssassin and spamc in LXC container
- Configure Postfix content filter via spamfilter pipe
- Bayes learning and RBL checks enabled by default
- Score threshold 5.0, rewrite subject with [SPAM] tag
- Add API endpoints: /spam/status, /spam/setup, /spam/enable, /spam/disable
- Add SpamAssassin to components JSON output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-22 11:14:48 +01:00
ac58c837b5 secubox-mail v1.7.0: Add email client autodiscover
- Thunderbird/Evolution: /mail/config-v1.1.xml (Mozilla autoconfig)
- Outlook: /autodiscover/autodiscover.xml (Microsoft format)
- Apple iOS/macOS: /{domain}.mobileconfig (configuration profile)
- Well-known: /.well-known/autoconfig/mail/config-v1.1.xml
- All endpoints public for email client access during setup
- Supports IMAP (993/143), POP3 (995), SMTP (587/465)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-22 11:10:26 +01:00
7986621328 secubox-mail v1.6.0: Full OpenDKIM integration
- mailserverctl v2.3.0: dkim setup/keygen/status/sync/install/configure
- Install OpenDKIM in LXC container with dpkg --force-confold
- Configure Postfix milter integration (inet:localhost:8891)
- Generate 2048-bit RSA keys with DNS records in standard and BIND format
- Add API endpoints: /dkim/status, /dkim/setup, /dkim/keygen, /dkim/sync
- Update startup script to auto-start OpenDKIM
- Tested and verified: OpenDKIM running, Postfix milter configured

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-22 10:52:47 +01:00
ad81bbc95a secubox-mail v1.5.0: Add ACME certificate support
- mailserverctl v2.2.0: acme issue/renew/install commands
- Add ssl status, ssl selfsigned commands
- Enable Dovecot SSL with TLS 1.2+ configuration
- Add API endpoints: /acme/status, /acme/issue, /acme/renew
- Update /ssl endpoint with certificate type detection
- Add certificate expiration tracking
- Update components JSON with SSL/ACME info
- Update access JSON with TLS status per protocol

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-22 10:47:15 +01:00
1868fa2d8c feat(mail): Debian LXC containers for Postfix/Dovecot/Roundcube
Mail Server LXC (mailserverctl v2.1.0):
- Switch from Alpine to Debian bookworm via debootstrap
- Host networking (lxc.net.0.type = none)
- Postfix + Dovecot with virtual mailbox support
- User management via mailctl (add/list/remove)
- DKIM key generation

Roundcube Webmail LXC (roundcubectl v1.4.0):
- Debian bookworm with roundcube package
- SQLite backend, port 8027
- PHP-FPM 8.2 + nginx
- Three-fold commands (components, access)

Also includes:
- Three-fold architecture for 6 modules
- Maintainer update to Gerald KERMA
- Authentication fixes (JWT secret, redirect paths)
- 4 new modules (c3box, gitea, nextcloud, portal)
- WIP.md updated with session progress

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-22 10:40:00 +01:00
d3510bf36a feat: three-fold architecture for streamlit, haproxy, metablogizer
Add real backend control scripts and migration support:

- secubox-streamlit: streamlitctl for LXC container management,
  app deployment, Gitea integration, OpenWrt migration
- secubox-haproxy: haproxyctl with LXC/Docker/native modes,
  vhost/backend/cert management, WAF integration, migration
- secubox-metablogizer: updated UI with three-fold tabs

All modules now follow Components/Status/Access architecture
with tabbed UI and migration modals for importing from OpenWrt.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-22 07:28:33 +01:00
79048ebee3 fix: add shared sidebar.css to all module frontends
All 19 module index.html files now link to /shared/sidebar.css
for consistent navbar styling across the application.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-21 20:39:07 +01:00
7c42a80baf feat: modular nginx config + hub roadmap + new modules
Nginx architecture:
- Modular config: each module installs /etc/nginx/secubox.d/<module>.conf
- Auto-register on install, auto-remove on purge
- Main config includes from secubox.d/*.conf
- 27 module snippets for dynamic component management

Hub enhancements:
- Add roadmap widget showing migration progress (84% complete)
- Add /api/v1/hub/roadmap endpoint with category breakdown
- Shared sidebar.css for consistent styling across modules

New modules:
- secubox-portal: JWT authentication, session management
- secubox-dns: DNS server management
- secubox-mail: Mail server (Postfix) management
- secubox-webmail: Roundcube webmail
- secubox-users: User account management
- secubox-publish: Content publishing
- secubox-waf: Web Application Firewall
- secubox-mail-lxc: Mail LXC container
- secubox-webmail-lxc: Webmail LXC container

Debian packaging:
- All modules updated with modular nginx support
- postinst: creates secubox.d/, reloads nginx
- prerm: removes snippet, reloads nginx
- rules: installs nginx/<module>.conf

Scripts:
- new-package.sh: generates modular nginx files for new modules
- retrofit-nginx-modular.sh: updates existing packages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-21 20:34:01 +01:00