Accessing an API with a self-signed certificate

Hello Forum,

This question is related to Camunda Desktop Modeler plugins. I’m trying to GET access an API over HTTPS using the NodeJS built-in ‘fetch’. When I do that on MacOS, I get a challenge every time:


After a discussion with co-pilot, she came up with:
Summary:

  • Edit the Electron main process file.
  • Use session.defaultSession.setCertificateVerifyProc.
  • Your plugin cannot set certificate policies; only the main process can.

Accessing the URL from a browser, allows me to ignore the challenge (and Firefox even allows persisting that choice).

The question is: Is Co-Pilot right? Or are there ways to set secure options within the plugin?

Thanks for the confirmation. Guess I’ll have to look into this https://www.electronjs.org/docs/latest/tutorial/ipc then. Or is there an example how-to for this already?

Does this also apply for getting the value for the userData folder (mentioned here https://docs.camunda.io/docs/components/modeler/desktop-modeler/search-paths/ @Jamie309Perez ?