mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-02 11:39:12 +00:00
fix(ssl): Update SSLManager to use dynamic schema registry paths (#23505)
This commit is contained in:
parent
e058c5393e
commit
d94b39f6f5
@ -224,11 +224,17 @@ class SSLManager:
|
||||
"ssl.key.location": getattr(self, "key_consumer_config", None),
|
||||
"ssl.certificate.location": getattr(self, "cert_consumer_config", None),
|
||||
}
|
||||
connection.schemaRegistryConfig["ssl.ca.location"] = self.ca_file_path
|
||||
connection.schemaRegistryConfig["ssl.key.location"] = self.key_file_path
|
||||
connection.schemaRegistryConfig[
|
||||
"ssl.certificate.location"
|
||||
] = self.cert_file_path
|
||||
if connection.schemaRegistrySSL:
|
||||
connection.schemaRegistryConfig["ssl.ca.location"] = getattr(
|
||||
self, "ca_schema_registry", None
|
||||
)
|
||||
|
||||
connection.schemaRegistryConfig["ssl.key.location"] = getattr(
|
||||
self, "key_schema_registry", None
|
||||
)
|
||||
connection.schemaRegistryConfig["ssl.certificate.location"] = getattr(
|
||||
self, "cert_schema_registry", None
|
||||
)
|
||||
return connection
|
||||
|
||||
@setup_ssl.register(CassandraConnection)
|
||||
|
||||
@ -125,6 +125,21 @@ class KafkaSourceSSLTest(TestCase):
|
||||
kafka_source_with_ssl.service_connection.schemaRegistrySSL.root.sslCertificate.get_secret_value(),
|
||||
"sslCertificateData",
|
||||
)
|
||||
self.assertIsNotNone(
|
||||
kafka_source_with_ssl.service_connection.schemaRegistryConfig.get(
|
||||
"ssl.ca.location"
|
||||
),
|
||||
)
|
||||
self.assertIsNotNone(
|
||||
kafka_source_with_ssl.service_connection.schemaRegistryConfig.get(
|
||||
"ssl.key.location"
|
||||
),
|
||||
)
|
||||
self.assertIsNotNone(
|
||||
kafka_source_with_ssl.service_connection.schemaRegistryConfig.get(
|
||||
"ssl.certificate.location"
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class CassandraSourceSSLTest(TestCase):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user