secubox-deb/docs/superpowers/plans
CyberMind 122cd6cebc
WebUI Obfuscation - admin.HOSTNAME.secubox.in Only (#96)
* docs(spec+plan): WebUI obfuscation design and implementation plan (ref #44)

Spec: docs/superpowers/specs/2026-05-12-webui-obfuscation-design.md
Plan: docs/superpowers/plans/2026-05-12-webui-obfuscation.md

The design locks the SecuBox WebUI to admin.<HOSTNAME>.<DOMAIN_SUFFIX>
via strict-regex ACLs in HAProxy AND nginx, both driven by
/etc/default/secubox as the single source of truth. New package
secubox-defaults ships the env file; secubox-haproxy API exposes
/webui/admin-domain (info), /webui/nginx-config (JWT, rendered vhost),
/webui/refresh (JWT, cache invalidate). A safe renderer script writes
the nginx vhost atomically; haproxyctl + Python /generate both inject
the strict ACL at the top of http-in and https-in frontends.

Plan has 15 tasks with TDD steps, exact file paths, and complete code
in every step (no TBD/TODO). Acceptance criteria + integration test
script included.

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

* feat(secubox-defaults): scaffold package skeleton (ref #44)

* feat(secubox-defaults): ship /etc/default/secubox env file (ref #44)

* feat(secubox-defaults): postinst autodetect + dpkg-trigger (ref #44)

* feat(secubox-haproxy): webui_identity helper + tests (ref #44)

Implement webui_identity module that parses /etc/default/secubox
and exposes canonical admin URL + regex pattern for HAProxy acl.

New module:
- api/webui_identity.py: Parses SECUBOX_HOSTNAME and SECUBOX_DOMAIN_SUFFIX
  with LRU cache and invalidation support.

Tests (TDD):
- tests/test_webui_identity.py: 5 test cases covering basic parsing,
  missing hostname validation, custom suffix handling, comment handling,
  and cache invalidation.
- tests/conftest.py: sys.path bootstrap for api/ imports.

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

* fix(webui_identity): catch OSError on defaults read + test (ref #44)

* feat(secubox-haproxy): GET /webui/admin-domain endpoint (ref #44)

* feat(secubox-haproxy): GET /webui/nginx-config rendered vhost (ref #44)

* feat(secubox-haproxy): POST /webui/refresh cache invalidation (ref #44)

* feat(secubox-haproxy): secubox-render-nginx-webui safe renderer (ref #44)

* feat(haproxyctl): inject strict-regex WebUI ACL at frontend top (ref #44)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(secubox-haproxy): /generate symmetry with strict WebUI ACL (ref #44)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(secubox-haproxy): dpkg-trigger refresh on secubox-defaults-changed (ref #44)

* build(secubox-haproxy): depend on secubox-defaults (ref #44)

* test(infra): integration test for WebUI obfuscation (ref #44)

* docs: HISTORY Session 159 — WebUI obfuscation (ref #44)

Records the complete WebUI obfuscation work: new secubox-defaults
package, three /webui/* endpoints, nginx renderer script, haproxyctl
+ Python generator symmetry, dpkg trigger plumbing, integration test.
Includes notes on the brainstorming → spec → plan → subagent-driven
execution flow and the 6 fix iterations caught by reviewers.

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-12 14:07:11 +02:00
..
2026-04-21-eye-remote-v2-implementation.md docs: Add Eye Remote v2.0.0 implementation plan 2026-04-21 08:41:31 +02:00
2026-04-23-eye-remote-bootstrap.md docs(eye-remote): add bootstrap v2.1.0 implementation plan 2026-04-23 10:30:05 +02:00
2026-04-24-eye-remote-touchscreen-controller.md docs: Add Eye Remote touchscreen controller implementation plan 2026-04-24 10:06:35 +02:00
2026-04-26-eye-remote-swiss-army.md docs: Add Eye Remote Swiss Army implementation plan 2026-04-26 17:07:08 +02:00
2026-05-02-haproxy-webui-crud.md docs(plan): HAProxy WebUI CRUD implementation plan 2026-05-02 17:51:09 +02:00
2026-05-03-mitmproxy-waf-migration.md docs(plan): Add mitmproxy WAF migration implementation plan 2026-05-03 07:48:38 +02:00
2026-05-05-openwrt-to-debian-migration.md docs(migration): Add implementation plan for OpenWrt to Debian migration 2026-05-05 12:35:41 +02:00
2026-05-10-meta-script-generator.md feat(secubox): add manifest generator 2026-05-10 21:08:32 +02:00
2026-05-11-secubox-apt-clone.md docs(apt): Tick plan checkboxes per code audit (ref #89) 2026-05-12 12:23:02 +02:00
2026-05-12-apt-public-repo-staging.md docs(apt): Add implementation plan for public repo staging (ref #80) 2026-05-12 09:05:45 +02:00
2026-05-12-license-headers.md docs(plan): CMSD-1.0 license headers Phase A implementation plan 2026-05-12 09:16:08 +02:00
2026-05-12-multi-agent-worktree-workflow.md docs(plan): multi-agent worktree workflow implementation plan (ref #83) 2026-05-12 09:41:00 +02:00
2026-05-12-opad-doctrine-documents.md docs(opad): add implementation plan for doctrine documents 2026-05-12 08:54:53 +02:00
2026-05-12-ssl-health-banner.md docs(plan): SSL certificate health in Health Banner implementation 2026-05-12 10:51:43 +02:00
2026-05-12-webui-obfuscation.md WebUI Obfuscation - admin.HOSTNAME.secubox.in Only (#96) 2026-05-12 14:07:11 +02:00