cancel
Showing results for 
Search instead for 
Did you mean: 
Generative AI
Explore discussions on generative artificial intelligence techniques and applications within the Databricks Community. Share ideas, challenges, and breakthroughs in this cutting-edge field.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks app services

Daya3189
New Contributor II

Hi- I have built node.js based chatbot app that uses Azure OpenAI API to build connection and get query answers from it. I am using my organization deployed API on azure that requires cert.pem and cacert.pem certificates to authenticate. everything is working fine on my local system but when I deployed it on Databricks apps , I am getting error as below-

[cause]: Error: unable to get local issuer certificate at TLSSocket.onConnectSecure (node:_tls_wrap:1679:34) at TLSSocket.emit (node:events:518:28) at TLSSocket._finishInit (node:_tls_wrap:1078:8) at ssl.onhandshakedone (node:_tls_wrap:864:12) { code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'

I dont know where to load the certificates. can anyone help me please?

1 REPLY 1

stbjelcevic
Databricks Employee
Databricks Employee

Hi @Daya3189 ,

Your local system likely has the organization's certificates installed in the Windows/Mac system trust store, which Node.js (or your browser) can read.

On Databricks, the app runs in a secure, isolated Linux container. It has no knowledge of your organization's certificates unless you explicitly provide the file and the map to an environment variable (NODE_EXTRA_CA_CERTS) in your app bundle.

You can create a certs directory at the root of your project, and put the cacert.pem file in the directory.

Then in app.yaml, you would add something like this to set the environment variable to the path of the certificate:

env:
  - name: NODE_EXTRA_CA_CERTS
    value: ./certs/cacert.pem