I would like to propose the following enhancement to retry the failed
Flight API call and refresh the access token on encountering
FlightStatusCode.TOKEN_EXPIRED.
For example when using an implementation of CallHeaderAuthenticator
<https://github.com/apache/arrow/blob/master/java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth2/CallHeaderAuthenticator.java>
such as BearerTokenAuthenticator
<https://github.com/apache/arrow/blob/master/java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth2/BearerTokenAuthenticator.java>
and the generated access token expires and FlightClient needs to detect
that and retry the failed API call, along with the retry it needs to
refresh the expired access token rather than having each client application
write their own custom code with retry logic around this token expired
workflow.

More Details:

   - Arrow JIRA: https://issues.apache.org/jira/browse/ARROW-10671
   - Design Proposal:
   
https://docs.google.com/document/d/187DlGpIpOUPGhWvXVQEq0mXw_hdWjzzOuZp0p5qzBp0/edit?usp=sharing

Regards,
Keerat

Reply via email to