Pavel Tupitsyn created IGNITE-23916:
---------------------------------------

             Summary: Thin 3.0: SSL error details are not propagated to the 
user code
                 Key: IGNITE-23916
                 URL: https://issues.apache.org/jira/browse/IGNITE-23916
             Project: Ignite
          Issue Type: Bug
          Components: thin client
            Reporter: Pavel Tupitsyn
            Assignee: Pavel Tupitsyn
             Fix For: 3.0


Add the following to *ItSslTest*:
{code:java}
        @Test
        @DisplayName("Client can not connect with SSL configured and invalid 
trust store password")
        void clientCanNotConnectWithSslAndInvalidTrustStorePassword() {
            var sslConfiguration =
                    SslConfiguration.builder()
                            .enabled(true)
                            .trustStorePath(trustStorePath)
                            .trustStorePassword(password + "_foo")
                            .build();

            IgniteClientConnectionException ex = 
assertThrows(IgniteClientConnectionException.class, () -> {
                try (IgniteClient ignored = 
IgniteClient.builder().addresses("localhost:10800").ssl(sslConfiguration).build())
 {
                    // no-op
                }
            });

            assertEquals("Client SSL configuration error: keystore password was 
incorrect", ex.getMessage());
        }
{code}

Result:

{code}
Expected :Client SSL configuration error: keystore password was incorrect
Actual   :Client failed to connect: null [endpoint=localhost/<unresolved>:10800]
{code}

The actual exception is not propagated to the user.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to