Docs: step-by-step recipe for giving a node a custom role

オープン 初心者向け
#957 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
documentation

調査の方向性

まず、Getting Startedの手順と、ノードの登録、ロール、ポリシーバインディングを扱うリファレンスページを確認し、guides/ 配下の適切な場所を選びます。ノードの登録、ピアIDの確認、ロールのバインド、アクセスの検証を行う手順を順を追って記述します。Credentialに mesh:role:node しか記載されていなくても、ポリシーバインディングによって実効アクセス権が付与されることを説明します。コマンド、想定される待機動作、成功する呼び出しと禁止される呼び出しの確認がレシピに含まれていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

agentmesh-node always requests mesh:role:node (RequiredRole: api.RoleNode), and the control plane requires the requested role to match the bootstrap token's role. That's the intended design. But it means a token minted with agentmesh-one token create --role caller can't enroll an agentmesh-node, and nothing in the getting-started path says so.

The supported route works well, but you have to assemble it from several reference pages. A short recipe would help:

  1. Mint a plain node token and enroll once: agentmesh-node join <url> --bootstrap-token-path tok --data-dir ./n1.
  2. Start it with run, without the token flag.
  3. Get the peer ID: the PeerID: line in the startup log, or GET /debug/mesh-info on the node's API with its token. (/mesh/identity answers only over the socket or mTLS.)
  4. Bind the role by peer ID: add {"role": "caller", "members": ["node:<peer-id>"]} to bindings and POST /policies with the admin token.
  5. No restart is needed. In a single test run, a new grant took effect in about 2 s and a removal in about 50 s.
  6. Verify with a call that should succeed and one that should get a 403.

Worth stating explicitly in the recipe: the binding grants access through policy evaluation, so a renewed credential can still list only mesh:role:node while the binding authorizes the call. Anyone building a "what can this node do" view needs to read effective grants from the policy, not the roles printed in the credential.

I can write this as a docs PR under guides/ if that's useful.

主要言語
Go
スター
1.2k
フォーク
207
平均マージ
1日 10時間
マージ済み PR(30日)
85

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

google/agentmesh のほかの issue

google/agentmesh の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。