rannypop opened a new issue, #1525: URL: https://github.com/apache/arrow-java/issues/1525
### 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`, endpoints with no locations or the reuse-connection location work as today. Any other location fails the query with an `SQLException`, before a connection is opened. -- 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]
