Plugin - custom eventing between renderer and main process

Hi,

Currently working on a plug-in which requires some interaction between the main process and the renderer process. I was aiming to simply using ipcMain, but it seems the ipcRenderer is no-longer exposed to the client, instead a “backend” wrapper is exposed. This backend has an explicit limit on the allowed events (see camunda-modeler/preload.js at b2b3be545a173d409e3d1a7f048f1400f4cec26e · camunda/camunda-modeler · GitHub)

I understand that this is due to some security concerns as mentioned here Arbitrary filesystem manipulation vulnerability introduced by IPC exposure · Issue #2143 · camunda/camunda-modeler · GitHub

However, I believe it would make sense to at least allow plug-in’s to register additional events. I don’t see any way of doing this. Any recommendations?

What exactly do you want to do in the main process? Perhaps there is a way to do it without additional events.

I am building a plug-in store. In the first proof of concept I am using npm to manage them. Hence the need to interact with the main process.

What you could do is to run a server in the background and communicate with it directly from the renderer. This is how we solved it in the dmn-testing-plugin.

It’s rather unlikely that we open up the main process API for custom events, at least in the near future.