Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: demos/sandbox client fails with missing bearer token on actor resume

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

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

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, grpc

調査の方向性

demos/sandbox/client/main.go、特に dialAteAPI() と ResumeActor の呼び出し経路を調査し、リポジトリ内にある internal/ateclient.NewClient の既存の使用例と比較して、想定される認証設定を確認します。まず、ドキュメントに記載されたポートフォワードの手順に従い、go run ./demos/sandbox/client --atespace=demo --name=sb1 を実行して、現在の missing bearer token エラーを再現します。コマンドで認証エラーなしに actor を再開でき、unauthenticated RPC の結果に到達しなくなれば完了です。

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

説明

area/demos kind/bug
What happened?

Summary

Running demos/sandbox/client fails when invoking ResumeActor against ate-api because the client establishes an unauthenticated gRPC connection without attaching a Bearer token.

Steps to Reproduce

  1. Port-forward the Substrate API server (kubectl port-forward -n ate-system svc/api 8080:443).
  2. Run the sandbox client:
    go run ./demos/sandbox/client --atespace=demo --name=sb1
    

Actual Behavior

2026/09/09 21:51:13 Connecting to ateapi at localhost:8080...
2026/09/09 21:51:13 Resuming actor sb1...
2026/09/09 21:51:13 Failed to resume actor: rpc error: code = Unauthenticated desc = missing bearer token

Root Cause

demos/sandbox/client/main.go uses a custom dialAteAPI() helper that calls grpc.NewClient with TLS but omits PerRPCCredentials (Bearer JWT / ServiceAccount token). As a result, ate-api's auth interceptor rejects the unauthenticated request.

Expected Behavior

The client should authenticate with ate-api using the standard internal/ateclient.NewClient, which automatically:

  • Obtains an ate-client ServiceAccount bearer token via the k8s TokenRequest API (or uses --token-file).
  • Validates the serving certificate against ClusterTrustBundle.
  • Injects bearer credentials into RPC requests.
Steps to Reproduce
  1. Deploy the sandbox demo on an Agent Substrate cluster:
    ./hack/install-ate.sh --deploy-demo-sandbox

  2. Create a sandbox actor:
    kubectl ate create actor sb1 -a ate-demo-sandbox --template sandbox-template

  3. Port-forward the API and router:

       kubectl port-forward -n ate-system svc/atenet-router 8000:80 &
  1. Run the sandbox client:
    go run ./demos/sandbox/client --atespace=ate-demo-sandbox --name=sb1

  2. Error:
    Failed to resume actor: rpc error: code = Unauthenticated desc = missing bearer token

Sandbox Runtime

gVisor (runsc)

Agent Substrate Version / Commit SHA

0b3d2d078

Kubernetes Version & Environment

No response

Host OS & Architecture

No response

Relevant Logs and Diagnostic Output

Additional Context

No response

Confirmation
  • I have searched existing issues and verified that this is not a duplicate.
  • I have verified that this issue occurs on the latest commit on main.
主要言語
Go
スター
4k
フォーク
473
平均マージ
2日 3時間
マージ済み PR(30日)
265

環境構築

はじめの一歩

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

agent-substrate/substrate のほかの issue

agent-substrate/substrate の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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