Just about all desktop containers used in finance today embed browser technology, and just about all of those use Electron to do so. Electron is an open source project that combines Chromium (the engine at the core of Chrome and Edge browsers) and NodeJS (javascript server technology) to create a very powerful and popular environment for developing desktop applications using HTML and Javascript - rather than the more traditional C++, Java, or .NET. Electron is a robust and mature open source project that is used to deliver key applications such as Visual Studio Code, Teams, Slack, and many, many others. It has considerable backing from the teams at Github (who first started the project), Microsoft, and Slack.
Because desktop applications are extremely powerful and privileged, any combination of a browser technology and a desktop technology is always a reason for concern. There is an impedance mismatch in the security bias of browsers and desktop apps. While a desktop app runs with a high level of trust which imposes a high bar at install as a mitigation, the browser runs its content with 0 trust in exchange for 0 install cost. Therefore, the most secure pattern for building applications with Electron is for your application to not load any remote content at all. In other words: have all of the HTML, Javascript, CSS, etc that your application uses installed and run anything like a website outside of your application in the default browser.
However, this pattern leaves a lot to be desired (basically, all of the benefits we’ve come to love and rely on with the web). The whole point of web-based desktop containers in FinServ, in fact, is to do 2 things that stand this Electron model for security on its head:
The crux of the issue here is that if you run content from the web in any browser, you have these basic threats:
To the above list, desktop applications using Electron or similar technologies add the following dimensions:
To summarize: the high level of why using browsers to build desktop applications is both so compelling and also constrained by risk and trade-offs between features and security. It’s easy for anyone who’s worked on a FinServ thick desktop product to understand the appeal of a technology like Electron eliminating the need for cumbersome installs, slow development cycles and even slower releases. It’s also critical for us to understand the source of risks, the responsibilities that come with them and the mitigations that are available.
Earlier iterations of Electron were not secure by default, were significantly behind the Chromium updating schedule, and required a fair amount of lift to auto-update. However, those days have long since passed. Electron has been in sync with Chromium stable releases since September of 2021, enforces critical security features by default, and any open source Electron project on Github can integrate with Github’s auto-update service for free. There are a host of other update services/projects as well that support private repos and/or non-Github repos. Including:
It can’t be stressed enough what a significant achievement the Chromium release parity is. All of us in FinTech owe a huge debt to the Electron team and especially the teams from Github and Microsoft for persevering and making it happen. Given the scale of the effort, it’s unlikely that any of the desktop container platforms in finance would be up to date with Chromium without this monumental effort from the Electron community. This kind of cooperative effort is exactly the kind of problem solving that open source excels at and I’m hoping we can see more flow of contribution from the FinServ/FinTech community back to projects like Electron - which we all benefit from.
To get your Electron app auto-updating through Github, you need to have your code signed for both Windows and Mac. This is a critical component of security for any desktop application and ensures that the code being installed has not been tampered with after the fact and if you trust the creator of the application, you can trust what you are installing. Which raises an interesting question about the meaning of code signing for desktop container platforms, where the Electron code is signed by the platform, but the application being installed is typically coming from another 3rd party that is using the platform APIs to deliver desktop functionality. If the API of the platform is sufficiently secure and limited (i.e. doesn’t allow for arbitrary execution of code, launching of external processes, or access to the hard drive) or if the platform provides a robust sandboxing and permissioning of such features (like we see in mobile ecosystems) then code signing a platform is meaningful. Otherwise, it may be more like signing a blank check.
Desktop container platforms mostly exist because of gaps in standard browsers. Application developers in finance want to build and deliver their applications via web technology and rightfully leverage the enormous advantages that this tech brings. End users want their work apps to have the same look and feel they’ve become accustomed to in the consumer web. There are simple use cases - like having a launchable icon on the desktop that have already been addressed by PWA technology in standard browsers. But significant gaps remain.
For the most part, desktop container APIs fill fall into three categories:
(see https://www.electronjs.org/docs/latest/tutorial/security)
For the Chromium Security UX team, one of the biggest security challenges on the web is providing end users with a UX that keeps them on a safe path while they go about normal interactions on the internet. Are people warned if the content on a site is potentially malicious or compromised? How do they know that the site they are on is using HTTPS? How do they know if they’ve been unexpectedly navigated to a different domain? Are permissions (for notifications for example) being asked for clearly and accurately? Can they be revoked easily after the fact? How should it identify phishing content? There is a ton of thought and work that goes into the UX in Chrome, Edge, Firefox, Safari, etc to make browsing the web tolerably safe.
The Electron-FDC3 project implements standard Electron security guidelines. All remote content is run in BrowserViews with sandboxing and no Node integration. Context Isolation is used to further protect the api from cross-site scripting. What’s more:
A perfectly secure system would do nothing, but of course, it would also have no value. Security is always a balance of risk and opportunity, costs and benefits, and features held in check by layers of mitigations.
When in doubt, using an actual browser is the best way to securely use web apps.
If you need functionality that you can’t get in a browser, look for the solution with the smallest surface area possible and that aligns to the standards of the web as closely as possible and ideally, one that is open source and built on and closely aligned with robust open source projects.
Most of all, have fun and stay safe.
Electron’s Security Tutorial: https://www.electronjs.org/docs/latest/tutorial/security:
Electron’s Auto updating Tutorial: https://www.electronjs.org/docs/latest/tutorial/updates
Chrome’s Security UX home: https://www.chromium.org/Home/chromium-security/enamel/
Electron FDC3: https://github.com/finos/electron-fdc3
Interested in FINOS open source projects? Click the link below to see how to get involved in the FINOS Community.
FINOS Good First Issues - Looking for a place to contribute? Take a look at good first issues across FINOS projects and get your feet wet in the FINOS community.
State of Open Source in Financial Services Report 2021 - Learn about what is really happening around open source in FSI.
This Week at FINOS Blog - See what is happening at FINOS each week.
FINOS Landscape - See our landscape of FINOS open source and open standard projects.
Community Calendar - Scroll through the calendar to find a meeting to join.
FINOS Slack Channels - The FINOS Slack provides our Community another public channel to discuss work in FINOS and open source in finance more generally.
Project Status Dashboard - See a live snapshot of our community contributors and activity.
Events - Check out our upcoming events or email marketing@finos.org if you'd like to partner with us or have an event idea.
FINOS Virtual "Meetups" Videos & Slides - See replays of our virtual "meetups" based around the FINOS Community and Projects since we can't all be in the same room right now.
FINOS Open Source in Finance Podcasts - Listen and subscribe to the first open source in fintech and banking podcasts for deeper dives on our virtual "meetup" and other topics.