diff options
author | Julien Dessaux | 2024-11-16 00:36:17 +0100 |
---|---|---|
committer | Julien Dessaux | 2024-11-16 00:36:17 +0100 |
commit | 5b6da560896970c610c691dff6ed052a57ed5a1d (patch) | |
tree | 7ec12f39943513230659d3068d59e8687770f053 /pkg/database/sql/000_init.sql | |
parent | fix(tfstated): return 403 Forbidden on non existent account (diff) | |
download | tfstated-5b6da560896970c610c691dff6ed052a57ed5a1d.tar.gz tfstated-5b6da560896970c610c691dff6ed052a57ed5a1d.tar.bz2 tfstated-5b6da560896970c610c691dff6ed052a57ed5a1d.zip |
fix(tfstated): hash passwords instead of relying on the database encryption key
Diffstat (limited to 'pkg/database/sql/000_init.sql')
-rw-r--r-- | pkg/database/sql/000_init.sql | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/database/sql/000_init.sql b/pkg/database/sql/000_init.sql index c56473f..b635442 100644 --- a/pkg/database/sql/000_init.sql +++ b/pkg/database/sql/000_init.sql @@ -5,7 +5,8 @@ CREATE TABLE schema_version ( CREATE TABLE accounts ( id INTEGER PRIMARY KEY, username TEXT NOT NULL, - password BLOB NOT NULL, + salt BLOB NOT NULL, + password_hash BLOB NOT NULL, is_admin INTEGER NOT NULL DEFAULT FALSE, created INTEGER NOT NULL DEFAULT (unixepoch()), last_login INTEGER NOT NULL DEFAULT (unixepoch()), |