From c1611114d07527162e3e841deb78627edc4b08fc Mon Sep 17 00:00:00 2001 From: mstar Date: Mon, 31 Mar 2025 17:11:02 +0200 Subject: [PATCH] Add encryption key to storage config --- config/config.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index a9b70a4..dd3ebb3 100644 --- a/config/config.go +++ b/config/config.go @@ -4,9 +4,9 @@ import ( "fmt" "os" + "git.mstar.dev/mstar/goutils/other" "github.com/BurntSushi/toml" "github.com/rs/zerolog/log" - "git.mstar.dev/mstar/goutils/other" ) type ConfigSSL struct { @@ -68,6 +68,9 @@ type ConfigStorage struct { MaxInMemoryCacheTTL int `toml:"max_in_memory_cache_ttl"` // The time to live for items in redis, in seconds MaxRedisCacheTTL *int `toml:"max_redis_cache_ttl"` + // Key used for encrypting sensitive information in the db + // DO NOT CHANGE THIS AFTER SETUP + EncryptionKey string `toml:"encryption_key"` } type ConfigS3 struct { @@ -145,6 +148,7 @@ var defaultConfig Config = Config{ MaxInMemoryCacheSize: 1e6, // 1 Megabyte MaxInMemoryCacheTTL: 5, MaxRedisCacheTTL: nil, + EncryptionKey: "Encryption key for sensitive information. DO NOT CHANGE THIS AFTER SETUP", }, Mail: ConfigMail{ Host: "localhost",