Skip to content

[JAVA] Client is able to connect to GRPC_TLS flight server with GRPC_INSECURE #790

@Thanzeel-Hassan-IBM

Description

@Thanzeel-Hassan-IBM

Describe the bug, including details regarding any error messages, version, and platform.

Client is able to connect to GRPC_TLS flight server with GRPC_INSECURE

Even though the flight server was created with GRPC_TLS the client is able to connect with GRPC_INSECURE

Is this by design or is it a defect ?

Note that the Client is passing the correct client certificates.

The server is created like this :

Location location = Location.forGrpcTls("localhost", serverPort);
server = FlightServer.builder(allocator, location, new TestingArrowProducer(allocator))
        .useTls(certChainFile, privateKeyFile)
        .useMTlsClientVerification(caCertFile)
        .build();

server.start()

https://github.com/prestodb/presto/blob/f19fee9c66cc984b8b2cf09d610c0f212dc55713/presto-base-arrow-flight/src/test/java/com/facebook/plugin/arrow/TestArrowFlightMtls.java#L69

In this test case file, if we change this line from

.put("arrow-flight.server-ssl-enabled", "true")
to
.put("arrow-flight.server-ssl-enabled", "false")

the test cases still pass.

command to just run the test case : ./mvnw clean install test -pl presto-base-arrow-flight -Dtest=TestArrowFlightMtls
(this requires building presto before hand)

Component(s)

Java

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions