feat(gateway): make the gateway private, fronted by an ingress (ADR-0045)#246
Open
pedromvgomes wants to merge 1 commit into
Open
feat(gateway): make the gateway private, fronted by an ingress (ADR-0045)#246pedromvgomes wants to merge 1 commit into
pedromvgomes wants to merge 1 commit into
Conversation
|
…045) A gateway is no longer its own public edge. It now requires an `ingress:` FK (same scope, singleton) that fronts it: the ingress terminates TLS, enforces the edge security tier (CrowdSec/rate-limit), and reverse-proxies the gateway FQDN to a private gateway over the network, preserving the client IP. Rendered as two servers: a TERMINATION server on the ingress host (ACME + rate limit -> reverse-proxy to the gateway) and a plain-HTTP ROUTING server on the gateway host (nginx.GatewayHTTPPort; set_real_ip_from the ingress + real_ip_header X-Forwarded-For to recover the client, then the derived routes -> mesh egress). Co-located = loopback; split = private IPs resolved in the provider apply. Derivation changes: crowdsecEdgeHosts is ingress-hosts-only (a gateway is never a public edge); the gateway FQDN A record + firewall 443/80 live on the ingress host; the split gateway host opens only GatewayHTTPPort privately; listed-service health relocates to the ingress host. nginx.Render gained a gatewayRoutes slice; IngressProvider.Realize gained gatewayRoutes + gatewayIPs. No wardnet-cloud change: the routing server's real_ip recovery preserves the leftmost-XFF-from-loopback contract client_ip() expects. Breaking change (required ingress: FK) -> targets inforge v6.2.0. ADR-0045; AGENTS.md + website docs updated. go build/test -race/lint clean.
pedromvgomes
force-pushed
the
feature/gateway-behind-ingress
branch
from
July 23, 2026 20:26
7573ef5 to
fd2def2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A north-south
gatewayis no longer its own public edge. It now requires aningress:FK (same scope, singleton) that fronts it: the ingress terminates TLS, enforces the edge security tier (CrowdSec + rate limit), and reverse-proxies the gateway FQDN to a private gateway over the network, preserving the client IP. See ADR-0045.Breaking change (the required
ingress:field) → targets inforge v6.2.0.What changed
ingress:FK —GatewaySpec,schemas/gateway.json, loader, andcheckGateway(required + gateway-host/ingress-host same-network).set_real_ip_fromthe ingress +real_ip_header X-Forwarded-Forto recover the client, then the derived routes → mesh egress).nginx.Rendergained agatewayRoutesslice;IngressProvider.RealizegainedgatewayRoutes+gatewayIPs. Co-located = loopback; split = private IPs resolved in the apply (the routing server binds the gateway host's own private IP, never0.0.0.0).crowdsecEdgeHostsis ingress-only (a gateway is never a public edge); gateway DNS + firewall443/80move to the ingress host; the split gateway host opens onlyGatewayHTTPPort(8442) privately; listed-service health relocates to the ingress host.checkGateway/context-builder reserve8442on the gateway host so a co-located backend cannot collide with the routing nginx.real_iprecovery preserves the leftmost-X-Forwarded-For-from-loopback contractclient_ip()already expects (crates/common/src/proxy_protocol.rs).Docs
ADR-0045,
AGENTS.md, and the website docs (gateway.mdend-to-end incl. both mermaid diagrams,ingress.md,variables-yaml.md) all updated to the private-gateway model.Test plan
go build ./...,go test -race ./...,golangci-lint run ./...— all clean.real_iprecovery,checkGateway(required FK + same-network), the8442collision guard, and the ingress-only CrowdSec/DNS/firewall/health derivations.GatewayHTTPPortguard, private-IP bind, and doc/message cleanups).Rollout note
Consumers add the
ingress:FK to each gateway in lockstep with picking up v6.2.0. Phase 1 lands the model with gateways co-located with their ingresses (unchanged topology); the actual host-split is later a one-linehost:change.Merge Commit Message
feat(gateway): make the gateway private, fronted by an ingress (ADR-0045) [breaking: required ingress: FK, v6.2.0]