Add encryption key to storage config
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Melody Becker 2025-03-31 17:11:02 +02:00
parent 4c8ebaeab8
commit c1611114d0
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI

View file

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"os" "os"
"git.mstar.dev/mstar/goutils/other"
"github.com/BurntSushi/toml" "github.com/BurntSushi/toml"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"git.mstar.dev/mstar/goutils/other"
) )
type ConfigSSL struct { type ConfigSSL struct {
@ -68,6 +68,9 @@ type ConfigStorage struct {
MaxInMemoryCacheTTL int `toml:"max_in_memory_cache_ttl"` MaxInMemoryCacheTTL int `toml:"max_in_memory_cache_ttl"`
// The time to live for items in redis, in seconds // The time to live for items in redis, in seconds
MaxRedisCacheTTL *int `toml:"max_redis_cache_ttl"` 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 { type ConfigS3 struct {
@ -145,6 +148,7 @@ var defaultConfig Config = Config{
MaxInMemoryCacheSize: 1e6, // 1 Megabyte MaxInMemoryCacheSize: 1e6, // 1 Megabyte
MaxInMemoryCacheTTL: 5, MaxInMemoryCacheTTL: 5,
MaxRedisCacheTTL: nil, MaxRedisCacheTTL: nil,
EncryptionKey: "Encryption key for sensitive information. DO NOT CHANGE THIS AFTER SETUP",
}, },
Mail: ConfigMail{ Mail: ConfigMail{
Host: "localhost", Host: "localhost",