Commit Graph

11 Commits

Author SHA1 Message Date
benvin de8ce4b4ec Merge pull request 'Complete CRUD: GET-single and DELETE endpoints' (#3) from benvin/complete-crud into main
Reviewed-on: #3
2026-07-20 07:39:22 +10:00
benvin 82c7d9c5f7 Complete CRUD: add GET-single and DELETE endpoints
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
Add GET /{name} and DELETE /{name} for zones, address-groups, portgroups,
fabrics, devices, and bindings, plus GET /rules/{id}, with the matching store
Get/Delete methods (deletes bump the generation and 404 on no-match). This gives
the resources full read/update/delete lifecycle so the Terraform provider can
manage them.
2026-07-19 22:18:07 +10:00
benvin 3afaab7d6c Merge pull request 'Add central ASN address-group expander' (#2) from benvin/asn-expander into main
Reviewed-on: #2
2026-07-19 22:10:32 +10:00
benvin d52c3ee76e Add central ASN address-group expander
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
Expand asn address groups to concrete prefixes centrally (one iplocate key,
consistent fleet-wide) and refresh them on a per-group TTL (default 24h). A
background Refresher scans for due groups, unions each group's ASNs to a deduped
prefix set, and writes them to a new resolved/resolved_at column (migration
0002). Fail-safe: a lookup error or empty expansion keeps the last-good set,
never emptying it. The compiler folds resolved prefixes into the rendered set
members; membership churn bumps the generation but never rewrites rules. The
iplocate client is endpoint-configurable and response-tolerant, documented as
needing endpoint/key confirmation. Unit tests cover TTL parsing, due-checks, and
union/dedup/error propagation with a fake expander.
2026-07-19 21:44:30 +10:00
benvin 91f84434e1 Merge pull request 'Scaffold the tomswallapi control plane' (#1) from benvin/scaffold-control-plane into main
Reviewed-on: #1
2026-07-19 21:39:28 +10:00
unkinben 3fb55d5899 Merge Gitea repo initialization
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
2026-07-19 21:19:37 +10:00
gitadmin eb593fc819 Initial commit 2026-07-19 21:15:35 +10:00
benvin f80cc2cc30 Add per-device config compiler and agent config endpoint
Project the fleet-global model through a device's bindings into a rendered,
interface-agnostic config: rules compile to saddr/daddr forward matches with no
iif/oif so they are correct under FRR/ECMP. Firewalls always enforce; routers
enforce only when their fabric opts into defense-in-depth. Referenced address
groups are emitted as named sets carrying their source (static CIDRs, dns FQDNs,
or asn numbers) so membership churns out-of-band without a rule reload. Wire
GET /devices/{name}/config to compile and serve YAML, generation-stamped. Add
portgroups/policies/settings store methods and portgroup CRUD. Pure Render is
unit-tested for enforcement gating, ASN set emission, and resolver precedence.
2026-07-19 18:38:52 +10:00
benvin c32fe8bd76 Add Postgres storage layer and CRUD handlers
Add the store package (pgx-backed repository) with CRUD for the core resources
the compiler needs: fabrics, zones, address groups, portgroups, devices,
bindings, rules, policies. Every mutation bumps a global config generation.
Wire real JSON CRUD handlers with token auth, source/dest grammar validation on
rule create, and the agent status-report endpoint. Migration 0001 verified
against Postgres 17.
2026-07-19 18:28:12 +10:00
benvin aa5626e998 Add source/dest grammar tests 2026-07-19 13:31:47 +10:00
benvin 6de48552fb Scaffold tomswallapi control-plane service 2026-07-19 13:31:14 +10:00