fix(mcp): stop administering Hub from secret rotate #118
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/YT-61-drop-hub-secret-administration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
yt mcp secret rotateminted a client secret locally and installed it on the Hub service record, authenticating with the active instance's YouTrack token. That madeyta Hub administration client, and the capability was unrequested (YT-56 asked for a way to apply a rotation, not to perform one), unusable with the token the CLI actually mints (Hub answers a YouTrack-scoped token withThe operation requires the "0-0-0-0-0" scope), and usable at all only if an operator parked a Hub-administration credential in a config file whose every other consumer needs YouTrack access alone.ythas no interactive authorization flow, no 2FA, and no redirect handling, so administration of that weight does not belong in it.The operator now rotates the secret in Hub and passes the value to
--hub-client-secret, which becomes the only source of the new secret: with none supplied the command fails before the prompt, having written nothing, and names the Hub step that produces one. The command resolves no YouTrack credentials and makes no Hub request, so--config/--instanceno longer reach it and it runs with no instance configured at all. The half with no workaround is unchanged: patchmcp.env, regenerate the session key, purge every derived credential, restart the unit.Removes
rotate_service_secretand the YT-60 preflightcheck_service_admin_accessfromyoutrack-mcp, along with their tests, since the command was the only caller.HubClient's own calls are unaffected: an OAuth client reading its own grant is not service administration. The removal is enforced by a workspace source sweep that fails if either name returns, so it cannot be undone by a later edit that reaches for the endpoint again.Supersedes YT-60, which made the admin path's scope error explain itself; with the admin path gone there is no preflight to add and no scope error to explain.
#YT-61
secret rotate