cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Schema Registry certificate auth with Unity Catalog volumes.

EDDatabricks
Contributor

Greetings.

We currently have a Spark structured streaming job (Scala) retrieving avro data from an Azure Eventhub with a confluent schema registry endpoint (using an Azure Api Management gateway with certificate authentication).

Until now the .jks files used by the Databricks consumer were retrieved by mounting the storage account into the Databricks workspace while configuring the from_avro() options as follows:

 

val fromAvroOptions = new java.util.HashMap[String, String]()
fromAvroOptions.put("mode", "PERMISSIVE")
fromAvroOptions.put("confluent.schema.registry.ssl.truststore.location", "/dbfs/mnt/keystores/Client_Cert.truststore.jks")
fromAvroOptions.put("confluent.schema.registry.ssl.truststore.password", truststorePass)
fromAvroOptions.put("confluent.schema.registry.ssl.keystore.location", "/dbfs/mnt/keystores/Client_Cert.keystore.jks")
fromAvroOptions.put("confluent.schema.registry.ssl.keystore.password", keystorePass)
fromAvroOptions.put("confluent.schema.registry.ssl.key.password", keyPass)

 

We decided to migrate the storage account to Unity Catalog external volumes in order to access the .jks files (ref), which is supposed to work.

The initial handshake and authentication is achieved and a successful request is logged to the APIM logs:

success.png

success2.png

However while trying to display the data the following error occurs:

error1.png

The compute configuration we used is the following:

Unity Catalog enabled single user access cluster (single node 14.3 LTS)

+ com.microsoft.azure:azure-eventhubs-spark_2.12:2.3.22.

Full privileges have also be granted on the catalog/schema/volume levels on the user.

When attempting to read the data with a kafka consumer no exception is thrown, but it is logged in the log4j output while not being able to decode any messages:

e2.png

Using a Shared cluster with 15.4 LTS seems to yield similar errors.

Any help would be appreciated. Thanks in advance.

 

 

0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group