mirror of
https://github.com/teslamate-org/teslamate.git
synced 2026-01-24 21:06:08 +08:00
Encrypt API tokens (#2360)
Store API tokens encrypted in the database. During the database migration a randomly generated key will be used encrypt the tokens if no ENCRYPTION_KEY environment variable was provided. If the application is started without the presence of an ENCRYPTION_KEY (or if the key failed to decrypt the existing tokens), the UI will display a warning with further instructions.
This commit is contained in:
@@ -212,6 +212,7 @@ You should at least substitute the following details:
|
||||
- `TESLAMATEPATH` should be the path that you ran the `git clone` within.
|
||||
|
||||
```
|
||||
export ENCRYPTION_KEY="your_secure_encryption_key_here"
|
||||
export DATABASE_USER="teslamate"
|
||||
export DATABASE_PASS="your_secure_password_here"
|
||||
export DATABASE_HOST="127.0.0.1"
|
||||
@@ -229,6 +230,7 @@ $TESLAMATEPATH/_build/prod/rel/teslamate/bin/teslamate start
|
||||
The following command needs to be run once during the installation process in order to create the database schema for the TeslaMate installation:
|
||||
|
||||
```bash
|
||||
export ENCRYPTION_KEY="your_secure_encryption_key_here"
|
||||
export DATABASE_USER="teslamate"
|
||||
export DATABASE_PASS="your_secure_password_here"
|
||||
export DATABASE_HOST="127.0.0.1"
|
||||
|
||||
Reference in New Issue
Block a user