Skip to content

Commit f27f233

Browse files
docs: add v2 feature roadmap
1 parent a0c854f commit f27f233

1 file changed

Lines changed: 270 additions & 0 deletions

File tree

.claude/FEATURE_ROADMAP_V2.md

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
# Sentinel Control Plane — Feature Roadmap v2
2+
3+
> Competitive feature roadmap based on analysis of nevisAdmin4, HAProxy Fusion,
4+
> NGINX One, Traefik Hub, Kong Konnect, and Envoy/Istio control planes.
5+
>
6+
> **Goal:** Make Sentinel CP a "single pane of glass" where everything can be
7+
> configured and deployed through one application (inspired by nevisAdmin4).
8+
9+
---
10+
11+
## Current State (Implemented)
12+
13+
### Core Infrastructure (Phases 1–7 + v1.1 — Complete)
14+
- [x] Services CRUD with route patterns, single upstream, timeouts, retry, cache, rate limiting, health checks, headers
15+
- [x] KDL config generation from structured services
16+
- [x] Bundle lifecycle (compile, sign Ed25519, SBOM CycloneDX, risk scoring)
17+
- [x] Rolling deployments with health gates, pause/resume/rollback
18+
- [x] Scheduled rollouts with calendar view
19+
- [x] Approval workflows for rollouts
20+
- [x] Rollout templates
21+
- [x] Node management (registration, heartbeat, label-based targeting, stale detection)
22+
- [x] Node groups (label-based organization)
23+
- [x] Drift detection with auto-resolve and severity levels
24+
- [x] Multi-tenant (organizations, projects, scoped API keys, RBAC)
25+
- [x] Multi-environment (dev → staging → prod) with bundle promotion
26+
- [x] GitOps (GitHub webhook auto-compile on push)
27+
- [x] Audit logging with export
28+
- [x] Config validation rules (required field, forbidden/allowed pattern, JSON schema)
29+
- [x] Prometheus metrics (PromEx), structured JSON logging, health endpoints
30+
- [x] LiveView UI (dashboard, nodes, bundles, rollouts, drift, environments, approvals, audit, profile)
31+
- [x] Node simulator for testing rollout logic
32+
- [x] OpenAPI 3.1 spec with Scalar API docs
33+
- [x] E2E tests (Wallaby) + CI pipeline
34+
35+
---
36+
37+
## Phase 8 — Full Proxy Configuration (Complete)
38+
39+
> Make Sentinel CP capable of configuring all core proxy features through the UI.
40+
> Every competitor has these — they are table stakes.
41+
42+
### 8.1 TLS / Certificate Management — DONE (ACME/CA stretch goals remain)
43+
- [x] Certificate CRUD (upload PEM/DER certs and private keys) — `certificate.ex` schema + `certificate_crypto.ex` AES-256-GCM encryption
44+
- [x] Certificate-to-service binding (assign certs to virtual hosts / services) — `Service.certificate_id` FK
45+
- [x] Certificate expiry tracking with dashboard warnings — `certificate_expiry_worker.ex` Oban worker, statuses: active/expiring_soon/expired/revoked
46+
- [ ] Auto-renewal integration (Let's Encrypt / ACME) — `acme_config` field exists, no ACME client
47+
- [ ] Internal CA for inter-node mTLS (inspired by nevisAdmin4 auto-PKI)
48+
- [ ] Trust store management (CA bundles for upstream verification)
49+
- [x] KDL generation for TLS blocks — `kdl_generator.ex` `build_tls_certificates` + `build_tls_ref`
50+
51+
### 8.2 Upstream Groups / Load Balancing — DONE
52+
- [x] Upstream group schema (named group of backend servers) — `upstream_group.ex`
53+
- [x] Multiple backends per upstream group (host, port, weight) — `upstream_target.ex`
54+
- [x] Load balancing algorithms (round_robin, least_conn, ip_hash, consistent_hash, weighted, random)
55+
- [x] Passive health checks (mark unhealthy on failure threshold) — `health_check` map field
56+
- [x] Active health checks (periodic probes to backends)
57+
- [x] Service-to-upstream-group binding (replace single `upstream_url`) — `Service.upstream_group_id` FK
58+
- [x] Upstream group CRUD UI + API — `upstream_groups_live/`, `upstream_group_controller.ex`
59+
- [x] KDL generation for upstream blocks — `build_upstream_groups`, `build_upstream_group_block`
60+
61+
### 8.3 IP Access Control — DONE
62+
- [x] Global allow/deny lists (CIDR notation) — `ProjectConfig.global_access_control`
63+
- [x] Per-service allow/deny lists — `Service.access_control`
64+
- [x] Precedence rules (deny overrides allow, or configurable) — `mode: "deny_first"`
65+
- [x] IP list CRUD UI + API — service edit forms + controller
66+
- [x] KDL generation for access control blocks — `build_access_control_block`, `build_global_access_control`
67+
68+
### 8.4 CORS Configuration — DONE
69+
- [x] Per-service CORS policy (allowed origins, methods, headers, credentials, max-age) — `Service.cors`
70+
- [x] Global default CORS policy with per-service overrides — `ProjectConfig.default_cors`
71+
- [x] CORS settings in service edit form — 5 CORS fields in LiveView forms
72+
- [x] KDL generation for CORS blocks — `build_cors_block`
73+
74+
### 8.5 Redirect / Rewrite Rules — DONE
75+
- [x] URL redirect rules (301/302/307/308) with pattern matching — `Service.redirect_url` + `respond_status`
76+
- [x] Path rewrite rules (prefix strip, regex replace) — `Service.path_rewrite`
77+
- [x] Host-based routing / virtual hosts — via route_path matching
78+
- [x] Rule ordering and priority — `Service.position`
79+
- [x] Redirect/rewrite CRUD UI + API — LiveView forms with rewrite fields
80+
- [x] KDL generation for redirect/rewrite blocks — `build_path_rewrite_block`, redirect in `build_route`
81+
82+
### 8.6 Compression — DONE
83+
- [x] Global compression settings (gzip, brotli, zstd) — `ProjectConfig.default_compression`
84+
- [x] Per-service compression overrides — `Service.compression`
85+
- [x] Configurable min size, content-type filters
86+
- [x] KDL generation for compression blocks — `build_compression_block`, `build_global_compression`
87+
88+
---
89+
90+
## Phase 9 — Security & Resilience (Complete)
91+
92+
> Match enterprise expectations for proxy security and reliability features.
93+
94+
### 9.1 Circuit Breakers — DONE (health view status is a stretch goal)
95+
- [x] Per-upstream circuit breaker configuration — `UpstreamGroup.circuit_breaker` map field
96+
- [x] Configurable thresholds (failure_threshold, success_threshold, timeout, half_open_max_requests)
97+
- [x] Half-open state with configurable probe interval
98+
- [ ] Circuit breaker status in node/service health views — no dedicated health view
99+
- [x] KDL generation for circuit breaker blocks — `build_nested_map_block` via upstream group
100+
101+
### 9.2 Proxy-Level Authentication — DONE
102+
- [x] JWT validation (issuer, audience, JWKS URL, claim requirements) — `AuthPolicy` auth_type "jwt"
103+
- [x] API key authentication (header or query param) — auth_type "api_key"
104+
- [x] Basic auth (htpasswd-style user lists) — auth_type "basic"
105+
- [x] Forward auth (delegate to external auth service) — auth_type "forward_auth"
106+
- [x] mTLS client certificate validation — auth_type "mtls"
107+
- [x] Auth policy binding to services (which auth method applies where) — `Service.auth_policy_id` FK
108+
- [x] Auth configuration UI + API — `auth_policies_live/`, `auth_policy_controller.ex`
109+
- [x] KDL generation for auth blocks — `build_auth_block`
110+
111+
### 9.3 WAF / Request Security — DONE (anomaly detection / WAF dashboard are stretch goals)
112+
- [x] Request size limits (max body, max headers, max URI length) — `security.max_body_size`
113+
- [x] Content-type enforcement (whitelist allowed content types)
114+
- [x] Common attack pattern detection (SQLi, XSS, path traversal, RFI) — `security.block_sqli`, `security.block_xss`
115+
- [x] Custom WAF rules (regex-based block/allow) — via middleware system with custom type
116+
- [ ] Request rate anomaly detection
117+
- [ ] WAF event logging and dashboard
118+
- [x] Per-service WAF policy (enable/disable, sensitivity level) — `Service.security` map
119+
- [x] KDL generation for security blocks — `build_security_block`, `build_global_security`
120+
121+
### 9.4 Request / Response Transformation — DONE
122+
- [x] Header manipulation (add, remove, rename, rewrite — request and response) — `Service.headers`, `Service.request_transform`
123+
- [x] URL path rewriting (beyond simple redirects — dynamic path manipulation) — `Service.path_rewrite`
124+
- [x] Query parameter manipulation (add, remove, rename) — via request_transform
125+
- [x] Request/response body transformation (JSON field filtering, renaming) — `Service.request_transform`, `Service.response_transform`
126+
- [x] Conditional transformations (apply based on path, header, method) — via middleware config overrides
127+
- [x] KDL generation for transformation blocks — `build_request_transform_block`, `build_response_transform_block`
128+
129+
---
130+
131+
## Phase 10 — Traffic Intelligence (Complete)
132+
133+
> Advanced traffic management features that differentiate Sentinel CP.
134+
135+
### 10.1 Traffic Splitting / Weighted Routing — DONE
136+
- [x] Weight-based routing between upstream groups (canary at the proxy level) — `Service.traffic_split`
137+
- [x] Header-based routing (route by header value, e.g., `X-Version: v2`) — `match_rules` with type "header"
138+
- [x] Cookie-based routing (sticky sessions, A/B testing) — `match_rules` with type "cookie"
139+
- [x] Gradual traffic shift (time-based progression from 0% → 100%)
140+
- [x] Traffic split visualization in UI
141+
- [x] KDL generation for traffic split blocks — `build_traffic_split_block`
142+
143+
### 10.2 Configuration Templates / Patterns — DONE
144+
- [x] Template schema (named template with typed parameters and defaults) — `service_template.ex`
145+
- [x] Built-in template library (11 templates): REST API, Web App, WebSocket, Static Files, Auth-Protected, Health Endpoint, LLM Inference Gateway, gRPC Gateway, WebSocket Gateway, GraphQL Gateway, SSE Streaming Service
146+
- [x] Custom template creation and management — per-project templates
147+
- [x] "Create service from template" workflow in UI — `services_live/new.ex` template selection
148+
- [x] Template versioning — `version` field
149+
- [x] KDL generation from template instantiation
150+
151+
### 10.3 Enhanced Configuration Diff Viewer — DONE
152+
- [x] Side-by-side diff of generated KDL (current deployed vs. pending) — `bundles_live/diff.ex` unified/side-by-side toggle
153+
- [x] Semantic diff (not just text — highlight added/removed/changed services) — `bundles/diff.ex` manifest_diff
154+
- [x] Fullscreen diff mode — `toggle_fullscreen` event
155+
- [x] Diff as part of deployment/rollout wizard
156+
- [x] Historical diff between any two bundles — accepts `a` and `b` bundle IDs
157+
158+
### 10.4 Request-Level Analytics Dashboard — DONE
159+
- [x] Per-service request rate, latency (p50/p95/p99), error rate — `analytics.ex` `get_service_metrics`
160+
- [x] Top consumers (by IP, API key, or header) — `service_metric.ex` `top_consumers` field
161+
- [x] Status code distribution over time — status_2xx/3xx/4xx/5xx fields
162+
- [x] Bandwidth usage per service — bandwidth_in_bytes, bandwidth_out_bytes
163+
- [x] Real-time request log viewer (tail -f style) — `request_log.ex` + `get_recent_logs`
164+
- [x] Time-range filtering and comparison — `analytics_live/index.ex` time range selector
165+
166+
---
167+
168+
## Phase 11 — Platform Features (Complete)
169+
170+
> Move from proxy management tool to full platform. These features unlock new
171+
> use cases and user segments.
172+
173+
### 11.1 OpenAPI Import — DONE
174+
- [x] Upload OpenAPI 3.x spec (YAML or JSON) — `openapi_import_controller.ex`
175+
- [x] Auto-generate services + routes from spec paths and operations — `openapi_parser.ex` `extract_services`
176+
- [x] Map OpenAPI security schemes to proxy auth policies — `extract_auth_policies`
177+
- [x] Detect changes on re-import (add new routes, flag removed routes) — `openapi_spec.ex` checksum tracking
178+
- [x] Link spec to service for documentation — `Service.openapi_spec_id` FK + `Service.openapi_path`
179+
- [x] Preview generated services before applying — dedicated preview endpoint
180+
181+
### 11.2 Service Discovery Integration — DONE (DNS/SRV; Consul/K8s are stretch goals)
182+
- [ ] Consul service discovery (watch for backend changes, auto-update upstream groups)
183+
- [ ] Kubernetes service discovery (watch Services/Endpoints)
184+
- [x] DNS-based discovery (SRV records) — `discovery_source.ex`, `dns_resolver.ex`, `dns_resolver/inet.ex`
185+
- [x] Manual refresh + auto-sync toggle — `discovery_sync_worker.ex` background worker
186+
- [x] Discovery source status in UI — `last_synced_at`, `last_sync_status`, `last_sync_error`, `last_sync_targets_count`
187+
188+
### 11.3 Middleware / Plugin System — DONE
189+
- [x] Middleware chain model (ordered list of middleware per service) — `middleware.ex`, `service_middleware.ex`
190+
- [x] Built-in middleware types (11): rate_limit, cache, cors, compression, headers, access_control, security, path_rewrite, request_transform, response_transform, auth, custom
191+
- [x] Custom middleware (user-defined with typed config schema) — `custom` type with `kdl_block_name`
192+
- [x] Middleware library (browse + attach to services) — `middlewares_live/`
193+
- [x] Middleware ordering drag-and-drop in UI — `service_middleware.position`
194+
- [x] KDL generation for middleware chains — `build_middleware_chain`, `build_middleware_block`
195+
196+
### 11.4 Visual Service Topology — DONE
197+
- [x] Graph view showing: client → proxy → services → upstream groups → backends — `topology_live/index.ex`
198+
- [x] Live status overlay (healthy/unhealthy/degraded on each node) — `get_topology_data`, 10s auto-refresh
199+
- [x] Click-through from graph to service/upstream detail — `navigate` event handler
200+
- [x] Filter by environment, node group, or label
201+
- [x] Real-time updates via LiveView
202+
203+
### 11.5 Developer Portal — DONE
204+
- [x] Public-facing portal for API consumers — `portal.ex` context, `portal_live/`
205+
- [x] Auto-generated API documentation from OpenAPI specs — `portal_live/docs.ex`
206+
- [x] Interactive API testing console (try-it-out) — `portal_live/console.ex` with `execute_request`
207+
- [x] API key self-service (request, view, rotate keys) — `portal_live/keys.ex`
208+
- [x] Customizable portal branding — `portal_title`, `portal_custom_css`, `portal_logo_url`
209+
- [x] Usage analytics per API consumer
210+
211+
### 11.6 Secrets Management — DONE (Vault integration is a stretch goal)
212+
- [x] Secrets store (encrypted at rest, scoped to project or environment) — `secrets/secret.ex`, `secret_crypto.ex` AES-GCM
213+
- [x] Secret references in service config (e.g., `${secrets.NAME}`) — `secrets.ex` reference pattern
214+
- [x] Secret injection into KDL at compile time (never stored in bundles in plaintext) — `kdl_generator.ex` `maybe_resolve_secrets`
215+
- [ ] Vault integration (HashiCorp Vault as external secrets backend)
216+
- [x] Secret rotation workflows — `secrets.ex` `rotate_secret`, `last_rotated_at` tracking
217+
- [x] Audit logging for secret access — audit logs on create/update/rotate
218+
219+
---
220+
221+
## Remaining Stretch Goals
222+
223+
Items that are not yet implemented but would add value:
224+
225+
| Feature | Phase | Effort | Impact |
226+
|---------|-------|--------|--------|
227+
| ACME / Let's Encrypt auto-renewal | 8.1 | Medium | High — eliminates manual cert rotation |
228+
| Internal CA for mTLS | 8.1 | Large | Medium — enterprise mTLS use cases |
229+
| Trust store management | 8.1 | Small | Medium — upstream TLS verification |
230+
| Circuit breaker health view status | 9.1 | Small | Low — observability improvement |
231+
| WAF anomaly detection | 9.3 | Large | Medium — advanced threat detection |
232+
| WAF event logging dashboard | 9.3 | Medium | Medium — security visibility |
233+
| Consul service discovery | 11.2 | Medium | Medium — HashiCorp ecosystem |
234+
| Kubernetes service discovery | 11.2 | Medium | High — K8s is dominant deployment target |
235+
| Vault integration for secrets | 11.6 | Medium | Medium — enterprise secrets management |
236+
237+
---
238+
239+
## Competitive Positioning
240+
241+
### Where Sentinel CP Can Win
242+
1. **Unified config-to-deploy pipeline** — nevisAdmin4-style "configure everything and
243+
deploy from one place" but for a general-purpose proxy (not vendor-locked)
244+
2. **Immutable, signed bundles** — unique in the space; most competitors do live config
245+
pushes. Sentinel's compile→sign→distribute model is inherently safer.
246+
3. **Pull-based distribution** — nodes pull verified bundles rather than receiving pushes.
247+
Better security posture than HAProxy Fusion or NGINX One push models.
248+
4. **Configuration templates with best practices** — nevisAdmin4's strongest idea,
249+
applied to a general-purpose proxy instead of a proprietary ecosystem.
250+
5. **LiveView real-time UI** — Phoenix LiveView gives real-time updates without the
251+
complexity of a separate SPA frontend.
252+
253+
### Where Competitors Are Ahead
254+
1. **WAF maturity** — HAProxy and NGINX/F5 have years of WAF signature development
255+
2. **Plugin ecosystem** — Kong's 100+ plugins are hard to replicate
256+
3. **API lifecycle management** — Kong Konnect and Traefik Hub are full API platforms
257+
4. **Service mesh** — Istio/Envoy own this space; Sentinel is not a mesh
258+
5. **AI-assisted config** — NGINX One has AI config assistance (potential future feature)
259+
260+
---
261+
262+
## References
263+
264+
- [nevisAdmin4 Documentation](https://docs.nevis.net/nevisadmin4/)
265+
- [HAProxy Fusion Control Plane](https://www.haproxy.com/products/haproxy-fusion-control-plane)
266+
- [NGINX One Console](https://www.f5.com/products/nginx/one-console)
267+
- [Traefik Hub](https://traefik.io/traefik-hub)
268+
- [Kong Konnect](https://konghq.com/products/kong-konnect)
269+
- [Istio Architecture](https://istio.io/latest/docs/ops/deployment/architecture/)
270+
- [Envoy Gateway](https://gateway.envoyproxy.io/)

0 commit comments

Comments
 (0)