Clone and run for a quick way to see the secure-electron-adapter in action.
This is a minimal Electron application based on the Quick Start Guide within the Electron documentation. This minimal application uses a manifest configuration file to control permissions of your application through the secure-electron-adapter.
A basic Electron application using the secure-electron-adapter needs just these files:
package.json
- Points to the app's main file and lists its details and dependencies.index.js
- Starts the app and creates a browser window to render HTML. This is the app's main process.index.html
- A web page to render. This is the app's renderer process.manifest-local.json
- A manifest that determines:- The application name
- The application URL
- Typically points to your app's renderer process
- URL path of a file that can be preloaded. An array of paths is also accepted.
- Files that are considered trusted preloads across the application.
- Anything else you need, including a list of configurations for components.
Within the public
directory, the SEA manifest manifest-local.json
is passed to SEA within index.js
and describes the following:
main
: The main application entry point. Here, all components point toindex.html
served locally using a node-based http server. Apreload
is specified to add a function on thewindow
object.components
: two additional component configs, differing in name and permissions. For brevity, all components loadindex.html
.TrustedChild
: A child window with full permissionsUntrustedChild
: A child window with some permissions removed, includingSystem.exit()
. Clicking theExit Applicaton
button on this window will result in an access denied warning logged to the console.
To clone and run this repository you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:
# Clone this repository
git clone https://github.com/finos/sea-quick-start
# Clone the secure-electron-adapter repository (which is not yet available via NPM)
git clone https://github.com/finos/secure-electron-adapter
#build SEA
cd secure-electron-adapter
npm install
# Go into the quick start repository
cd ../sea-quick-start
# Install dependencies
npm install
# Run the app
npm start
Note: If you're using Linux Bash for Windows, see this guide or use node
from the command prompt.
- Fork it (https://github.com/finos/sea-quick-start/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Read our contribution guidelines and Community Code of Conduct
- Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
NOTE: Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the FINOS Clabot tool. Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.
Need an ICLA? Unsure if you are covered under an existing CCLA? Email help@finos.org
Copyright 2018 ChartIQ
Distributed under the Apache License, Version 2.0.
SPDX-License-Identifier: Apache-2.0