Docs restructure, code review, gatherer reliability, JWT key fail-closed
Documentation - Three levels: DOCS/General (overview, configuration), DOCS/Deployment (choose a method, first steps), details per method in Containers/ and System_Services/; new root README and DOCS/README map. - Remove superseded pages (Deployment.md, Deployment_Docker/Native.md, Index.md); split the two scenario guides by section. - Isolate the Timeweb/Hysteria2 records in DEPLOYMENTS/timeweb-hysteria2/ (not linked from DOCS, listed in .graphifyignore). - Add DOCS/code_review/ with a time-stamped analysis of the code base. Gatherer (BUG-02, BUG-03) - Session key (CN, address, connected_since_ts), baseline from the active_sessions snapshot, grace period for sessions missing from the status. - Status file integrity (TITLE/TIME/END) and freshness; a torn read skips the tick. - Cache applied after commit; main loop survives exceptions, backs off, and stops cleanly on SIGTERM/SIGINT; new client rows start with the first frame's totals; five tests. JWT signing key (SEC-01) - No built-in default: Core and Profiler refuse to start with a missing, placeholder or short (< 32) key; shipped config.ini has an empty value. - Same rule in install.sh, update.sh (issues a new key when missing or weak), docker lib/entrypoint; five tests, conftest.py for the test key. Each change has a plan and a summary under DOCS/Changes/. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f95a0b63e6
commit
ad6995bb63
85 files changed
+2805
-1280
No files matched your search
@@ -25,7 +25,7 @@
|
||||
# Run as root from a checkout of the repository. Refuses when an installation exists (use update.sh).
|
||||
# After a failure it is safe to run again: every step is idempotent and nothing is generated twice.
|
||||
# It does NOT touch the firewall: NAT/forwarding commands are printed and documented.
|
||||
# See DOCS/Deployment/Scenario2_System_Services.md
|
||||
# See DOCS/Deployment/System_Services/README.md
|
||||
set -eu
|
||||
|
||||
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
|
||||
@@ -174,6 +174,12 @@ if [ ! -f "$INCOMPLETE_MARK" ]; then
|
||||
fi
|
||||
done
|
||||
fi
|
||||
# A kept env file (resumed install) must hold a usable JWT key: the APIs refuse to start with a weak one
|
||||
if [ -f "$ENV_FILE" ]; then
|
||||
if ! _reason=$(secret_problem "$(env_get OVPMON_API_SECRET_KEY)"); then
|
||||
die "OVPMON_API_SECRET_KEY in $ENV_FILE is $_reason: the APIs refuse to start with a weak signing key. Set a random value of at least 32 characters (openssl rand -hex 32) and run install.sh again"
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -f "$SRC/APP_CORE/openvpn_api_v3.py" ] && [ -f "$SRC/APP_PROFILER/main.py" ] \
|
||||
|| die "run the script from a complete checkout of the repository (APP_CORE and APP_PROFILER not found in $SRC)"
|
||||
|
||||
Reference in new issue
Block a user