Listen on Unix socket only; remove TCP listener and bring TypeScript to parity
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
The issue involves three codebases: Go, Rust, and TypeScript. Start by examining the existing listener code in each (e.g., ts/src/index.ts:43 for TypeScript, and similar locations for Go and Rust). Understand how Unix socket listening is implemented in Go and Rust to add it to TypeScript. Review the integration suite in deploy/ to update from TCP to Unix socket. Check flag handling (--listen-tcp, --listen-socket) and systemd socket activation. Done means all three implementations listen only on Unix sockets, the TCP flag is removed, and tests pass with the updated configuration.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem?
The proxy currently accepts requests over TCP as well as a Unix socket, which breaks its own security model.
Access control in this project is built on socket ownership: a caller is authorised because it can connect(2) to a Unix socket whose filesystem permissions (user/group) the operator controls. A TCP listener has no equivalent — there is no peer uid/gid, so anything that can reach the port is implicitly trusted. --listen-tcp defaults to 127.0.0.1:2375, and deploy/docker-compose.yml binds 0.0.0.0:2375, so the weaker path is the one exercised by default.
This is already acknowledged as a one-sided rule: all three implementations reject tcp:// for the outbound connection to the Docker daemon (ts/src/flags.ts:42, Makefile:111) on exactly these grounds. The inbound listener never got the same treatment.
The three implementations are also not equivalent today, which contradicts the "equal peers" rule in AGENTS.md:
| Unix listener | TCP listener | |
|---|---|---|
| Go | yes | yes |
| Rust | yes | yes |
| TypeScript | no | yes |
TypeScript is TCP-only (ts/src/index.ts:43) and has no Unix socket support at all.
Describe the solution
Make Unix socket the only transport the proxy listens on, in all three implementations.
- Remove the
--listen-tcpflag and its listener from Go, Rust, and TypeScript. - Add Unix socket listening to TypeScript via
--listen-socket, reaching parity with Go and Rust, includingfd://3systemd socket activation and stale socket file cleanup. - Make a listen-socket bind failure fatal. With a single listener, a running-but-unbound process is never useful; today the bind error is logged and the process stays up.
- Migrate the integration suite (
deploy/docker-compose.yml,deploy/docker-compose.sock.yml,deploy/test.sh,deploy/test-sock.sh) fromtcp://proxy:2375to a shared-volume Unix socket. - Update
README.md(flag table and security boundary section) and the systemd example, which currently documentsListenStream=127.0.0.1:2375.
Describe alternatives
- Keep
--listen-tcpbut default it to disabled. Rejected: the insecure path stays reachable via config, and the security boundary stays advisory rather than structural. - Keep TCP and add peer authentication (mTLS). Rejected: substantially more surface and key management, to re-derive an identity the kernel already gives us for free over a Unix socket.
- Leave TypeScript TCP-only. Rejected: directly contradicts the equal-peers rule.
Which implementation(s) would this affect?
- Go
- Rust
- TypeScript
- Quint specification
- All
Additional context
Breaking change. Any deployment passing --listen-tcp or connecting via DOCKER_HOST=tcp://... must switch to a mounted Unix socket. The flag is removed outright rather than deprecated, so Go and Rust will exit on the unknown argument instead of silently listening on a socket the caller is not expecting.
The Quint spec models policy and invariants, not the transport layer, so no spec change is expected.
- Ngôn ngữ chính
- Rust
- Star
- 2
- Fork
- 0
- Merge trung bình
- 12 giờ 11 phút
- Pull request đã merge (30 ngày)
- 30
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ChainSafe/docker-socket-policy
-
Type: Feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
ChainSafe/docker-socket-policy#96 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Priority: P3 Type: Enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
ChainSafe/docker-socket-policy#95 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Type: Feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
ChainSafe/docker-socket-policy#65 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Type: Enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
ChainSafe/docker-socket-policy#46 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ChainSafe/docker-socket-policy
Issue tương tự
-
Make major, minor, and makedev safe on solarish targetsCó thể đã có người làm @xtqqczze đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Proxy ignores l5d-retry-http and l5d-retry-grpc conditions that follow a comma and spaceCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 3 ngày
-
sncast panics when decoding a `u384` valueCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
foundry-rs/starknet-foundry#4635 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
crmne/omastats#31 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:desktop priority:p2 type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày