Skip to content

Rest Catalog Refresh Access Token with stored CLIENT_ID and CLIENT_SECRET #234

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

Closed
sungwy opened this issue Dec 21, 2023 · 0 comments · Fixed by #340
Closed

Rest Catalog Refresh Access Token with stored CLIENT_ID and CLIENT_SECRET #234

sungwy opened this issue Dec 21, 2023 · 0 comments · Fixed by #340

Comments

@sungwy
Copy link
Collaborator

sungwy commented Dec 21, 2023

Feature Request / Improvement

If the token fetched by PyIceberg client expires, The REST Catalog server will issue a 419 status response, which will result in a AuthorizationExpiredError.

Currently, PyIceberg only fetches the access_token using the stored CLIENT_ID and CLIENT_SECRET upon creating a new request session, which is initialized only when a new RestCatalog is initialized.

Instead of throwing an exception, we should refresh the access token by invoking self._fetch_access_token again using the stored credentials. This feature enhancement will allow a PyIceberg client to support tasks that take longer than the life time of an access token, which can be as short as a minute (depends on the security restrictions of the auth provider).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant