Egress policy compilers: give them the Session, and let a Session add destinations

Đang mở
#3,441 2 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
backend

Hướng nghiên cứu

Start with go/core/pkg/egresspolicy/egresspolicy.go and proto/kagent/api/v1/sessions.proto, then trace how Session actors receive compiled egress policies on create, repoint, and rollback. The core open question is who may authorize per-Session destinations; review the two comments and discuss the admission model with maintainers before implementation. Done means an agreed design covering compiler input, validation, authentication handling, and policy updates across those lifecycle events.

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

Mô tả

Problem. An egress policy compiler (#3263) reads Input{Atespace, GatewayTargets} (go/core/pkg/egresspolicy/egresspolicy.go:19-22) and runs once per revision, so every Session of an Agent gets the same actor policy. Some destinations are known only when a Session is created: the repository host a person's working copy lives on, the forge API that host serves, a per-Session service. Today such a Session is refused at the gateway for a host its Agent did not list. Session has no egress field (proto/kagent/api/v1/sessions.proto:34-55), and a compiler cannot see the Session, so neither path can add a per-Session destination.

Proposal.

  1. The compiler Input gains the Session (id, creator, agent) when the policy is compiled for a Session actor. That is enough for an out-of-tree compiler to bind per-Session destinations.
  2. Optionally, Session.egress: destinations in the vocabulary of EgressPolicy.spec.destinations, given on CreateSession, validated like an EgressPolicy, and compiled into the Session actor's own policy on create, on repoint and on rollback. A destination's authentication takes the same sources as EgressPolicy, so a credential never enters the sandbox.

Who may add which destination is the open design question: a signed grant, an allow-list on the Agent, or an EgressPolicy the Session references. We have a reference implementation of both steps and can adapt it to whichever admission you prefer.

Ngôn ngữ chính
Go
Star
4.5k
Fork
937
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
150

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 kagent-dev/kagent

Tất cả issue của kagent-dev/kagent

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.