|
1 | 1 | // SPDX-License-Identifier: PMPL-1.0-or-later |
2 | 2 | = HTTP Capability Gateway Roadmap |
3 | 3 |
|
4 | | -== Current Status |
| 4 | +== Current Status (2026-04-16) |
5 | 5 |
|
6 | | -The repository contains a real Elixir application, tests, and supporting docs, but the verification story still lags the implementation breadth. |
| 6 | +Version 0.1.0-dev. CRG grade C (achieved 2026-04-04). |
7 | 7 |
|
8 | | -* The best near-term role for this project is a narrow API governance layer, not a universal front-door gateway. |
9 | | -* `TEST-NEEDS.md` and `PROOF-NEEDS.md` define the real confidence gap more accurately than the old template roadmap did. |
10 | | -* The main missing work is security depth, E2E proof, and scope discipline. |
| 8 | +The repository contains 19 Elixir modules, 2 Zig FFI parsers, 2 Idris2 ABI |
| 9 | +modules, and a growing test suite. The implementation covers the core gateway |
| 10 | +pipeline but verification is catching up. See `STATE.adoc` for the full picture. |
| 11 | + |
| 12 | +== MVP Scope Definition (v0.1.0) |
| 13 | + |
| 14 | +The MVP is a *narrow HTTP verb governance prefilter*. It is NOT a general-purpose |
| 15 | +API gateway, load balancer, or TLS terminator. The scope is intentionally |
| 16 | +constrained so that every claim can be backed by an executed test. |
| 17 | + |
| 18 | +=== What the MVP Does |
| 19 | + |
| 20 | +1. *Policy loading*: Read a YAML policy file (DSL v1) at startup and on reload. |
| 21 | +2. *Policy validation*: Reject malformed policies before compilation. |
| 22 | +3. *Policy compilation*: Compile validated policy into dual ETS tables (exact O(1) + regex O(r) + global O(1)). |
| 23 | +4. *Trust extraction*: Read trust level from `X-Trust-Level` header (stripped for non-trusted proxies). |
| 24 | +5. *Verb governance*: For each request, lookup the policy rule for (path, verb) and evaluate `rank(trust) >= rank(exposure)`. |
| 25 | +6. *Allow/deny*: Forward allowed requests to a single configured backend via HTTP. Deny with 403 or stealth response. |
| 26 | +7. *Stealth mode*: Return configurable status codes (e.g. 404) instead of 403 to hide endpoint existence. |
| 27 | +8. *Rate limiting*: Per-client token bucket with trust-level-based quotas. |
| 28 | +9. *Health/readiness probes*: `/health`, `/ready` endpoints. |
| 29 | +10. *Structured logging*: JSON-formatted access decisions with telemetry. |
| 30 | +11. *Atomic policy reload*: Swap to new policy tables without downtime. |
| 31 | + |
| 32 | +=== What the MVP Does NOT Do |
| 33 | + |
| 34 | +* No GraphQL or gRPC governance (handlers exist but are stubs; not MVP scope) |
| 35 | +* No multi-backend load balancing |
| 36 | +* No TLS termination |
| 37 | +* No dynamic trust scoring or control plane |
| 38 | +* No plugin system |
| 39 | +* No web UI dashboard |
| 40 | +* No distributed clustering |
| 41 | +* No Kubernetes operator |
| 42 | + |
| 43 | +=== MVP Proof Requirements |
| 44 | + |
| 45 | +Each claim above must have at least one passing test: |
| 46 | + |
| 47 | +[cols="1,2",options="header"] |
| 48 | +|=== |
| 49 | +| Claim | Test File |
| 50 | + |
| 51 | +| Policy loading | `test/policy_loader_test.exs` |
| 52 | +| Policy validation | `test/policy_validator_test.exs` |
| 53 | +| Policy compilation | `test/policy_compiler_test.exs` |
| 54 | +| Trust extraction | `test/security_test.exs` (header handling) |
| 55 | +| Verb governance | `test/gateway_test.exs`, `test/e2e_test.exs` |
| 56 | +| Allow/deny decisions | `test/e2e_test.exs` (full lifecycle) |
| 57 | +| Stealth mode | `test/gateway_test.exs` (stealth describe block) |
| 58 | +| Rate limiting | `test/gateway_test.exs` (via plug pipeline) |
| 59 | +| Health/readiness | `test/e2e_test.exs` (health and readiness) |
| 60 | +| Structured logging | Telemetry events emitted (verified by integration) |
| 61 | +| Atomic policy reload | `test/e2e_test.exs` (hot-reload tests) |
| 62 | +| Request sanitization | `test/security_test.exs` |
| 63 | +| Trust spoofing prevention | `test/security_test.exs` (header stripping) |
| 64 | +| No atom exhaustion | `test/fuzz_test.exs` (arbitrary method strings) |
| 65 | +| No crash on arbitrary input | `test/fuzz_test.exs` (combined fuzzing) |
| 66 | +|=== |
11 | 67 |
|
12 | 68 | == P0 Release Blockers |
13 | 69 |
|
14 | | -* [ ] Reconcile contradictory status docs so the repo has one truthful current-state story. |
15 | | -* [ ] Add real security tests for request sanitization, header handling, SSRF resistance, and capability-token validation. |
16 | | -* [ ] Add end-to-end tests for request lifecycle, policy hot reload, and upstream proxy behavior. |
17 | | -* [ ] Remove or replace `tests/fuzz/placeholder.txt`. |
18 | | -* [ ] Define the supported MVP narrowly enough that it can be proven. |
| 70 | +* [x] Reconcile contradictory status docs so the repo has one truthful current-state story. |
| 71 | +* [x] Add real security tests for request sanitization, header handling, SSRF resistance, and capability-token validation. |
| 72 | +* [x] Add end-to-end tests for request lifecycle, policy hot reload, and upstream proxy behavior. |
| 73 | +* [x] Remove `tests/fuzz/placeholder.txt` and add real property-based fuzz tests. |
| 74 | +* [x] Define the supported MVP narrowly enough that it can be proven. |
19 | 75 |
|
20 | 76 | == P1 Gateway Hardening |
21 | 77 |
|
|
0 commit comments