Skip to content

Commit a65639c

Browse files
committed
Remove a connector's grants when the connector is removed
1 parent 84e5b67 commit a65639c

6 files changed

Lines changed: 3735 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ Newest first. `Unreleased` is what is on `main` and not yet tagged.
88

99
## Unreleased
1010

11+
### Removing a connector takes its grants with it
12+
13+
A grant naming a connector's tool outlived the connector. Removing an app revoked every credential
14+
and every brokered account and deleted the app itself, and left the grant rows behind, naming a
15+
server that no longer existed. Nothing showed them: the page that reports grants a connector no
16+
longer advertises reads them off the connector's own row, and there was none. Adding the same app
17+
back — which mints the same id, and so the same tool names — put every action it had back on every
18+
Bot that used to hold it, with nobody granting anything and no row in the trail saying a grant had
19+
been made. An app's grants are now removed in the same step as the app, the removal records which
20+
grants it released and from which Bots, and a migration drops the grants earlier removals left
21+
behind. Grants for other connectors, and skill grants, are untouched.
22+
1123
### Naming a conversation asks the endpoint OPENAI_BASE_URL names, not OpenAI
1224

1325
The job that names a conversation sent its request to api.openai.com whatever `OPENAI_BASE_URL` said,
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DELETE FROM "plugin_grants" AS g
2+
WHERE g."kind" = 'mcp'
3+
AND NOT EXISTS (
4+
SELECT 1 FROM "mcp_servers" AS s WHERE s."id" = split_part(g."ref", '/', 1)
5+
);

0 commit comments

Comments
 (0)