scruz-denodo opened a new pull request, #43155: URL: https://github.com/apache/arrow/pull/43155
### Rationale for this change Give access to information about the requests executing the current action to the authentication processs and middlewares. Adding for now the client and server socket addresses. This can be useful for checking client origin at authentication phase and to audit accesses on a custom middleware. ### What changes are included in this PR? Create the class `org.apache.arrow.flight.RequestInfo` for storing the information. This `RequestInfo` is also available through `org.apache.arrow.flight.CallInfo`. By this way, it is available for the middlewares. Make also available `RequestInfo` to the `CallHeaderAuthenticator`, `BearerTokenAuthenticator` and `ServerCallHeaderAuthMiddleware`. I overloaded the methods: - `org.apache.arrow.flight.auth2.CallHeaderAuthenticator#authenticate(org.apache.arrow.flight.CallHeaders, org.apache.arrow.flight.RequestInfo)` - `org.apache.arrow.flight.auth2.BearerTokenAuthenticator#validateBearer(java.lang.String, org.apache.arrow.flight.RequestInfo)` with a default implementation for maintaining backward compatibility and not breaking previous implementations. ### Are these changes tested? Tested manually after generated the artifacts with the changes. For now, there are no automated tests until checking if the changes are suitable. -- 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]
