<#3486 [BUG] - Flytekit - Auth for locally defined...
# flyte-github
a
#3486 [BUG] - Flytekit - Auth for locally defined scopes Issue created by franco-bocci Describe the bug Locally defined scopes are ignored and others are used which depend on the
authType
. This is the remote client config being used which is called here (and maybe in some other places) When this function is called, it receives 2 configs. The one we define (the PlatformConfig), and that RemoteStoreConfig I just linked. scopes passed from the PlatformConfig are 100% ignored, and the ones defined in that RemoteClientConfigStore.get_client_config are used, which are [offline, all] Expected behavior The scopes used for auth should be the ones defined locally. Additional context to reproduce
Copy code
admin:
  endpoint: dns:///console.flyte.dev.foo.bar.com
  insecure: false
  authType: ClientSecret
  clientId: github-client
  clientSecretLocation: /etc/secrets/client_secret
  scopes: ["all"]
Copy code
from flytekit.configuration import Config
from flytekit.remote import FlyteRemote


def get_latest_workflow_version(project, domain, workflow):
    cfg = Config.auto(config_file=path)
    remote = FlyteRemote(cfg)
    wf_version = remote.fetch_workflow(project, domain, workflow).id.version
    return wf_version
That will use
['offline', 'all']
as the auth scopes, and not
all
as expected. Screenshots No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte