Feature: per-socket (per-instance) exec allowlist
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go, rust, typescript
調査の方向性
Read the README's “Trust model,” issue #39, and the exec deny rules in #49; inspect the Go, Rust, and TypeScript implementations and spec/docker_socket_policy.qnt. The proposal leaves key policy decisions open, including command matching, container scope, exec-ID tracking, and fields to restrict, so this is design work rather than a bounded first contribution.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem?
Exec is hard-coded as denied in all three implementations: POST /containers/<name>/exec and POST /exec/<id>/start. No policy or configuration can enable it. Some deployments may legitimately want callers of one socket to run a limited set of commands in their containers, for example a health or debug command, while other sockets stay locked down.
Today's model:
- The trust boundary is the listening socket (see README "Trust model" and #39). Anyone who can connect gets everything that proxy instance allows. The proxy has no caller identity.
- Policies are per service and are selected by image name only on
POST /containers/create. Exec requests carry no image, so a policy cannot be selected for them.
So "per socket" means per proxy instance.
Describe the solution (for future consideration; not designed yet)
An instance-level setting, as a flag or a config file next to the policies, that allows exec under explicit limits. Open questions:
- Command allowlist, matched on
Cmdin the exec-create body, using the same flag/value-pattern machinery as CmdGate. Is a plain on/off switch ever acceptable? - Container scope: restrict to containers created from images matching a policy's
allowed_image_prefixes, or to named containers. This needs the daemon's container-to-image mapping at exec time. - Fields to force or deny:
Privileged: true(always deny?),User(force it?),Env,Tty/AttachStdin. POST /exec/<id>/start,/resize, andGET /exec/<id>/json: start can only be allowed for exec instances this proxy created and approved, which means tracking exec IDs. Inspect leaks other users' exec command lines (verified in #49:ExecIDsfrom container inspect, thenGET /exec/<id>/json, shows the full arguments including inline secrets).- Spec: a new invariant in
spec/docker_socket_policy.qnt, replacing "execContainerunconditionally returns false", such as "every executed command matches the instance allowlist". - Audit: log every exec create and start, with the command.
Describe alternatives
- Keep exec denied everywhere (status quo). Simplest and safest. Users who need exec use the daemon socket directly, outside the proxy's guarantees.
- Per-policy setting. Not workable: exec requests carry no image, so there is no policy to select (see above).
- Per-caller identity. Rejected by the #39 trust model.
Which implementation(s) would this affect?
- All (Go, Rust, TypeScript, Quint specification)
Additional context
Raised while converging the exec deny rules in #49. #49 keeps exec denied and only fixes the cross-language differences.
- 主要言語
- Rust
- スター
- 2
- フォーク
- 0
- 平均マージ
- 12時間 11分
- マージ済み PR(30日)
- 30
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ChainSafe/docker-socket-policy のほかの issue
-
Type: Enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
ChainSafe/docker-socket-policy#46 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
ChainSafe/docker-socket-policy の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nannou-org/egui_graph#92 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue
難易度 2/5 半日 初心者へのやさしさ 72/100
sujithputta02/Esapay#13 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
tursodatabase/turso#10002 ·
メンテナーはふだん 1 日以内に返信
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
topgrade-rs/topgrade#2419 ·
メンテナーはふだん 1 日以内に返信
-
review-bot
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
midagedev/bloomery#318 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信