fix: read pico gateway token from security.yml dynamically#800
fix: read pico gateway token from security.yml dynamically#800BeaconCat wants to merge 1 commit into
Conversation
GetPicoclawInternalToken() now reads the pico channel token directly from ~/.picoclaw/.security.yml on every call instead of caching. This ensures NanoKVM-Server always uses the same token that picoclaw gateway has, even after picoclaw restarts and regenerates its token. Fallback chain: security.yml -> cached -> legacy token file -> generate new
|
Thanks for your hard work. I don’t think That function validates NanoKVM loopback/internal requests via It also creates a fresh-install desync. I’d keep |
Summary
Fix token desync between NanoKVM-Server and PicoClaw gateway after PicoClaw restarts.
Problem
When PicoClaw restarts, it regenerates the pico channel token. NanoKVM-Server was caching the old token, causing authentication failures on the gateway endpoint.
Solution
GetPicoclawInternalToken()now reads the token directly from~/.picoclaw/.security.ymlon every call instead of using a cached value.Fallback chain: security.yml → cached → legacy token file → generate new
Files changed
server/config/picoclaw_internal.go(new file)