Skip to content
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

[BUG] - Flytekit - Auth for locally defined scopes #3486

Closed
2 tasks done
franco-bocci opened this issue Mar 17, 2023 · 0 comments
Closed
2 tasks done

[BUG] - Flytekit - Auth for locally defined scopes #3486

franco-bocci opened this issue Mar 17, 2023 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@franco-bocci
Copy link

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

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
@franco-bocci franco-bocci added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Mar 17, 2023
@wild-endeavor wild-endeavor removed the untriaged This issues has not yet been looked at by the Maintainers label Apr 6, 2023
@wild-endeavor wild-endeavor added this to the 1.5.0 milestone Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants