You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GitLab app: no tool covers GET /api/v4/user, so whoami is always blocked even with full access #570
The GitLab app's permission catalog (16 tools) has no action covering GET /api/v4/user. Any request to that endpoint falls into the connection
grant's "everything else" fallback, which is always blocked. Many GitLab
clients (MCP servers, glab, SDK validators) call /api/v4/user on startup
to verify the token, so the integration fails even when the grant is fully
permissive.
Reproduction
Attach a GitLab connection to an agent with --allow on all 7 read tools
(or even with no tool flags = full access).
Run through the gateway: curl https://<gitlab-host>/api/v4/user
Result:
{"error":"blocked_by_policy",
"message":"Blocked by OneCLI policy rule \"Grant: ... : everything else\". GET /api/v4/user is not allowed."}
What I tested (all failed)
Grant with access: full → still blocked by the "everything else" fallback.
Published org policy rule allow with target
{"kind":"network","hostPattern":"","pathPattern":"/api/v4/user*","method":"GET"}
→ ignored; connection-grant blocks take precedence.
Grant body only accepts access/allow/ask — no path-level exceptions possible.
Feature request
Add a read-only tool to the GitLab permission catalog, e.g.:
id: get_current_user
name: "Get authenticated user"
maps to: GET /api/v4/user (and possibly /api/v4/user token validation)
Plan: add a read-only get_current_user tool to the GitLab permission catalog mapping GET /api/v4/user, so token-validation/whoami calls resolve to a read tool instead of the always-blocked "everything else" fallback. The write side stays covered by the existing write_all wildcard (POST/PUT/PATCH/DELETE on /api/v4/*), so read/write separation is preserved. I'll include a regression test asserting GET gitlab.com/api/v4/user resolves to get_current_user.
Activity
Anulo2 commentedon Sep 17, 2026
A similar issue applies also to the issues global api endpoint
Mohil-Ahuja commentedon Oct 26, 2026
I'd like to take this one.
Plan: add a read-only
get_current_usertool to the GitLab permission catalog mappingGET /api/v4/user, so token-validation/whoami calls resolve to a read tool instead of the always-blocked "everything else" fallback. The write side stays covered by the existingwrite_allwildcard (POST/PUT/PATCH/DELETE on/api/v4/*), so read/write separation is preserved. I'll include a regression test assertingGET gitlab.com/api/v4/userresolves toget_current_user.PR shortly.