feat(api, web): implement policy mode management for agents and rules
- Added support for policy modes ('blacklist' and 'whitelist') in agent and policy set management.
- Updated API endpoints to handle policy mode during agent assignment and rule operations.
- Enhanced the web UI to display and manage policy modes for agents and rules, ensuring all assigned sets share a consistent mode.
- Introduced new validation to enforce single policy mode across assigned sets for agents.
- Improved error handling for policy mode conflicts and updated documentation accordingly.
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
+4
-4
@@ -56,12 +56,12 @@ Install RSC:
|
||||
2. Создаёт filter-правила `evofw-*` и address-list `EVOFW_DENY` / `EVOFW_ALLOW`.
|
||||
3. Scheduler `evofw-sync` каждую минуту: `GET /v1/agent/policy.rsc` → `/import` (списки + режим).
|
||||
|
||||
**Blacklist:** `drop` по `EVOFW_DENY` в `input` и `forward`.
|
||||
**Whitelist:** `accept` по `EVOFW_ALLOW` + catch-all `drop` только в `forward` (input не закрывается — Winbox/SSH).
|
||||
**Режим фильтра** задаётся на **наборе правил** (`/rules`), не на агенте:
|
||||
|
||||
Legacy: скачайте `/v1/agent/mikrotik-install.rsc`, задайте globals `EvofwCpUrl`, `EvofwSeed`, `EvofwName`, опционально `EvofwInstallLinkId`, затем `/import`.
|
||||
- **blacklist** — по умолчанию ACCEPT; deny-CIDR блокируются
|
||||
- **whitelist** — по умолчанию DROP (forward); только allow-CIDR
|
||||
|
||||
Одобрите агента в UI — после Approve sync начнёт применять политику.
|
||||
Все наборы, назначенные агенту, должны иметь один режим.
|
||||
|
||||
## Force sync
|
||||
|
||||
|
||||
Reference in New Issue
Block a user