@davoodmehraban89 / VELYQOR / commits / ddfef0b
Fork 0

Intelligence, Advanced Charting & Trading Platform

docs(chartnova): verify removal of overprivileged Neon history role

davoodmehraban89 committed Oct 11, 2026 at 23:44 UTC ddfef0bedc1224a193701663cf70a0469d387b9b
1 file changed +4 -1
docs/data/neon-history-direct-handoff-2026-10-11.md
+4 -1
@@ -15,7 +15,7 @@
15
16 ## Security handoff
17 - A least-privilege PostgreSQL role `chartnova_history_ro` was created by SQL with `NOLOGIN`, `NOINHERIT`, `NOCREATEDB`, and `NOCREATEROLE`. Permission checks prove it can SELECT only `public.chartnova_history_public`, not `market_ticks`, `candles`, or `instruments`, and cannot INSERT into `market_ticks`.
18 -- The Neon role-creation API also created `chartnova_history_reader`, but unexpectedly granted membership in `neon_superuser` and role/database creation privileges. Attempts to harden it using the project-owner connection were denied. **Never bind this role to Cloudflare; it needs authorized administrative deletion/revocation.**
18 +- The Neon role-creation API also created `chartnova_history_reader`, but unexpectedly granted membership in `neon_superuser` and role/database creation privileges. Attempts to harden it using the project-owner connection were denied. **This role was subsequently deleted after explicit user approval, verified absent from pg_roles; see docs/security/neon-history-reader-predelete-2026-10-11.md.**
19 - Secret transfer to Cloudflare was blocked by the execution environment's safety controls. The least-privilege role remains `NOLOGIN`, and `CHARTNOVA_HISTORY_DATABASE_URL` is **not configured**. Do not imply a deployed Neon direct connection.
20 - **Manual secure activation later:** use the Neon Console / SQL editor under an administrator authorized to manage the role: set a strong private password and LOGIN on `chartnova_history_ro`; set a Cloudflare Worker secret named `CHARTNOVA_HISTORY_DATABASE_URL` to a PostgreSQL URL for that role using Cloudflare's secure secret manager, not source code, chat, or ordinary worker variables. Then deploy the reviewed Worker branch and run real HTTP tests, including revoking SELECT to demonstrate fail-closed behavior.
21 - No licensed one-year OHLC feed for domestic free-market USD, Iranian 18K gold or coins has been connected. Never fill `candles` from ECB reference points, point-in-time KV snapshots, or unlicensed TGJU archives.
@@ -29,3 +29,6 @@
29 ## Rollback
30 - Keep existing KV keys `history:ecb:<SYMBOL>:1y`; removing the optional database secret forces KV-only reads.
31 - Preserve existing published Cloudflare Worker version and version ID for rollback. Do not delete the existing KV namespace or provider secrets.
32 +
33 +### Security cleanup completed
34 +After explicit approval, the overprivileged `chartnova_history_reader` was deleted. A separate PostgreSQL verification returned zero matching role records, retained `chartnova_history_ro` with restricted permissions, and retained all 762 ECB observations. Safe secret handoff and live Neon-backed Worker deployment remain pending.