fredjoonpark opened a new issue, #1526: URL: https://github.com/apache/arrow-java/issues/1526
### Describe the enhancement requested With default settings, the driver sends the user's credentials to any host a Flight SQL server names, and the application can't stop it. A server can answer any query with a `FlightInfo` whose endpoints name other hosts to fetch the results from. The driver connects to each one, sending the connection's credentials (`user`/`password`, `token`, OAuth). An encrypted connection refuses non-TLS locations, but any TLS location is still followed, and with `useEncryption=false` every location is. This happens inside the driver during query execution, and JDBC gives the application no hook to inspect or refuse the locations, so it can only be fixed here. That's a problem for applications that connect to user-controlled Flight SQL servers, such as hosted BI or query services. They validate the host they connect to, but the driver then connects wherever the server says. Exploiting it takes nothing more than a server the user controls, which is exactly what these applications connect to: - **Credential forwarding:** the server can advertise a host it controls and receive the credentials there. Any publicly trusted certificate passes with the default `useSystemTrustStore=true`. - **Server-side request forgery:** the new connections go from the application's network to unchecked hosts, including internal ones, and connection errors show what's reachable. **Proposal:** a `followEndpointLocations` property, defaulting to `true` so nothing changes for existing users. With `false`, the driver never opens a new connection for an endpoint. Endpoints with no locations, `arrow-flight-reuse-connection://?`, or a location naming the connection's own host (or `hostnameOverride`) and port are fetched over the existing connection. Any other location fails the query with an `SQLException`. -- 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]
