zitadel/internal/config/systemdefaults/system_defaults.go
Tim Möhlmann 4589ddad4a
feat: integrate passwap for human user password hashing (#6196)
* feat: use passwap for human user passwords

* fix tests

* passwap config

* add the event mapper

* cleanup query side and api

* solve linting errors

* regression test

* try to fix linter errors again

* pass systemdefaults into externalConfigChange migration

* fix: user password set in auth view

* pin passwap v0.2.0

* v2: validate hashed password hash based on prefix

* resolve remaining comments

* add error tag and translation for unsupported hash encoding

* fix unit test

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
2023-07-14 09:49:57 +03:00

47 lines
868 B
Go

package systemdefaults
import (
"time"
"github.com/zitadel/zitadel/internal/crypto"
)
type SystemDefaults struct {
SecretGenerators SecretGenerators
PasswordHasher crypto.PasswordHashConfig
Multifactors MultifactorConfig
DomainVerification DomainVerification
Notifications Notifications
KeyConfig KeyConfig
}
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 {
FileSystemPath string
}
type KeyConfig struct {
Size int
PrivateKeyLifetime time.Duration
PublicKeyLifetime time.Duration
CertificateSize int
CertificateLifetime time.Duration
}