ccnet-wi-fw: provision an OPNsense API key so opnsense-mcp can manage the WI site firewall too #41
Labels
No labels
blocked
borg-backup
ceph
forgejo
in-progress
infra
netdata
nextcloud
p:high
p:low
p:medium
searxng
service-onboard
swarm-nodes
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
copper/ccnet-prod-devops#41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
opnsense-mcpcurrently only coversblaze(the main site's OPNsense) — seedocs/homelab-architecture.md's MCP reference.ccnet-wi-fw(the WI site's OPNsense firewall, seedocs/ccnet-wi-site.md) has no API key and no MCP/API tooling coverage at all, so any change there today means either the web UI or hand-rolled SSH + raw PHP scripting directly against the OPNsense Model layer.Hit the real cost of that during issue #24 (Phase 3, 2026-07-24): adding a single firewall pass rule to
ccnet-wi-fwrequired writing a standalone PHP script against\OPNsense\Firewall\Filter(no REST API key existed to use the documentedFilterControllerHTTP endpoint instead). First attempt used the legacywrite_config()call, which silently no-ops on Model-layer changes — no error, a plausible-looking "OK" fromfilter reload, but the actual rule never reached disk. Only caught via an explicit before/afterdiffof/conf/config.xmlagainst a manual backup, not because anything failed loudly. See the fix in~/.claude/plans/quiet-mirroring-compass.md's Phase 3 (real finding #5) — the correct call isConfig::getInstance()->save().Scope: create a scoped API user on
ccnet-wi-fw(notadmin— same pattern asservice_onboard.py's OPNsense API user for the main site) and register it as a secondopnsense-mcptarget/instance, so future changes to this firewall go through the same tested, reviewed API path the main site already has instead of ad-hoc console scripting against a box that's already proven capable of silent, hard-to-detect failures in this exact scripting style.Related:
ccnet-borg-backup's WI offsite-copy work (issue #24),docs/ccnet-wi-site.md,docs/homelab-architecture.md's MCP section.