anoopvs commented on issue #17518: URL: https://github.com/apache/iceberg/issues/17518#issuecomment-5553118974
Thanks @vbhanuchander-lang for the details. scheduleTokenRefresh is refreshing the token correctly. I have identified the issue. I was using the default constructor of RESTCatalog to create the RESTCatalog object, which meant that the SessionContext was empty (SessionContext.createEmpty()). The authManager.contextualSession only picks up the refreshed token when context.credentials() is not empty and contains the valid OAuth2 properties. I changed the implementation to use RESTCatalog(SessionCatalog.SessionContext context, Function<Map<String, String>, RESTClient> clientBuilder) instead, with the context containing the required values. After this change, I’m no longer seeing any authorization-related errors. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
