Support outbound network allow lists for services
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- kubernetes, rust
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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?
- 主要言語
- Rust
- スター
- 3
- フォーク
- 2
- 平均マージ
- 3日 57分
- マージ済み PR(30日)
- 17
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hyperlight-dev/lampyr のほかの issue
-
a-needs-info dependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
hyperlight-dev/lampyr#49 ·
メンテナーはふだん 4 日以内に返信
-
a-needs-info
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
hyperlight-dev/lampyr#34 ·
メンテナーはふだん 4 日以内に返信
-
Provision production AKS ingress DNS and TLS対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
hyperlight-dev/lampyr#76 ·
メンテナーはふだん 4 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
hyperlight-dev/lampyr#75 ·
メンテナーはふだん 4 日以内に返信
-
a-needs-info enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
hyperlight-dev/lampyr#55 ·
メンテナーはふだん 4 日以内に返信
hyperlight-dev/lampyr の issue をすべて見る
似ている issue
-
bug P2: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
-
tests
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
vfarcic/dot-agent-deck#2512 ·
メンテナーはふだん 1 日以内に返信