Repository navigation
fix(mcp): access token revoke (backport 2.0 #36498) - #36778
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved🔴 High risk · Persistent MCP token checks and grant-wide revocation change authorization; storage or revocation errors could block valid sessions or leave revoked credentials usable. Backports the access token revocation fix for MCP to 2.0: access tokens now carry their client and are stored at issue time, so VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Backport of the access token part of #36498 to
2.0.JwtFilterrefuses one that is no longer stored, so a revoked token stops working on every server. Before this,/mcp/revokedeleted from a table nothing wrote to./mcp/revokeonly touches tokens of the client that asks,token_type_hintonly picks which type is looked up first, and revoking a refresh token also ends the access tokens of its grant.2.0keeps the OAuth DAOs inCollectionDAO, so the shared token hash lives there, and the logout denylist change is not part of this.Type of change:
Tests:
Unit tests
JwtFilterTest,JWTTokenGeneratorTest,RevocationHandlerTest,OAuthTokenRepositoryTest,UserSSOOAuthProviderTest: the token check, theclient_idclaim, client-bound revoke and storing the token before rotation.Backend integration tests
McpOAuthIT: a revoked access token and the access token of a revoked refresh token get 401 on the next call.2.0with the six MCP backports applied together; integration tests on MySQL + Elasticsearch and Postgres + OpenSearch.McpServiceResourceITon2.0does not compile today (supportsEntityStatusis not on2.0); that line was removed locally for the run.Summary by Gitar
UserRepository.preDeleteThis will update automatically on new commits.