fix
patch
feat/phase-2g-bundle
fix: add X-Gateway-Auth to all bridge→canister calls (Phase 0 compatibility)
Phase 0 added gatewayAuthorized() to the canister, which rejects every request that lacks the X-Gateway-Auth header when gateway_auth_secret is set. The bridge never sent this header, so all canister operations (export for backup, vault list, notes batch write, proposals list, vault delete, keyword search) started returning 401 after the new canister code was deployed.
Adds GATEWAY_AUTH_SECRET constant and a canisterHeaders() helper that injects X-Gateway-Auth when the secret is configured. All 8 canister fetch call sites in bridge/server.mjs now go through this helper.
New tests in phase3-security.test.mjs verify the helper exists and is used at every canister fetch call site.
sha256:aea7b7f36e52c8f81ece4e8084ba0bff7159a5a32b51796080b33c015a5f1b67
sha
sha256:d75c68c0fe67098c424792deff4ad83a994f046d0c90c8c65a1c515efc7b8269
snapshot
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:aea7b7f36e52c8f81ece4e8084ba0bff7159a5a32b51796080b33c015a5f1b67 --body "your comment"
No comments yet. Be the first to start the discussion.