Join Slack
Powered by
<#4622 [Feature request] Make Flyte's All Scope co...
# flyte-github
c
cuddly-jelly-27016
05/31/2025, 12:10 AM
#4622 [Feature request] Make Flyte's All Scope configurable
Issue created by
givanovexpe
### Describe the bug In Flyte Admin we have a hardcoded OAuth2 token scope called "all". It's a remnant from the initial implementation of OAuth2 in flyte when there was a plan to intrioduce some lightweight RBAC in flyte. "All" scope was meant to be given to admin users. However RBAC was never implemented, but the "all" scope remained. It requires creating a custom authorization server in Okta, and this cannot always be done. Here is a tech overview of where we use it. We configure the PluginRegistry with Blanket Authorization:
https://github.com/flyteorg/flyte/blob/master/flyteadmin/pkg/server/service.go#L80
In the BlanketAuthorization function we check if the identity context has ScopeAll
https://github.com/flyteorg/flyte/blob/master/flyteadmin/auth/interceptor.go#L21
which is currently set to “all”
https://github.com/flyteorg/flyte/blob/master/flyteadmin/auth/constants.go#L24
For the userauth path (i.e. from the flyteconsole) we autoinject the “all” scope in the context created from the id_token, i.e the console/admin app using the flyteconsole okta app with openid,profile scopes.
https://github.com/flyteorg/flyte/blob/master/flyteadmin/auth/token.go#L134
https://github.com/flyteorg/flyte/blob/master/flyteadmin/auth/handlers.go#L283
But for the identity context created from access_token we don’t, so unless we have the “all” scope returned from okta as we have hardcoded the check in the admin, we will fail the client with “authenticated user doesn’t have required scope”
https://github.com/flyteorg/flyte/blob/master/flyteadmin/auth/handlers.go#L276
https://github.com/flyteorg/flyte/blob/master/flyteadmin/auth/token.go#L75
### Expected behavior The all scope should be dropped altogether (since there is no RBAC defined anyway) or should be made configurable, i.e. the value can be something else, for instance "profile". Thus we can connect Flyte with Okta for appAuth. ### Additional context to reproduce
No response
### Screenshots
No response
### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes
flyteorg/flyte
cuddly-jelly-27016
05/31/2025, 12:10 AM
#4622 [Feature request] Make Flyte's All Scope configurable
Issue closed as not planned by
github-actions[bot]
flyteorg/flyte
Open in Slack
Previous
Next