Skip to content

test(grpc): grant admin role to alice_token in GrpcServiceSmoke#32

Merged
secup merged 1 commit into
mainfrom
fix/grpc-smoke-admin-token
May 18, 2026
Merged

test(grpc): grant admin role to alice_token in GrpcServiceSmoke#32
secup merged 1 commit into
mainfrom
fix/grpc-smoke-admin-token

Conversation

@secup
Copy link
Copy Markdown
Owner

@secup secup commented May 18, 2026

Summary

Hotfix for PR #30 fallout. PR #30 added the operator/admin RBAC gate
on `CreateSession` + `SetChannel` + 4 other destructive RPCs.

`test_otasim_serve_smoke` was updated to mint an admin token for
its capture RPCs. `test_auth_allowlist` was updated to cover role
parsing. But `test_grpc_service_smoke` was missed — it calls
`CreateSession` and `SetChannel` with the previously-flat
`alice_token`, which now defaults to operator-role and gets
`PERMISSION_DENIED`.

CI on post-merge main caught it: Linux + macOS + Coverage + Sanitizer
all failed on this single test (`Test #13: GrpcServiceSmoke
Subprocess aborted`).

Change

`tests/test_grpc_service_smoke.cpp` — grant `alice_token` the
explicit `:admin` role so the smoke flow can exercise the admin
RPCs. `bob_token` stays operator-only.

Test plan

  • `ctest --test-dir build -R "GrpcServiceSmoke|AuthAllowlist|OtasimServe|UltraGuiOta|UltraTncSimAudio|SessionContext"` → 6/6 pass locally
  • CI matrix re-runs

🤖 Generated with Claude Code

PR #30 added an admin-role gate on CreateSession + SetChannel (and the
other 4 destructive RPCs). The two existing OTASim integration tests
were updated for the new gate (test_otasim_serve_smoke uses an admin
token for capture RPCs, test_auth_allowlist exercises the role
parser) but test_grpc_service_smoke was missed — it calls both
CreateSession and SetChannel with the previously-flat alice_token,
which is now operator-role by default and gets PERMISSION_DENIED.

CI on post-merge main caught it (Linux + macOS + Coverage + Sanitizer
all failed on this one test).

Fix: alice_token gets the explicit :admin role so the smoke flow can
exercise the admin RPCs. bob_token stays operator-only to keep
mirroring a normal joined station.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@secup secup merged commit 76985b4 into main May 18, 2026
5 checks passed
@secup secup deleted the fix/grpc-smoke-admin-token branch May 18, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant