Skip to content

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

@sungwy

Description

@sungwy

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions