Skip to content

feat: authenticate to the bridge via a trusted-service secret (prod) - #8

Merged
huhn511 merged 1 commit into
mainfrom
fix/builder-bridge-service-auth
Jun 14, 2026
Merged

feat: authenticate to the bridge via a trusted-service secret (prod)#8
huhn511 merged 1 commit into
mainfrom
fix/builder-bridge-service-auth

Conversation

@huhn511

@huhn511 huhn511 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Why

Prod builder calls the codespaces bridge server-side using only the dev X-Mind-Dev-WebId header, which the bridge honors only when !isProd. In production it's ignored → every build action 401s no session; sign in via /connect. (Reproduced live.)

What

When BUILDER_BRIDGE_SERVICE_SECRET is set, bridgeAuthHeaders attaches X-Mind-Service-Secret + X-Mind-On-Behalf-Of: <webid>. The bridge accepts this in prod when its matching BRIDGE_SERVICE_SECRET is set (MIND-Studio/codespaces#15). Unset → falls back to the dev header (unchanged local behavior).

Follow-up (known)

builder still trusts the browser's claimed x-mind-webid without proof, so a secret holder can act as any WebID. Verifying WebID control (Solid-OIDC token) is the next hardening step.

🤖 Generated with Claude Code

Prod builder calls the bridge server-side using only the dev
X-Mind-Dev-WebId header, which the bridge honors only when !isProd. So
every build action 401s "no session; sign in via /connect" in prod.

When BUILDER_BRIDGE_SERVICE_SECRET is set, attach X-Mind-Service-Secret
+ X-Mind-On-Behalf-Of:<webid> instead; the bridge accepts this in prod
when its matching BRIDGE_SERVICE_SECRET is set (codespaces#15). Unset →
falls back to the dev header (unchanged local behavior).

Follow-up: builder still trusts the browser's claimed x-mind-webid
without proof, so a secret holder can act as any WebID. Verifying WebID
control (Solid-OIDC token) is the next hardening step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@huhn511
huhn511 merged commit 8c43f58 into main Jun 14, 2026
1 check passed
@huhn511
huhn511 deleted the fix/builder-bridge-service-auth branch June 14, 2026 11:56
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