Skip to content

Commit 4f6e2cb

Browse files
authored
[TB] limit oauth scopes (#20131)
1 parent 987c714 commit 4f6e2cb

File tree

1 file changed

+11
-2
lines changed
  • components/server/src/oauth-server

1 file changed

+11
-2
lines changed

components/server/src/oauth-server/db.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,17 @@ const toolbox: OAuthClient = {
147147
redirectUris: ["jetbrains://gateway/io.gitpod.toolbox.gateway/auth"],
148148
allowedGrants: ["authorization_code"],
149149
scopes: [
150-
// We scope all so that it can work in papi like a PAT
151-
{ name: "function:*" },
150+
{ name: "function:getGitpodTokenScopes" },
151+
{ name: "function:getLoggedInUser" },
152+
{ name: "function:getOwnerToken" },
153+
{ name: "function:getWorkspace" },
154+
{ name: "function:getWorkspaces" },
155+
{ name: "function:listenForWorkspaceInstanceUpdates" },
156+
{ name: "function:startWorkspace" },
157+
{ name: "function:stopWorkspace" },
158+
{ name: "function:deleteWorkspace" },
159+
{ name: "function:getToken" },
160+
{ name: "resource:default" },
152161
],
153162
};
154163

0 commit comments

Comments
 (0)