feat: add active firewall rules display to workload insights with managed rule detection and enable status

Add active_firewall_rules_for_workload helper to fetch live firewall rules from provider with NexaFabric policy comment detection and enable status, implement list_firewall_rules method in ProxmoxProvider to retrieve rules via firewall API endpoint, extend WorkloadInsight schema with active_firewall_rules field, add ActiveRulesList component showing rule type/action/protocol/port with enable status and
This commit is contained in:
2026-07-09 19:42:51 +02:00
parent 1b81847fc6
commit b12ac38c6c
5 changed files with 89 additions and 2 deletions
@@ -127,6 +127,13 @@ class ProxmoxProvider(Provider):
"warnings": ["Preview only. No Proxmox firewall changes were sent."],
}
async def list_firewall_rules(self, connection: ProviderConnection, target: dict[str, Any]) -> list[dict[str, Any]]:
headers = {"Authorization": self.auth_header(connection.token)}
async with httpx.AsyncClient(verify=connection.verify_tls, timeout=10) as client:
response = await client.get(self.firewall_rules_url(connection, target), headers=headers)
response.raise_for_status()
return response.json().get("data", [])
def firewall_rules_url(self, connection: ProviderConnection, target: dict[str, Any]) -> str:
kind = "lxc" if target.get("kind") == "lxc" else "qemu"
node = target["node"]