feat: bind and guard the HTTP gateway #14
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
zoo/eve!14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/gateway-guard"
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?
What this adds
The HTTP facade can be bound to one interface and guarded by the deployment,
which is what a service that exposes it needs and what the facade deliberately
does not decide by itself.
HttpGatewayUnit::with_bind(address)— binds one interface instead ofevery interface. The default is unchanged (
0.0.0.0), so an existingdeployment behaves the same.
HttpGatewayUnit::with_guard(guard)— a predicate over the messageheaders and the target. A request it rejects is answered
401beforethe body is decoded and before the broker is reached; a WebSocket is refused
before the upgrade. Without a guard nothing changes.
adr/op.md— the HTTP facade section states why the bind and the guard aredeployment settings: a token, a signature or an operation allowlist is a
deployment decision, so the facade stays one implementation.
Why
The facade forwards every path to every operation, including the mutations, on
every interface. A deployment that uses it as an observability surface (statuses,
records, the report) must be able to say "loopback only", "bearer only" and
"read-only", without a second gateway implementation and without forking the
adapter.
Tests
eve_e2e/tests/gateway/local.rs— the facade over the in-process broker, sothe test needs no service:
401, with it is200;cargo test -p eve_e2e --test gateway local::— 3 tests pass. The networkgateway tests are unchanged and need the standard backends.