https://flyte.org logo
#ask-the-community
Title
# ask-the-community
t

Tommy Nam

06/28/2023, 6:40 AM
Does Flyte support the caching of M2M authorization tokens? In the context of Auth0 and external auth servers - or is this something we'll have to build out with middleware + Redis, etc?
k

Ketan (kumare3)

06/28/2023, 1:24 PM
It should cache in memory on the server. To prevent repeated queries
t

Tommy Nam

06/29/2023, 5:29 AM
Do you have any resources that might highlight how to modify/study the logic behind the access tokens/refresh tokens and its caching behaviour in the context of flytekit/pyflyte? We would like a bit more fine-grained control over the caching of access/refresh tokens if possible and to reduce the number of requests going to the external authorization server. Maybe make it a bit longer-lived - at least for our dev and test deployments @Ketan (kumare3)
k

Ketan (kumare3)

06/29/2023, 2:47 PM
This should all be controlled using refresh token expiration
It’s all in code check authentication
Infact if you have mehring it will cache across VM restarts
t

Tommy Nam

06/30/2023, 3:24 AM
EDIT: It turns out it may have to do with PKCE vs ClientCredentials in terms of auth. PKCE stores and retrieves the Keyring store object but it doesn't look like ClientCredentials caches an access token or interact with the Keyring store at all.
64 Views