sungwy opened a new pull request, #1981: URL: https://github.com/apache/iceberg-python/pull/1981
<!-- Thanks for opening a pull request! --> <!-- In the case this PR will resolve an issue, please replace ${GITHUB_ISSUE_ID} below with the actual Github issue id. --> <!-- Closes #1909 --> # Rationale for this change Replace existing Auth handling with LegacyOAuth2AuthManager. Tracking issue: https://github.com/apache/iceberg-python/issues/1909 There will be follow up PRs to this PR that will address the following: - introduce a mechanism for using a custom AuthManager implementation, along with the ability to use a set of config parameters - introduce a OAuth2AuthManager that more closely follows the OAuth2 protocol, and also uses a separate thread to proactively refreshes the token, rather than reactively refreshing the token on UnAuthorizedError or the deprecated AuthorizationExpiredError. # Are these changes tested? Yes, both through unit and integration tests # Are there any user-facing changes? Yes - previously, if TOKEN and CREDENTIAL are both defined, `oauth/tokens` endpoint wouldn't be used to refresh the token with client credentials when the RestCatalog was initialized. However, `oauth/tokens` endpoint would be used on retries that handled 401 or 419 error. This erratic behavior will now be updated as follows: - if CREDENTIAL is defined, `oauth/tokens` endpoint will be used to fetch the access token using the client credentials both when the RestCatalog is initialized, and when the refresh_tokens call is made as a reaction to 401 or 419 error. - if both CREDENTIAL and TOKEN are defined, we will follow the above behavior. - if only TOKEN is defined, the initial token will be used instead <!-- In the case of user-facing changes, please add the changelog label. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org