fix(mcp): preflight Hub access before the rotation prompt #117
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/YT-60-hub-scope-preflight"
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 rotateauthenticated the Hub service-secret rotation with the active instance's YouTrack permanent token, whichyt auth loginmints scoped to YouTrack alone. Hub's service administration requires its own service id (0-0-0-0-0, shown in YouTrack as "YouTrack Administration"), so the default path 401s for every operator using a normally-minted token, and it did so only after the operator had already authorized signing every user out.check_service_admin_accessreadsGET <issuer>/api/rest/services/<id>with the same token, read-only, before the prompt. A 401/403 aborts non-zero having asked nothing and written nothing, and the error names the required scope, the scopes Hub reports the token as holding (parsed out of Hub'serror_description), how to mint a token carrying the Hub scope, and the existing--hub-client-secretfallback.--hub-client-secretresolves no Hub target at all, so it skips the preflight and the Hub call alike. A passing preflight leaves the rest of the flow untouched: prompt, rotate, patch, purge, restart, report.#YT-60