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:
Adrian Kumpf
2022-02-18 17:03:13 +01:00
committed by GitHub
parent d461292bc4
commit 0d6e288c70
37 changed files with 2629 additions and 1867 deletions
+2 -1
View File
@@ -60,7 +60,8 @@ defmodule TeslaMate.MixProject do
{:timex, "~> 3.0"},
{:tortoise, "~> 0.10"},
{:tzdata, "~> 1.1"},
{:websockex, "~> 0.4"}
{:websockex, "~> 0.4"},
{:cloak_ecto, "~> 1.2"}
]
end