本地 dev 不再信任默认 CLI 配置里的远程 token #526
Closed
suzmii
wants to merge 1 commits from
fix/dev-loopback-token-trust into master
pull from: fix/dev-loopback-token-trust
merge into: GenarrativeAI:master
GenarrativeAI:master
GenarrativeAI:feat/msg-queue-to-rust
GenarrativeAI:feat/ui-editor-model-override
GenarrativeAI:fix/agc-release-gate-channel
GenarrativeAI:feat/agc-bundled-resources-m3
GenarrativeAI:fix/agc-rust-staging-idempotency
GenarrativeAI:feat/tribo3d-integeration
GenarrativeAI:opt/test-compile-warning
GenarrativeAI:fix/api-timeout
GenarrativeAI:codex/admin-gray-game-publish
GenarrativeAI:codex/remove-agc-codex-restrictions
GenarrativeAI:feat/gptimage2to2.5
GenarrativeAI:backup/agc-macos-dualarch-node-runtime
GenarrativeAI:feat/Crt_Ws
GenarrativeAI:codex/preview-llm-router-config
GenarrativeAI:fix/stroke-width-regression-from-285
GenarrativeAI:agent-organize
GenarrativeAI:feat/game-agent-canvas-resource-workbench-v2
GenarrativeAI:feat/agc-new-workflow
GenarrativeAI:fix/agc-release-version-sync
GenarrativeAI:codex/shared-components-followup
GenarrativeAI:codex/game-agent-runtime-interaction-design
GenarrativeAI:feat/spine-sequence-export-v2
GenarrativeAI:codex/game-agent-run
GenarrativeAI:codex/ui-spritesheet-durable-transaction-latest
GenarrativeAI:feat/art-agent-more-tools
GenarrativeAI:codex/editor-canvas-null-source-repair
GenarrativeAI:hotfix/editor-layout-2mib
GenarrativeAI:codex/showcase
No Reviewers
Labels
Clear labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Low
4
The priority is low
Priority
Medium
3
The priority is medium
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: GenarrativeAI/Genarrative#526
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "fix/dev-loopback-token-trust"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
npm run dev反复在spacetime publish的 pre-publish check 失败:401 InvalidSignature。根因是 dev stack 在本地服务器上信任了默认 CLI 配置(~/.config/spacetime/cli.toml,用于远程账号)里的 token —— 形如有效、但本地 standalone 验签必然失败。修复
shouldTrustExistingSpacetimeToken对 loopback 服务器额外要求 token 由本机签发(JWTiss为 localhost/127.0.0.1/::1);显式 shell 覆盖的语义不变。验证
scripts/dev.test.ts70 passed(新增:远程签发 token 在本地不被信任、本机签发被信任)。已知未覆盖
本机签发但已失效的旧 token(数据目录重建后签名失效、
iss仍为 localhost)仍不被这条规则拦住,需要手工删除server-rs/.spacetimedb/local/data/{dev-cli/cli.toml,dev-api-identities/local-node.json};自动自愈要在调用层把发布改成非致命后重试(当前runForeground失败会直接结束进程)。该 PR 由本地 agent 在未经用户确认的情况下自行创建,按要求关闭;其中
shouldTrustExistingSpacetimeToken的签发者判定已并入既有 PR,不单独开单。Pull request closed