@@ -80,7 +80,8 @@ public void autoConfigure(PropertyResolver kafkaClusterProperties,
8080 kafkaClusterProperties .getProperty ("schemaRegistrySsl.keystoreLocation" , String .class ).orElse (null ),
8181 kafkaClusterProperties .getProperty ("schemaRegistrySsl.keystorePassword" , String .class ).orElse (null ),
8282 kafkaClusterProperties .getProperty ("ssl.truststoreLocation" , String .class ).orElse (null ),
83- kafkaClusterProperties .getProperty ("ssl.truststorePassword" , String .class ).orElse (null )
83+ kafkaClusterProperties .getProperty ("ssl.truststorePassword" , String .class ).orElse (null ),
84+ kafkaClusterProperties .getProperty ("ssl.verifySsl" , Boolean .class ).orElse (true )
8485 ),
8586 kafkaClusterProperties .getProperty ("schemaRegistryKeySchemaNameTemplate" , String .class ).orElse ("%s-key" ),
8687 kafkaClusterProperties .getProperty ("schemaRegistrySchemaNameTemplate" , String .class ).orElse ("%s-value" ),
@@ -106,7 +107,8 @@ public void configure(PropertyResolver serdeProperties,
106107 serdeProperties .getProperty ("keystoreLocation" , String .class ).orElse (null ),
107108 serdeProperties .getProperty ("keystorePassword" , String .class ).orElse (null ),
108109 kafkaClusterProperties .getProperty ("ssl.truststoreLocation" , String .class ).orElse (null ),
109- kafkaClusterProperties .getProperty ("ssl.truststorePassword" , String .class ).orElse (null )
110+ kafkaClusterProperties .getProperty ("ssl.truststorePassword" , String .class ).orElse (null ),
111+ kafkaClusterProperties .getProperty ("ssl.verifySsl" , Boolean .class ).orElse (true )
110112 ),
111113 serdeProperties .getProperty ("keySchemaNameTemplate" , String .class ).orElse ("%s-key" ),
112114 serdeProperties .getProperty ("schemaNameTemplate" , String .class ).orElse ("%s-value" ),
@@ -136,7 +138,8 @@ private static SchemaRegistryClient createSchemaRegistryClient(List<String> urls
136138 @ Nullable String keyStoreLocation ,
137139 @ Nullable String keyStorePassword ,
138140 @ Nullable String trustStoreLocation ,
139- @ Nullable String trustStorePassword ) {
141+ @ Nullable String trustStorePassword ,
142+ boolean verifySsl ) {
140143 Map <String , String > configs = new HashMap <>();
141144 if (username != null && password != null ) {
142145 configs .put (BASIC_AUTH_CREDENTIALS_SOURCE , "USER_INFO" );
@@ -166,6 +169,11 @@ private static SchemaRegistryClient createSchemaRegistryClient(List<String> urls
166169 keyStorePassword );
167170 }
168171
172+ if (!verifySsl ) { // TODO block above
173+ configs .put (SchemaRegistryClientConfig .CLIENT_NAMESPACE + SslConfigs .SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG ,
174+ "" );
175+ }
176+
169177 return new CachedSchemaRegistryClient (
170178 urls ,
171179 1_000 ,
0 commit comments