fix: use system secret config if generator type does not exist on instance (#6420)

* fix: use system secret config if generator type does not exist on instance

* remove unused idGenerator

(cherry picked from commit cbd2ef0612)
This commit is contained in:
Livio Spring
2023-08-23 10:18:27 +02:00
parent 22af4dcd97
commit 85194666ff
8 changed files with 195 additions and 42 deletions
+19 -18
View File
@@ -33,24 +33,12 @@ const (
)
type InstanceSetup struct {
zitadel ZitadelConfig
idGenerator id.Generator
InstanceName string
CustomDomain string
DefaultLanguage language.Tag
Org InstanceOrgSetup
SecretGenerators struct {
PasswordSaltCost uint
ClientSecret *crypto.GeneratorConfig
InitializeUserCode *crypto.GeneratorConfig
EmailVerificationCode *crypto.GeneratorConfig
PhoneVerificationCode *crypto.GeneratorConfig
PasswordVerificationCode *crypto.GeneratorConfig
PasswordlessInitCode *crypto.GeneratorConfig
DomainVerification *crypto.GeneratorConfig
OTPSMS *crypto.GeneratorConfig
OTPEmail *crypto.GeneratorConfig
}
zitadel ZitadelConfig
InstanceName string
CustomDomain string
DefaultLanguage language.Tag
Org InstanceOrgSetup
SecretGenerators *SecretGenerators
PasswordComplexityPolicy struct {
MinLength uint64
HasLowercase bool
@@ -126,6 +114,19 @@ type InstanceSetup struct {
}
}
type SecretGenerators struct {
PasswordSaltCost uint
ClientSecret *crypto.GeneratorConfig
InitializeUserCode *crypto.GeneratorConfig
EmailVerificationCode *crypto.GeneratorConfig
PhoneVerificationCode *crypto.GeneratorConfig
PasswordVerificationCode *crypto.GeneratorConfig
PasswordlessInitCode *crypto.GeneratorConfig
DomainVerification *crypto.GeneratorConfig
OTPSMS *crypto.GeneratorConfig
OTPEmail *crypto.GeneratorConfig
}
type ZitadelConfig struct {
projectID string
mgmtAppID string