fix(muster): support per-user auth and address workflow plugin review feedback#1735
Merged
Conversation
… feedback Co-authored-by: Cursor <cursoragent@cursor.com>
QuentinBisson
approved these changes
Jun 11, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
JS Dependency Audit0 added · 0 removed · 287 total (0 vs base) Projects audited
No change in vulnerabilities compared to the base branch. Full current vulnerability list (287)
|
This was referenced Jun 11, 2026
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
Follow-up to #1733, fixing the production blocker found while testing
/musteron a real installation and addressing @marians' post-merge review feedback.Per-user auth support (production blocker)
Real deployments configure the muster
aiChat.mcpentry withauthProvider(per-user OAuth via dex), which the muster-backend proxy rejected as "unconfigured" -- the Workflows page failed with a 503ServiceUnavailableError. Now:authProviderfrom config, fetches the user's token (same mechanism as ai-chat'sMCPAuthProviders, wired via a newmusterAuthProvidersApiRefoverridden in the app with the gs auth providers), and forwards it in abackstage-muster-authorizationheader.McpClientCache, and returns a 401 when the token is missing.No deployment config changes are needed; existing
authProvider: mcp-musterentries start working.Review feedback from #1733
McpClientCache+isClosedClientErrormoved from ai-chat-backend to@giantswarm/backstage-plugin-gs-node; both backends now import the single implementation instead of drifting copies. (The per-user cache requirement above made the hand-rolled single-entry cache in muster-backend obsolete anyway.)getString('name')crash:readMusterServerFromConfigusesgetOptionalString, so an unnamedaiChat.mcpentry no longer takes down plugin registration.tool.execute!non-null assertion: replaced with an explicit check that throws a cleanServiceUnavailableError.ServiceUnavailableError/AuthenticationError/InputErrorfrom@backstage/errorsand the hand-rolled error middleware is gone (the backend's default error middleware maps them; tests mountMiddlewareFactory.error()to mirror that).parseOptionalIntempty-value coercion:?limit=is now rejected with a 400 instead of silently becoming0.statusparam: rejected with a clear 400 instead of a misleading enum error.ResponseErrorPanelin the history slot; selected-execution failures render an inline alert above the canvas.formatDurationtriplication: extracted tolib/formatDuration.ts.workflowToGraphsuffixes colliding node ids so xyflow no longer silently drops nodes/edges.Test plan
muster-backend,muster,gs-nodetest suites pass (25/10/12 tests), including new coverage for per-user tokens, missing-token 401, empty/repeated query params, executor-less tools, and duplicate step idstscand per-package lint clean/musteron an installation withauthProvider: mcp-musterlists workflows and renders executionsMade with Cursor