Support outbound network allow lists for services
Los mantenedores suelen responder en 4 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- kubernetes, rust
- Área
- infrastructure, networking, security
Línea de trabajo
Start by reading the deploy path in cli/src/deploy.rs around lines 225–229 and Fiberd's hluk argument in hluk_linux.go around lines 287–292, then inspect the Service Identity inventory issue #38 and the related readiness and inventory issues #28 and #31. Define the policy contract and enforcement boundaries, including omitted versus empty rules and port semantics, before tracing how policy reaches artifact metadata, EdgePolicy, Fiberd and Kubernetes. Done means validated per-service rules are enforced with the required integration and connection-level tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
There is currently no way to declare which external endpoints a service can reach. This is a missing feature, not an intentional restriction.
Use case: running small, bounded tools for coding agents, such as code review or validation, in hardware-isolated fibers. These tools typically need access to one or two external endpoints (a model API or git host, for example), but shouldn't need broader network access. Declaring a small allow list per service would cover this.
This is the primary networking-policy issue, covering features 5 and 10 in the Service Identity inventory (#38): the lampyr.yaml policy contract and the enforcement layers.
Current state
lampyr.yamldoesn't have a network configuration field.- Deploy hardcodes
network.outbound: ["127.0.0.1"]in EdgePolicy (cli/src/deploy.rs:225-229). - Fiberd independently passes the same value to hluk (
hluk_linux.go:287-292). - Nothing appears to read EdgePolicy, and editing it had no effect in testing.
hluk's allow list itself works. Running locally on Kind with KVM, a Node.js template service connecting to a non-loopback IP failed with connect EACCES. After replacing the loopback entry in Fiberd's --net-allow argument with that IP, the same snapshot returned HTTP 200, without changing EdgePolicy or the CapacityGrant spec.
hluk currently accepts IPs and hostnames, but not CIDRs or host:port, and hostnames allow all ports on the resolved IPs. The design doc uses storage.example.com:443, so port-aware rules need more than passing the configuration through. The hostname issue in hyperlight-unikraft#247 (fixed in hyperlight-unikraft#248) also affects the pinned runtime.
Proposed approach
Declare outbound destinations in lampyr.yaml:
network:
outbound:
- host: login.microsoftonline.com
port: 443
- host: management.azure.com
port: 443
- Make
network.outboundoptional, and include it in the artifact metadata so it's tied to the service revision. - Carry it through EdgePolicy and Fiberd's warm state, then pass each entry to hluk via
--net-allow. - Apply Kubernetes network policies on top of the hluk policies for defense in depth.
- Keep the current restriction when the field is omitted, and deny egress when the list is explicitly empty. No allow-all fallback.
- Typed Service references, if needed for policy, should build on the existing direct cluster-local Service calls without forcing an application-specific proxy URL, binding API, or extra-hop architecture.
Runtime propagation and enforcement build on the fiberd-k8s-controller grant Pod model that homes now use. An earlier exploratory prototype provides experiments, not an obligation to retain its Home proxy or annotation design.
Requirements
- One declaration is the source of truth; users must not maintain equivalent Hyperlight and Kubernetes policy files by hand.
- Validate exact destinations, ports, duplicates, malformed input, and bounded rule counts (the previous specification proposed at most 64).
- Explicitly define omitted versus empty policy, defaults, migration and intentional behavior changes; never introduce an allow-all fallback.
- Enforce guest permissions separately from trusted execution-host dependencies: DNS, registry, issuer and Kubernetes control traffic needed by the host must not become guest application authority.
- Honor declared ports; host-only Hyperlight rules alone are not evidence of port enforcement.
- Standard NetworkPolicy protects hosts where supported. Public FQDN enforcement needs a verified hostname-aware backend, such as Azure Cilium/ACNS. Fail explicitly when unavailable; no broad public CIDR/storage wildcard substitute.
- Azure infrastructure enablement remains provider work, while core applies approved workload policy; no cloud-provider Kubernetes credentials.
- Document which providers support which policy semantics.
- Integrate ownership, readiness/drift status, updates, delete, uninstall and rollback with the separate inventory/readiness work.
- Test actual denied connections, DNS changes/search behavior, exact ports, malformed inputs and no management/API/metadata escape, not only generated YAML.
Binding-derived policy
When typed bindings are implemented, their required connectivity should feed the same outbound-policy pipeline.
- A binding is the application-facing resource relationship and may project a URL, credentials, CA material, or other configuration.
- Lampyr should derive the minimum enforceable Hyperlight and Kubernetes network permissions required by that binding.
- Users should not repeat a bound Service or resource under
network.outbound. - Raw
network.outboundentries grant transport reachability only. They must not create bindings, inject application configuration, or imply resource authorization.
For example:
bindings:
PROCESSOR:
service: worker-processor
network:
outbound:
- host: login.microsoftonline.com
port: 443
PROCESSOR supplies the application configuration and derives access to that exact Service. The explicit outbound rule independently permits the Azure login endpoint.
This keeps one policy-enforcement path while preserving the distinction between resource discovery/configuration and raw network permission.
Related work
Sub-issues cover infrastructure support (#29), restricted registry transport (#30), readiness (#28), and owned inventory/cleanup (#31). #28 and #31 are shared with Service Identity (#38), but have their parent here.
Define the policy contract and enforcement boundaries here first. Azure capability enablement and registry transport can proceed alongside that work; integrate inventory, cleanup, and readiness before end-to-end acceptance. Identity and networking remain independent permissions. Cluster-local visibility and direct cluster-local Service calls are already supported and are not part of this work.
Open questions
- Who approves egress? The signed grant and immutable template seem to be the current security boundary, and deploy marks EdgePolicy as admitted directly. Is that intentional, or should EdgePolicy have a separate admission step?
- Should the first version support IPs only, given hluk's current destination support?
- Lenguaje dominante
- Rust
- Estrellas
- 3
- Forks
- 2
- Merge medio
- 3 d 57 min
- PR fusionados (30 d)
- 17
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hyperlight-dev/lampyr
-
a-needs-info dependencies
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
hyperlight-dev/lampyr#49 ·
Los mantenedores suelen responder en 4 días
-
a-needs-info
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
hyperlight-dev/lampyr#34 ·
Los mantenedores suelen responder en 4 días
-
Provision production AKS ingress DNS and TLSPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
hyperlight-dev/lampyr#76 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
hyperlight-dev/lampyr#75 ·
Los mantenedores suelen responder en 4 días
-
a-needs-info enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
hyperlight-dev/lampyr#55 ·
Los mantenedores suelen responder en 4 días
Todos los issues de hyperlight-dev/lampyr
Issues similares
-
bug P2: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
-
tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
vfarcic/dot-agent-deck#2512 ·
Los mantenedores suelen responder en 1 día