zitadel/internal/config/systemdefaults/system_defaults.go
Livio Amstutz 5463244376
feat: encryption keys in database (#3265)
* enable overwrite of adminUser fields in defaults.yaml

* create schema and table

* cli: create keys

* cli: create keys

* read encryptionkey from db

* merge v2

* file names

* cleanup defaults.yaml

* remove custom errors

* load encryptionKeys on start

* cleanup

* fix merge

* update system defaults

* fix error message
2022-03-14 07:55:09 +01:00

65 lines
1.2 KiB
Go

package systemdefaults
import (
"time"
"golang.org/x/text/language"
"github.com/caos/zitadel/internal/crypto"
)
type SystemDefaults struct {
DefaultLanguage language.Tag
Domain string
ZitadelDocs ZitadelDocs
SecretGenerators SecretGenerators
Multifactors MultifactorConfig
DomainVerification DomainVerification
Notifications Notifications
KeyConfig KeyConfig
}
type ZitadelDocs struct {
Issuer string
DiscoveryEndpoint string
}
type SecretGenerators struct {
PasswordSaltCost int
MachineKeySize uint32
ApplicationKeySize uint32
}
type MultifactorConfig struct {
OTP OTPConfig
}
type OTPConfig struct {
Issuer string
}
type DomainVerification struct {
VerificationGenerator crypto.GeneratorConfig
}
type Notifications struct {
Endpoints Endpoints
FileSystemPath string
}
type Endpoints struct {
InitCode string
PasswordReset string
VerifyEmail string
DomainClaimed string
PasswordlessRegistration string
}
type KeyConfig struct {
Size int
PrivateKeyLifetime time.Duration
PublicKeyLifetime time.Duration
SigningKeyRotationCheck time.Duration
SigningKeyGracefulPeriod time.Duration
}