acoustic-carpenter-78188
08/22/2023, 4:13 AMconfig.yaml file and will override the default behaviour for finding scopes. This is in support of Auth0 which manually requires requesting OIDC scopes in the request body - but also the idiosyncrasy wherein Auth0 does not allow custom user APIs to be assigned the OIDC scopes explicitly (This leads to an error during Flytepropeller). Our workaround prevents this behaviour and also keeps the default behaviour intact for other IDPs.
The way the scopes parameter was parsed in the token_client module was incompatible with Auth0. It is also our opinion that it was parsed incorrectly for other IDPs as well. We have changed it to match the PKCE flow's scopes parameter and things are working. Now, the refresh_token is able to be retrieved properly. (No refresh token in response in Device/CC flow before.
Also refactored the ClientCredentials + DeviceFlow to use a Credentials dataclass object and to store and retrieve this object by calling Keyring. This enables caching for Auth in both flows.
Tested over remote SSH and localhost and can confirm all three flows are working with the suggested changes.
Though we have had to make sure that Keyring was present in our environments. Absence of Keyring may lead to errors using ClientCredentials + DeviceFlow.
Feedback is welcome.
Tracking Issue
https://github.com/flyteorg/flyte/issues/
Follow-up issue
NA
OR
https://github.com/flyteorg/flyte/issues/
flyteorg/flytekit
GitHub Actions: build-plugins
GitHub Actions: build (macos-latest, 3.11)
GitHub Actions: build (macos-latest, 3.10)
GitHub Actions: build (macos-latest, 3.9)
GitHub Actions: build (macos-latest, 3.8)
GitHub Actions: build (windows-latest, 3.11)
GitHub Actions: build (windows-latest, 3.9)
GitHub Actions: build (windows-latest, 3.8)
GitHub Actions: build (ubuntu-latest, 3.11)
GitHub Actions: build (ubuntu-latest, 3.10)
GitHub Actions: build (ubuntu-latest, 3.9)
GitHub Actions: build (ubuntu-latest, 3.8)
GitHub Actions: lint
✅ 4 other checks have passed
4/17 successful checks