Commit Graph
47 Commits
Author SHA1 Message Date
MrAlders0n 5ccb1a2ce3 fix(api): warn on untrusted proxies and tighten config validation
Warn at startup when limits are on without trusted_proxies, and once when a
request carries forwarding headers Beacon ignores. Reject short or whitespace
admin keys and negative durations. Key default-window stats by hour, return
500 for scope lookup failures, and validate IATA path params.
2026-10-02 16:53:32 -04:00
MrAlders0n 98006a9364 feat(stats): serve historical stats from hourly rollups
Stats endpoints read hourly rollup tables filled once per closed hour by one
advisory-locked task, instead of materialized views that re-scanned every
observation on each refresh. IATA-set tables give exact distinct counts for any
IATA set or region. Cleanup holds raw rows for unrolled hours (up to 24h).

Adds /stats/series; ingest keeps packet observation counts, observer last IATA,
channel message counts and trace tag summaries. 001_baseline.sql is rewritten,
so pre-release 2.0 databases must be recreated. See docs/historical-stats.md.
2026-10-02 07:43:56 -04:00
MrAlders0n f8ee1ac884 feat(meshmapper): import regional channels and scope channel lists by region 2026-09-30 23:09:40 -04:00
MrAlders0n 38b1a206b1 fix(meshmapper): respect MeshMapper's per-endpoint rate limits 2026-09-30 22:56:10 -04:00
MrAlders0n a970484b00 feat(meshmapper): import zone groups as regions 2026-09-30 22:56:10 -04:00
MrAlders0n bfda0d5281 feat(meshmapper): discover scope sources from the zone list 2026-09-30 22:46:00 -04:00
MrAlders0n 7267b8bca3 feat(meshmapper): accept scope sources outside configured regions 2026-09-30 22:27:36 -04:00
MrAlders0n 9a4e17b270 feat(meshmapper): import zones for every known IATA 2026-09-30 22:23:37 -04:00
MrAlders0n 2f49ffb3a3 feat(api): filter scope lists by region and catalogue membership
Region-filtered /scopes and /stats/scopes now list manual scopes configured
for the region and imported scopes whose MeshMapper catalogue includes the
IATA, instead of inferring membership from observed traffic. Filtered
/scopes returns string[] like the unfiltered call.

Manual scopes now require a region in config.
2026-09-30 22:05:04 -04:00
MrAlders0n 3ac4035942 refactor(db): flatten migrations into a 2.0.0 baseline
2.0.0 is a fresh deploy, so the 1.x chain becomes one schema file. Startup now refuses a pre-2.0.0 database instead of applying the baseline on top.
2026-09-30 21:37:28 -04:00
MrAlders0n 0e242574fb feat(meshmapper): import region boundaries from the Zones API
Imported boundaries override borderFile on the border map and for foreign marking, falling back to the manual border when MeshMapper has none.
2026-09-30 12:38:36 -04:00
n30nex 574bba4e13 fix: address maintainer review for #174 2026-09-30 07:19:03 -04:00
n30nex c18e059e0d feat(scopes): import cached regional MeshMapper catalogues 2026-09-30 07:19:03 -04:00
MrAlders0n 90f9b50614 feat(ws): allow subdomain wildcards in allowed origins (#177) 2026-09-27 20:03:49 -04:00
MrAlders0n dec643a2ad feat(ws): opt-in allowed origins and observer key (#170) 2026-09-27 11:41:11 -04:00
MrAlders0n 3dee2098ba perf(db): batch retention deletes and tune autovacuum (#162)
Default packets.retention drops to 7 days.
2026-09-25 11:38:04 -04:00
n30nex a25e2675c8 feat(backup): add protected database and config download (#154) 2026-09-23 20:13:40 -04:00
n30nex 6aba17c75e feat(nodes): indicate repeaters outside configured local borders (#153) 2026-09-19 15:27:34 -04:00
n30nex c7ace0ce0e feat(ws): limit connection attempts and signal capacity shedding (#141) 2026-09-19 13:28:47 -04:00
n30nex dab228e9bb feat(logging): configure levels and structured runtime output (#144)
* feat(logging): configure levels and structured runtime output

* fix(logging): bound request-derived log fields

* fix(logging): retain malformed IATA source attributes safely

* test(logging): capture structured REST rate-limit records
2026-09-19 10:36:26 -04:00
n30nex 595ef4442b feat(api): rate limit REST requests by trusted client IP (#140) 2026-09-19 08:43:24 -04:00
n30nex 93f85cab51 feat(auth): protect the admin subtree with a bearer key (#146) 2026-09-18 06:18:27 -04:00
n30nex 22410cf4a6 fix(api): trust client IP headers only from configured proxies (#133) 2026-09-09 20:42:35 -04:00
n30nex 88bc0dc88a feat(retention): age out unreferenced observers when enabled (#126) 2026-09-09 18:45:08 -04:00
MrAlders0n 7d759d0a0f perf: known_routes retention, digest identity, and a working batched reconfirm (#98)
* fix: cascade channel_messages on packet delete

* rebuild known_routes keyed on (iata, path_key)

* add route retention delete, batch reconfirm, path_key upsert

* compute route path_key in store, add DeleteOldRoutes

* add routes retention config

* wire route retention into cleanup, batch reconfirm

* prune routes in reconfirm task, not cleanup

* expand routes retention docs in example config
2026-08-12 09:30:03 -04:00
Enot (ded) Skelly 99d7eb0bab feat: add node stale/delete config
closes: #93
2026-07-24 13:09:51 -07:00
Enot (ded) Skelly 3f2506fc8b feat: add geojson for iatas
closes #66
2026-07-24 12:59:48 -07:00
Enot (ded) Skelly 8e2798612b feat: add clock drift tracking
closes #71
2026-07-23 13:34:41 -07:00
MrAlders0n 41a3aa4711 feat(config): presence flush interval and packet ttl settings 2026-07-20 08:55:18 -07:00
Enot (ded) Skelly ecde7957f7 feat(config): pull out resolution into package and add tests
also adds a string method for pretty config printing
2026-06-15 14:35:14 -07:00
Enot (ded) Skelly 16b4394b30 chore(tests): add license header to recent test files 2026-06-15 14:13:34 -07:00
Enot (ded) Skelly fb1a474218 tests(config): add tests for config and seeding 2026-06-15 14:07:58 -07:00
Enot (ded) Skelly 4ebe4c869b feat: add route and neighbor reconfirmation task
prunes stale and ambiguous routes and neighbors

keep that data clean
2026-06-12 10:54:06 -07:00
Enot (ded) Skelly 044aecbd3c feat: background task scheduler
move refresh views and delete tasks to scheduler
add new config for refresh and cleanup intervals

new deployments can set these in minutes to see data faster
2026-06-12 10:28:32 -07:00
Enot (ded) Skelly a5bd8ccaf0 feat: add cors support
optionally control cross origin requests by origin and
method
2026-06-09 14:54:00 -07:00
Enot (ded) Skelly b574ec5c30 feat: add redis 2026-06-09 14:12:58 -07:00
Enot (ded) Skelly cda4905815 docs: update SPDX license lines 2026-06-08 16:08:39 -07:00
Enot (ded) Skelly 14cb9e6e2d docs: add APGL3 license 2026-06-08 15:46:01 -07:00
Enot (ded) Skelly c2662598a6 test(config): add normalizedScope and deriveScopeKey 2026-06-08 13:39:11 -07:00
Enot (ded) Skelly 7aecf2b6b9 fix formatting
allegedly
2026-06-05 10:32:00 -07:00
Enot (ded) Skelly a943660778 rename to beacon 2026-06-05 08:10:43 -07:00
Enot (ded) Skelly b72ce41606 add iata ingest filter
generated code, reviewed and tested

this adds an optional lookup table for allowed IATA based on either country,
conintent or both. if the IATA is in either it is allowed.

gives operators the option to consume from global mqtt brokers but filter
to their area of interest
2026-06-04 15:24:34 -07:00
Enot (ded) Skelly fcc7bb1b23 add transport scopes
new config for transport scope keys seeded to db

new transport keystore to lookup matching keys and tag
- packets with scope key
- nodes with default scope
- observers with all supported scopes it forwards

allow filtering by region scope key on: packets, nodes, observers
2026-06-04 10:32:03 -07:00
Enot (ded) Skelly b8164b17b9 conn limit fo ws 2026-05-29 10:26:02 -07:00
Enot (ded) Skelly 96ea0326b4 add telemetry and packet retention
adds insert telemetry for observers in ingestion

adds new config for observer telemetry, moves
packet retention into config for consistency with
defaults on load

adds cleanup for both packets and observer telemetry
2026-05-27 12:27:57 -07:00
Enot (ded) Skelly 94786f9632 improve channel storage
changes channel storage to include the full key and a hashtag if isHashtag

this prevents some collision issues and will improve message lookup accuracy as well
as allow message search by hashtag channel, name or single byte hash in future
2026-05-23 09:31:15 -07:00
Enot (ded) Skelly a2b6bd725a add config and region apis
optional config file and db seeding

region api endpoints
2026-05-22 15:49:12 -07:00