acoustic-carpenter-78188
03/17/2023, 2:11 PMauthType.
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
admin:
endpoint: dns:///console.flyte.dev.foo.bar.com
insecure: false
authType: ClientSecret
clientId: github-client
clientSecretLocation: /etc/secrets/client_secret
scopes: ["all"]
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/flyteacoustic-carpenter-78188
04/06/2023, 12:41 AM