[Bug]: demos/sandbox client fails with missing bearer token on actor resume
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go, grpc
- Domain
- backend-api-design, cli
Research direction
Inspect demos/sandbox/client/main.go, especially dialAteAPI() and the ResumeActor call path, then compare with existing uses of internal/ateclient.NewClient in the repo for expected auth setup. Reproduce first with the documented port-forward steps and go run ./demos/sandbox/client --atespace=demo --name=sb1 to confirm the current missing bearer token failure. Completion is when the command resumes the actor without authentication error and no longer hits the unauthenticated RPC result.
Written by the indexing model from the issue text.
Description
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
- Port-forward the Substrate API server (
kubectl port-forward -n ate-system svc/api 8080:443). - 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-clientServiceAccount 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
-
Deploy the sandbox demo on an Agent Substrate cluster:
./hack/install-ate.sh --deploy-demo-sandbox -
Create a sandbox actor:
kubectl ate create actor sb1 -a ate-demo-sandbox --template sandbox-template -
Port-forward the API and router:
kubectl port-forward -n ate-system svc/atenet-router 8000:80 &
-
Run the sandbox client:
go run ./demos/sandbox/client --atespace=ate-demo-sandbox --name=sb1 -
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.
- Dominant language
- Go
- Stars
- 4k
- Forks
- 473
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 265
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from agent-substrate/substrate
-
area/dev-infra area/microVM kind/feature
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
agent-substrate/substrate#1826 · 2 comments ·
Maintainers usually reply within 1 day
-
area/benchmarking kind/feature
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agent-substrate/substrate#1750 · 2 comments ·
Maintainers usually reply within 1 day
-
area/node area/observability good first issue kind/feature prio/P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agent-substrate/substrate#1647 · 1 comment ·
Maintainers usually reply within 1 day
-
area/network kind/bug kind/docs prio/P0
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
agent-substrate/substrate#1525 ·
Maintainers usually reply within 1 day
-
area/network area/security bug-bash kind/bug prio/P2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
agent-substrate/substrate#1457 ·
Maintainers usually reply within 1 day
All issues in agent-substrate/substrate
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
status: ready for dev
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
hyperledger-labs/fabric-smart-client#2004 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/datasketches-go#189 ·
Maintainers usually reply within 1 day