-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TB] add OAuth entry #20049
[TB] add OAuth entry #20049
Conversation
// We scope all so that it can work in papi like a PAT | ||
{ name: "function:*" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭 Is it necessary to whitelist all scopes or can we limit it to some extent of internal functions, like we did for the other clients?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we do, because we need to use papi v1 entry. #19597 (comment)
We can update it anyway in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For more context, the limitation is here
gitpod/components/server/src/auth/bearer-authenticator.ts
Lines 115 to 119 in 8df5d2f
// gpl: Once we move PAT to FGA-backed scopes, this special case will go away, and covered by a different SubjectIdKind. | |
const { isAllAccessFunctionGuard } = FunctionAccessGuard.extractFunctionScopes(scopes); | |
if (!isAllAccessFunctionGuard) { | |
return undefined; | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I have no idea when we can do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just made optional & non-blocking suggestion to limit the client's scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, left one minor comment we can tackle in a follow-up
allowedGrants: ["authorization_code"], | ||
scopes: [ | ||
// We scope all so that it can work in papi like a PAT | ||
{ name: "function:*" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe still makes sense revisiting after we decide what methods are important to scope this down? Or is that not possible with p-api?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, we have reason to set it to all scopes #20049 (comment) for now
Description
Related Issue(s)
Fixes #
How to test
Once build is passed
Documentation
Preview status
gitpod:summary
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold