-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: removed unused sections * Update book/src/ui-authentication.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com> * feat: added more information about features and screenshots * Update book/src/ui-usage.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com> * Update book/src/ui-usage.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com> * Update book/src/ui-usage.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com> * Update book/src/ui-usage.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com> * Update book/src/ui-usage.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com> * Update book/src/ui-installation.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com> * Update book/src/ui-usage.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com> * Update ui-usage.md * Update ui-faqs.md * fix: lint fixes * Update ui-usage.md * Update book/src/ui-usage.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com> * Update book/src/ui-usage.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com> * Update book/src/ui-usage.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com> * add siren's ssl certificate usage to `book` * update `ui` docs * lint fixes * Update book/src/ui-installation.md Co-authored-by: chonghe <44791194+chong-he@users.noreply.github.com>
- Loading branch information
1 parent
10445f3
commit 9a53f4d
Showing
13 changed files
with
100 additions
and
177 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,13 @@ | ||
# Authentication | ||
|
||
To enhance the security of your account, we offer the option to set a session password. This allows the user to avoid re-entering the api-token when performing critical mutating operations on the validator. Instead a user can simply enter their session password. In the absence of a session password, Siren will revert to the api-token specified in your configuration settings as the default security measure. | ||
## Siren Session | ||
|
||
> This does not protect your validators from unauthorized device access. | ||
For enhanced security, Siren will require users to authenticate with their session password to access the dashboard. This is crucial because Siren now includes features that can permanently alter the status of user validators. The session password must be set during the [installation](./ui-installation.md) process before running the Docker or local build, either in an `.env` file or via Docker flags. | ||
|
||
![authentication](imgs/ui-session-auth.png) | ||
|
||
Session passwords must contain at least: | ||
|
||
- 12 characters | ||
- 1 lowercase letter | ||
- 1 uppercase letter | ||
- 1 number | ||
- 1 special character | ||
![exit](imgs/ui-session.png) | ||
|
||
## Protected Actions | ||
|
||
Prior to executing any sensitive validator action, Siren will request authentication of the session password or api-token. | ||
|
||
![exit](imgs/ui-exit.png) | ||
|
||
In the event of three consecutive failed attempts, Siren will initiate a security measure by locking all actions and prompting for configuration settings to be renewed to regain access to these features. | ||
|
||
![fail-authentication](imgs/ui-fail-auth.png) | ||
|
||
## Auto Connect | ||
|
||
In the event that auto-connect is enabled, refreshing the Siren application will result in a prompt to authenticate the session password or api-token. If three consecutive authentication attempts fail, Siren will activate a security measure by locking the session and prompting for configuration settings to be reset to regain access. | ||
Prior to executing any sensitive validator action, Siren will request authentication of the session password. If you wish to update your password please refer to the Siren [installation process](./ui-installation.md). | ||
|
||
![autoconnect](imgs/ui-autoconnect-auth.png) | ||
![exit](imgs/ui-auth.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,113 +1,73 @@ | ||
# 📦 Installation | ||
|
||
Siren runs on Linux, MacOS and Windows. | ||
Siren supports any operating system that supports container runtimes and/or NodeJS 18, this includes Linux, MacOS, and Windows. The recommended way of running Siren is by launching the [docker container](https://hub.docker.com/r/sigp/siren) , but running the application directly is also possible. | ||
|
||
## Version Requirement | ||
|
||
The Siren app requires Lighthouse v3.5.1 or higher to function properly. These versions can be found on the [releases](https://github.com/sigp/lighthouse/releases) page of the Lighthouse repository. | ||
To ensure proper functionality, the Siren app requires Lighthouse v4.3.0 or higher. You can find these versions on the [releases](https://github.com/sigp/lighthouse/releases) page of the Lighthouse repository. | ||
|
||
## Pre-Built Electron Packages | ||
## Running the Docker container (Recommended) | ||
|
||
There are pre-compiled electron packages for each operating systems which can | ||
be downloaded and executed. These can be found on the | ||
[releases](https://github.com/sigp/siren/releases) page of the | ||
Siren repository. | ||
The most convenient way to run Siren is to use the Docker images built and published by Sigma Prime. | ||
|
||
Simply download the package specific to your operating system and run it. | ||
They can be found on [Docker hub](https://hub.docker.com/r/sigp/siren/tags), or pulled directly with `docker pull sigp/siren` | ||
|
||
## Building From Source | ||
|
||
### Requirements | ||
|
||
Building from source requires `Node v18` and `yarn`. | ||
|
||
### Building From Source | ||
|
||
The electron app can be built from source by first cloning the repository and | ||
entering the directory: | ||
|
||
``` | ||
git clone https://github.com/sigp/siren.git | ||
cd siren | ||
``` | ||
Configuration is done through environment variables, the easiest way to get started is by copying `.env.example` to `.env` and editing the relevant sections (typically, this would at least include adding `BEACON_URL`, `VALIDATOR_URL`, `API_TOKEN` and `SESSION_PASSWORD`) | ||
|
||
Once cloned, the electron app can be built and ran via the Makefile by: | ||
|
||
``` | ||
make | ||
``` | ||
|
||
alternatively it can be built via: | ||
Then to run the image: | ||
|
||
``` | ||
yarn | ||
``` | ||
`docker compose up` | ||
or | ||
`docker run --rm -ti --name siren -p 4443:443 --env-file $PWD/.env sigp/siren` | ||
|
||
Once completed successfully the electron app can be run via: | ||
This command will open port 4443, allowing your browser to connect. | ||
|
||
``` | ||
yarn dev | ||
``` | ||
To start Siren, visit `https://localhost:4443` in your web browser. | ||
|
||
### Running In The Browser | ||
Advanced users can mount their own certificates, see the `SSL Certificates` section below | ||
|
||
#### Docker (Recommended) | ||
## Building From Source | ||
|
||
Docker is the recommended way to run a webserver that hosts Siren and can be | ||
connected to via a web browser. We recommend this method as it establishes a | ||
production-grade web-server to host the application. | ||
### Docker | ||
|
||
`docker` is required to be installed with the service running. | ||
The docker image can be built with the following command: | ||
`docker build -f Dockerfile -t siren .` | ||
|
||
The docker image can be built and run via the Makefile by running: | ||
### Building locally | ||
|
||
``` | ||
make docker | ||
``` | ||
To build from source, ensure that your system has `Node v18.18` and `yarn` installed. | ||
|
||
Alternatively, to run with Docker, the image needs to be built. From the repository directory | ||
run: | ||
#### Build and run the backend | ||
|
||
``` | ||
docker build -t siren . | ||
``` | ||
Navigate to the backend directory `cd backend`. Install all required Node packages by running `yarn`. Once the installation is complete, compile the backend with `yarn build`. Deploy the backend in a production environment, `yarn start:production`. This ensures optimal performance. | ||
|
||
Then to run the image: | ||
#### Build and run the frontend | ||
|
||
``` | ||
docker run --rm -ti --name siren -p 80:80 siren | ||
``` | ||
After initializing the backend, return to the root directory. Install all frontend dependencies by executing `yarn`. Build the frontend using `yarn build`. Start the frontend production server with `yarn start`. | ||
|
||
This will open port 80 and allow your browser to connect. You can choose | ||
another local port by modifying the command. For example `-p 8000:80` will open | ||
port 8000. | ||
This will allow you to access siren at `http://localhost:3000` by default. | ||
|
||
To view Siren, simply go to `http://localhost` in your web browser. | ||
## Advanced configuration | ||
|
||
#### Development Server | ||
### About self-signed SSL certificates | ||
|
||
A development server can also be built which will expose a local port 3000 via: | ||
By default, Siren will generate and use a self-signed certificate on startup. | ||
This will generate a security warning when you try to access the interface. | ||
We recommend to only disable SSL if you would access Siren over a local LAN or otherwise highly trusted or encrypted network (i.e. VPN). | ||
|
||
``` | ||
yarn start | ||
``` | ||
#### Generating persistent SSL certificates and installing them to your system | ||
|
||
Once executed, you can direct your web browser to the following URL to interact | ||
with the app: | ||
[mkcert](https://github.com/FiloSottile/mkcert) is a tool that makes it super easy to generate a self-signed certificate that is trusted by your browser. | ||
|
||
``` | ||
http://localhost:3000 | ||
``` | ||
To use it for `siren`, install it following the instructions. Then, run `mkdir certs; mkcert -cert-file certs/cert.pem -key-file certs/key.pem 127.0.0.1 localhost` (add or replace any IP or hostname that you would use to access it at the end of this command) | ||
|
||
A production version of the app can be built via | ||
The nginx SSL config inside Siren's container expects 3 files: `/certs/cert.pem` `/certs/key.pem` `/certs/key.pass`. If `/certs/cert.pem` does not exist, it will generate a self-signed certificate as mentioned above. If `/certs/cert.pem` does exist, it will attempt to use your provided or persisted certificates. | ||
|
||
``` | ||
yarn build | ||
``` | ||
### Configuration through environment variables | ||
|
||
and then further hosted via a production web server. | ||
For those who prefer to use environment variables to configure Siren instead of using an `.env` file, this is fully supported. In some cases this may even be preferred. | ||
|
||
### Known Issues | ||
#### Docker installed through `snap` | ||
|
||
If you experience any issues in running the UI please create an issue on the | ||
[Lighthouse UI](https://github.com/sigp/lighthouse-ui) repository. | ||
If you installed Docker through a snap (i.e. on Ubuntu), Docker will have trouble accessing the `.env` file. In this case it is highly recommended to pass the config to the container with environment variables. | ||
Note that the defaults in `.env.example` will be used as fallback, if no other value is provided. |
Oops, something went wrong.