Skip to content

Commit

Permalink
[TB] limit oauth scopes (#20131)
Browse files Browse the repository at this point in the history
  • Loading branch information
mustard-mh authored Aug 16, 2024
1 parent 987c714 commit 4f6e2cb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions components/server/src/oauth-server/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,17 @@ const toolbox: OAuthClient = {
redirectUris: ["jetbrains://gateway/io.gitpod.toolbox.gateway/auth"],
allowedGrants: ["authorization_code"],
scopes: [
// We scope all so that it can work in papi like a PAT
{ name: "function:*" },
{ name: "function:getGitpodTokenScopes" },
{ name: "function:getLoggedInUser" },
{ name: "function:getOwnerToken" },
{ name: "function:getWorkspace" },
{ name: "function:getWorkspaces" },
{ name: "function:listenForWorkspaceInstanceUpdates" },
{ name: "function:startWorkspace" },
{ name: "function:stopWorkspace" },
{ name: "function:deleteWorkspace" },
{ name: "function:getToken" },
{ name: "resource:default" },
],
};

Expand Down

0 comments on commit 4f6e2cb

Please sign in to comment.