[Java][FlightSQL][JDBC] Driver drops TLS for endpoint locations advertised by the server
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
Línea de trabajo
Comienza en ArrowFlightSqlClientHandler.getStreams y rastrea cómo las ubicaciones de los endpoints anunciados configuran los clientes clonados; inspecciona ClientHandshakeWrapper para conocer la ruta de handshake observada. Reprodúcelo con withEncryption(true), credentials y un endpoint de FlightInfo inseguro; después, añade cobertura de regresión que demuestre que el requisito de cifrado configurado no se pierde silenciosamente y que credentials no se envían mediante texto plano.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
When a query result has endpoints with non-empty locations, ArrowFlightSqlClientHandler.getStreams clones the connection's Builder and connects to each advertised location. The clone keeps username/password, token and the OAuth config, and encryption is then set from the location scheme alone:
.withEncryption(endpointUri.getScheme().equals(LocationSchemes.GRPC_TLS))
So a location with any other scheme (grpc+tcp:// in particular) turns encryption off for that endpoint client even when the connection was opened with useEncryption=true. build() then runs the handshake and sends the credentials over the plaintext channel to the advertised host.
The documented meaning of useEncryption (default true) is "Whether to use TLS (the default is an encrypted connection)", so a server-supplied string silently overriding it is surprising: a compromised or hostile Flight SQL server, or anything able to influence the FlightInfo it returns, can have the driver hand over the user's credentials in cleartext, and a passive attacker on the endpoint path can read them.
Reproduced against a handler built with withEncryption(true) plus a username/password, given a FlightInfo with one endpoint at Location.forGrpcInsecure(...): the driver attempts the connection and reaches ClientHandshakeWrapper on the unencrypted channel instead of refusing it.
arrow-flight-sql-jdbc-driver, main.
- Lenguaje dominante
- Java
- Estrellas
- 95
- Forks
- 154
- Merge medio
- 2 d 16 h
- PR fusionados (30 d)
- 9
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/arrow-java
-
Type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/arrow-java#1300 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
apache/arrow-java#1261 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/arrow-java#1236 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/arrow-java#1230 ·
-
Type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
apache/arrow-java#1205 ·
Todos los issues de apache/arrow-java
Issues similares
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Cannot differ own consent and managed consents in My Consents view and detailed consent view. Abierto1.0.0-alpha2 Type/Improvement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
wso2/dpdp-accelerator#272 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100