Mount Kubernetes API token only into client containers in pods with sidecars

Đang mở
#3,469 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
57/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, kubernetes

Hướng nghiên cứu

Start with the workload manifest generation for ate-api-server, atelet, and atenet-router, then read cmd/ate-setup/internal/steps/serviceaccounttoken_test.go. Check how the PodSpecs and projected service account volumes are defined, and extend the manifest tests to verify token access per container. Done means the three API client containers retain access while the objectstore-plugin and envoy sidecars do not.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area/identity area/security kind/feature

PR #3466 will disable automountServiceAccountToken across all Substrate pods and ServiceAccounts that do not interact with the Kubernetes API (ateworker, atenet-egress, postgres, ate-idp-server, rustfs).

However, for the workloads that do require Kubernetes API access (ate-api-server, atelet, and atenet-router), Kubernetes automounts the ServiceAccount token into every container in the pod by default. This exposes the API credential to containers that do not need it:

  • objectstore-plugin sidecar in ate-api-server and atelet (transfers snapshots and accesses cloud storage via Workload Identity / STS, not Kubernetes tokens)
  • envoy in atenet-router (parses untrusted ingress traffic; only the atenet-router controller container queries EndpointSlices)

If one of these sidecars is compromised, the attacker inherits the pod's Kubernetes API permissions.

Proposal:

  1. Set automountServiceAccountToken: false on the PodSpec for ate-api-server, atelet, and atenet-router.
  2. Hand-mount a projected kube-api-access volume (containing token, ca.crt, and namespace) at /var/run/secrets/kubernetes.io/serviceaccount exclusively into the API client container (ate-api-server, atelet, and atenet-router).
  3. Extend the manifest tests in cmd/ate-setup/internal/steps/serviceaccounttoken_test.go to assert token isolation per-container, ensuring sidecars never mount the token and API clients always mount it.
Ngôn ngữ chính
Go
Star
6.1k
Fork
676
Merge trung bình
2 ngày 41 phút
Pull request đã merge (30 ngày)
500

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của agent-substrate/substrate

Tất cả issue của agent-substrate/substrate

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.