identity: a ban on a compromised node does not reach the delegations re-exchanged downstream of it
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
- 28/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ệ
- github, go
- Lĩnh vực
- authentication, backend-api-design, distributed-systems, security
Hướng nghiên cứu
Start with internal/node/node.go around line 2531, internal/node/sts.go around line 96, and the referenced biscuit-go PR #186; read the existing token parsing, request binding, and ban checks. The change spans delegation signing, verification, and per-request handles, with open questions about handle lifetime and chain depth. Done means downstream requests retain a verifiable delegation chain and banning a signer blocks those requests; no tests are named in the issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Follow-up to #742. That issue proposed carrying the delegation chain in the border JWT; the review in #750 dropped that part. This issue is about the problem underneath it.
eclipse-biscuit/biscuit-go#186 brings third-party blocks to Go. With them, each agentmesh node can sign its own delegation hop with its libp2p key, offline. That closes a gap in the ban list: today, banning a compromised node doesn't reach the delegations re-exchanged downstream of it.
Problem
Say node O is compromised, for example because its agent is prompt-injected, and drives requests on a user's behalf to node E, which calls another node, P.
- Past the first hop, E can't act as the user. The provider strips
X-Mesh-*, Biscuit included, before the backend (node.go:2531), so E's agent gets the user's identity as plain headers but no credential. Today it either calls P as node E, and the user drops out, or the user's raw JWT has to reach it some other way so its node can re-exchange it atPOST /token/exchange. In the second case, every agent on the path holds a bearer credential that isn't bound to any node. - Banning O stops O's own calls. The control plane and the nodes reject a token whose
node,actor_nodeorclient_peer_idis banned (controlplane/sts.go:646,node/sts.go:96,node/middleware.go:443). - It doesn't reach E's requests, in either case.
- If E calls with its own identity, its token doesn't mention O. Those calls keep working for as long as E is trusted.
- If E re-exchanged the user's JWT, the result is a new root carrying
actor_node(E)andclient_peer_id(E)(mintDelegatedBiscuitFromJWT), which doesn't mention O either. It keeps working until it expires, up toDelegatedBiscuitTTL(one hour by default), and the forwarded JWT can be exchanged again from any other node.
| Tool | What it does here |
|---|---|
| Ban E | Stops E for every user, legitimate traffic included. |
| Revoke the user's tokens | E's token is a new root, so revoking the one O held doesn't reach it. Banning the user's identity stops all of their traffic. |
| Short TTLs | Bound the window but don't close it. |
client_peer_id in the Border Crossing lines (#750) |
Finds the requests afterwards, but can't stop them at request time. |
Proposal: node-signed delegation hops in third-party blocks
Everything happens inside the mesh. The border JWT and the control plane's role don't change.
Biscuit (block 0 from the control plane: the user, roles, bound to O)
+ third-party block signed by O: delegation("<O>", "<E>")
+ third-party block signed by E: delegation("<E>", "<P>")
- Signing. Each node signs with its libp2p Ed25519 key. The peer ID embeds the public key, so a verifier needs no lookup, and a rule
trusting ed25519/<key of E>sees only the facts E signed. - What P checks when E presents the token:
- block 0 is bound to O, and the chain starts at O;
- each hop is signed by the node it starts from;
- the presenting peer signed the last hop, and the last hop names P;
- no signer is banned.
- Consent is built in. O signs the hand-off to E, so a node that merely saw the Biscuit can't extend it. A sealed Biscuit ends the chain.
- The user's JWT is used once, at the entry node. The agent never holds a credential: its node gives it a short-lived, per-request handle and appends the hop for it.
- Banning O stops every request that passed through O, on every hop, while E keeps serving the rest. The delay is the propagation of
/revocations, not the token TTL. - No control-plane round trip. It keeps the control plane off the per-request hot path (
security-architecture.md§6, invariant 2). - Per-node policy. A provider can add its own policy over the chain in its
attenuation, for example a depth limit.
What it needs from biscuit-go
eclipse-biscuit/biscuit-go#186 already has:
- Third-party blocks.
Biscuit.ThirdPartyBlockRequest,ThirdPartyBlockRequest.SignRequest(takes the node's Ed25519 private key; a libp2p key converts withed25519.PrivateKey(raw), whererawcomes fromPrivKey.Raw()) andBiscuit.AppendThirdPartyBlock. The spec's third-party sample (test024) passes. - No extension of a sealed token.
ThirdPartyBlockRequestfails on a sealed token.
Still missing there:
- Public key interning across blocks. Spec sample
test026is still skipped. A token that crosses several hops carries one key per node, so agentmesh needs this.
biscuit-wasm and biscuit-python, which the SDKs use, already support third-party blocks.
What it needs in agentmesh
- Accept third-party blocks that carry exactly one
delegationfact signed by an enrolled node.UnmarshalInboundaccepts onlytar_blocktoday. - Let the request binding follow the chain. It checks only block 0 today.
- Make the ban check walk the signers.
- Give the agent a per-request handle, so it can ask its node to delegate on its behalf.
Alternative considered
The control plane could re-mint the Biscuit at each hop, with the chain in block 0. That works with today's biscuit-go, but it puts the control plane on the request path for every new delegation.
Open questions
- The shape of the per-request handle, and how long it lives.
- The depth cap.
MaxAttenuationBlocks = 8bounds it today.
Related
- #750:
client_peer_idin the/sts/tokenBorder Crossinglines. - draft-ietf-oauth-transaction-tokens: a replacement Txn-Token must maintain the call chain, but the draft leaves the mechanism out of scope.
- Ngôn ngữ chính
- Go
- Star
- 1.2k
- Fork
- 207
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 85
Chuẩn bị môi trường
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.
- Không có Dockerfile hay tệp Docker Compose
- Không 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 google/agentmesh
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
google/agentmesh#952 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Proposal: Out of Band Host Containment and Local Veto Hook for Uncooperative Agents (KillSwitch Integration)Có thể đã có người làm @oyesanyf đã nhận 15 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
google/agentmesh#879 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của google/agentmesh
Issue tương tự
-
Độ 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
projectcalico/calico#14766 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
forward/review service/container
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
hashicorp/terraform-provider-google#30852 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
docs(scheduling): a rolling deploy can open a second launch-gate episode (old replica after new)Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
SocialGouv/iterion#3826 ·
Maintainer thường phản hồi trong vòng 1 ngày