How is hAPI reachable on the network? #45
Notifications
Due Date
No due date set.
Blocks
Depends on
Reference: bobby/hapi#45
Reference in new issue
Block a user
Part of #44
Question
Which parts of hAPI are reachable from where? Persons must reach hAPI from anywhere without a VPN; Bots (including Home Assistant) will mostly come from the Owner's home LAN. The Owner's lean is hybrid: a narrow public surface for Persons, everything Bot-facing reachable only over a private link from home. Decide the public surface, the private path, and what is never exposed (admin, DB, broker, cluster API). Consider whether the public surface should sit behind an identity-aware proxy vs. the API's own auth.
Resolution
One public surface, gated only by hAPI's own auth; no tunnel to home. Recorded as ADR-0002.
Key constraint: the home network sits behind ISP CGNAT with a changing IP. The cluster can't open connections into the home, and the home IP can't be allowlisted (a CGNAT address is shared with other customers).
:443, for Persons and Bots alike. No identity-aware proxy or CDN (no Cloudflare): no third party in the public request path.curlwith a token. In exchange, Bot credentials must be per-Bot, scoped, individually revocable, and stored hashed; a long-lived JWT that can't be revoked is not acceptable.:80is closed, so certificates use ACME DNS-01. A public broker is allowed under the same rule.Rejected alternatives: a tunnel for every Bot (Tailscale operator or WireGuard), client-cert-gated Bot endpoints, and an IAP/CDN. Reasons are in the ADR.
Supporting facts gathered during grilling: Gateway API client-cert validation (GEP-91) is set per port, not per hostname, and is in Cilium only in v1.21.0-pre. HA can present a client cert only over MQTT (
rest/rest_commandcan't). Talos has no SSH (talosctluses mTLS on 50000) and has an official Tailscale extension. Tailscale connects directly behind CGNAT once the public peer opens UDP 41641.