fix(32.2): WR-03 refuse an unknown MCPGrant.Subject instead of treating it as a user grant

pier now resolves only the empty subject (frontend user grant) and pact.MCPGrantSubjectBackend; any other value is ErrUnauthorized and never reaches the linked-administrator lookup.
This commit is contained in:
Jakub Zych
2026-11-21 09:11:46 +01:00
parent 1dcc2ed06d
commit 19bb3f9485
6 changed files with 18 additions and 6 deletions

View File

@@ -305,7 +305,8 @@ type MCPGrant struct {
// Subject is the kind of subject the grant names. Empty means the
// frontend user in UserID, the meaning every grant had before Subject
// existed. MCPGrantSubjectBackend means the backend account in
// BackendUserID, with UserID 0 and no frontend user involved.
// BackendUserID, with UserID 0 and no frontend user involved. The MCP
// endpoint refuses a grant with any other value.
Subject string
}