Isolate full-deployment Kafka and ZooKeeper from tenant action pods on 0.9.0
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 38/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- kubernetes, python
研究方向
Start by reading the operator code that applies NetworkPolicies and handles resume and Whisk updates; the payload does not name specific files or tests. Confirm how Kafka and ZooKeeper policies are reconciled, workloads are ordered, and legacy pods are restarted. Done means tenant action pods cannot reach either service while trusted clients, monitoring, and scheduled actions continue to work on a NetworkPolicy-enforcing CNI.
由索引模型根據 Issue 內容生成。
描述
Problem
In the 0.9.0 full deployment, ordinary tenant action pods can reach the shared Kafka and ZooKeeper endpoints. These are internal control-plane services and should not be accessible to tenant code. The deployment does not install a network boundary restricting those services to their intended clients.
This is an internal multi-tenant isolation problem. It does not establish an unauthenticated Internet-facing entry point, and slim installations without Kafka/ZooKeeper are outside this issue.
Attacker and risk
| Actor / position | Preconditions | Risk |
|---|---|---|
| Anonymous Internet client | Only the public HTTP ingress is exposed | No direct Kafka/ZooKeeper access demonstrated by these checks |
| Ordinary tenant/developer | Can deploy and invoke an action in their own namespace | Reachable unauthenticated shared messaging and coordination endpoints; potential cross-tenant confidentiality, integrity and availability impact |
| Host or Kubernetes administrator | Already controls the cluster | Outside the tenant-isolation boundary |
Expected behavior
Action pods must be denied access to Kafka and ZooKeeper by Service name, pod DNS name and pod IP. Controller/invoker traffic, broker coordination and monitoring must keep working.
Updating the operator on an existing full installation must install the protection automatically, including closing pre-existing messaging connections.
Proposed change
The accompanying operator PR targets 0.9.0 and adds narrow same-namespace ingress NetworkPolicies for Kafka and ZooKeeper. Trusted client selectors exclude every pod carrying user-action-pod, regardless of its value. Metrics access is limited to the installation's Prometheus pods.
The operator applies policies before workloads, rolls legacy messaging pods once, waits for completion, and reconciles enabled ZooKeeper then Kafka during resume and Whisk updates. Failures propagate; disabled components are skipped.
This requires a CNI that enforces NetworkPolicy. A policy object alone is not proof of isolation. The change preserves component versions, protocols and PVC contents; it does not add Kafka SASL/TLS or ZooKeeper authentication.
Validation
Local synthetic K3s lab:
- 16/16 tenant connection attempts were reachable in the legacy fixture and denied after automatic operator resume.
- Legitimate clients, Prometheus, action-labelled spoof checks and foreign-namespace checks passed.
- Repeating operator resume preserved messaging pod identities.
- Alpha/Beta application tests: 15/15; Redis Lua: 84/84; Streamer: 24/24.
- Scheduled actions continued working, and application source remained unchanged.
- Operator unit suite: 66/66, including 19 focused messaging tests.
The lab exercised operator image replacement/restart and the real Kopf resume handler. The exact ops update operator CLI command was not run with the unpublished local image.
Known limitation
Whisk uninstall still relies on owner garbage collection when the process-local saved component spec is absent. Policy-last teardown is therefore not guaranteed during uninstall. This was identified in the targeted review and accepted by the contributor as a non-blocking limitation of this proposal. It remains disclosed for maintainer assessment.
- 主要語言
- Python
- 星號
- 577
- 分支
- 29
- 平均合併
- 4 天 23 小時
- 30 天內合併 PR
- 3
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apache/openserverless 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 85/100
apache/openserverless#269 ·
-
難度 2/5 1-3 小時 新手友好度 84/100
apache/openserverless#267 ·
-
bug
難度 3/5 1-2 天 新手友好度 20/100
apache/openserverless#275 ·
-
難度 5/5 一週以上 新手友好度 20/100
apache/openserverless#274 ·
-
難度 5/5 一週以上 新手友好度 8/100
apache/openserverless#273 · 2 則留言 ·
查看 apache/openserverless 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 77/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
pgvector/pgvector-python#169 ·
-
ChaosEngine: backup-remote doctor row passes while consumer mode hides bot memory from git可能已有人在做 @MohabMohie 今天認領。 未關閉agentic
難度 2/5 1-3 小時 新手友好度 76/100
ShaftHQ/SHAFT_ENGINE#7263 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 87/100
huggingface/smolagents#3045 ·
維護者通常 1 天內回覆