fix(security): tenant CPProvisioner sends CP bearer on provision / stop / status - #981
Merged
HongmingWang-Rabbit merged 1 commit intoApr 19, 2026
Conversation
Completes the C1 integration (PR #50 on molecule-controlplane). The CP now requires Authorization: Bearer <PROVISION_SHARED_SECRET> on all three /cp/workspaces/* endpoints; without this change the tenant-side Start/Stop/IsRunning calls would all 401 (or 404 when the CP's routes refused to mount) and every workspace provision from a SaaS tenant would silently fail. Reads MOLECULE_CP_SHARED_SECRET, falling back to PROVISION_SHARED_SECRET so operators can use one env-var name on both sides of the wire. Empty value is a no-op: self-hosted deployments with no CP or a CP that doesn't gate /cp/workspaces/* keep working as before. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
molecule-ai Bot
pushed a commit
that referenced
this pull request
Apr 21, 2026
…ioner-bearer fix(security): tenant CPProvisioner sends CP bearer on provision / stop / status
HongmingWang-Rabbit
deleted the
fix/security-tenant-cpprovisioner-bearer
branch
April 24, 2026 00:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the C1 integration (molecule-controlplane PR #50). CP now requires `Authorization: Bearer <PROVISION_SHARED_SECRET>` on every `/cp/workspaces/*` call and refuses to mount the routes when the env var is unset. Without this change, the tenant platform's outbound `Start` / `Stop` / `IsRunning` calls all 401 (or 404 when CP routes don't mount), and every SaaS-tenant workspace provision silently fails.
Reads `MOLECULE_CP_SHARED_SECRET`, falling back to `PROVISION_SHARED_SECRET` so operators can use a single env-var name on both sides. Empty value is a no-op — self-hosted deployments keep working.
Test plan
🤖 Generated with Claude Code