2020-04-23 10:43:39 +02:00
|
|
|
package systemdefaults
|
|
|
|
|
2020-05-14 11:48:57 +02:00
|
|
|
import (
|
2020-05-18 11:32:16 +02:00
|
|
|
"github.com/caos/zitadel/internal/config/types"
|
2020-05-14 11:48:57 +02:00
|
|
|
"github.com/caos/zitadel/internal/crypto"
|
2020-05-20 14:28:08 +02:00
|
|
|
"github.com/caos/zitadel/internal/notification/providers/chat"
|
|
|
|
"github.com/caos/zitadel/internal/notification/providers/email"
|
|
|
|
"github.com/caos/zitadel/internal/notification/providers/twilio"
|
|
|
|
"github.com/caos/zitadel/internal/notification/templates"
|
2020-06-16 11:40:18 +02:00
|
|
|
org_model "github.com/caos/zitadel/internal/org/model"
|
2020-05-14 11:48:57 +02:00
|
|
|
pol "github.com/caos/zitadel/internal/policy"
|
2020-06-22 13:51:44 +02:00
|
|
|
"golang.org/x/text/language"
|
2020-05-14 11:48:57 +02:00
|
|
|
)
|
2020-04-23 10:43:39 +02:00
|
|
|
|
|
|
|
type SystemDefaults struct {
|
2020-06-22 13:51:44 +02:00
|
|
|
DefaultLanguage language.Tag
|
2020-05-18 12:06:36 +02:00
|
|
|
SecretGenerators SecretGenerators
|
|
|
|
UserVerificationKey *crypto.KeyConfig
|
|
|
|
Multifactors MultifactorConfig
|
|
|
|
VerificationLifetimes VerificationLifetimes
|
|
|
|
DefaultPolicies DefaultPolicies
|
|
|
|
IamID string
|
|
|
|
SetUp types.IAMSetUp
|
2020-05-20 14:28:08 +02:00
|
|
|
Notifications Notifications
|
2020-04-23 10:43:39 +02:00
|
|
|
}
|
|
|
|
|
2020-05-11 10:16:27 +02:00
|
|
|
type SecretGenerators struct {
|
|
|
|
PasswordSaltCost int
|
|
|
|
ClientSecretGenerator crypto.GeneratorConfig
|
|
|
|
InitializeUserCode crypto.GeneratorConfig
|
|
|
|
EmailVerificationCode crypto.GeneratorConfig
|
|
|
|
PhoneVerificationCode crypto.GeneratorConfig
|
|
|
|
PasswordVerificationCode crypto.GeneratorConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
type MultifactorConfig struct {
|
|
|
|
OTP OTPConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
type OTPConfig struct {
|
|
|
|
Issuer string
|
|
|
|
VerificationKey *crypto.KeyConfig
|
2020-04-23 10:43:39 +02:00
|
|
|
}
|
2020-05-14 11:48:57 +02:00
|
|
|
|
2020-05-18 12:06:36 +02:00
|
|
|
type VerificationLifetimes struct {
|
|
|
|
PasswordCheck types.Duration
|
|
|
|
MfaInitSkip types.Duration
|
|
|
|
MfaSoftwareCheck types.Duration
|
|
|
|
MfaHardwareCheck types.Duration
|
|
|
|
}
|
|
|
|
|
2020-05-14 11:48:57 +02:00
|
|
|
type DefaultPolicies struct {
|
|
|
|
Age pol.PasswordAgePolicyDefault
|
|
|
|
Complexity pol.PasswordComplexityPolicyDefault
|
|
|
|
Lockout pol.PasswordLockoutPolicyDefault
|
2020-06-16 11:40:18 +02:00
|
|
|
OrgIam org_model.OrgIamPolicy
|
2020-05-14 11:48:57 +02:00
|
|
|
}
|
2020-05-20 14:28:08 +02:00
|
|
|
|
|
|
|
type Notifications struct {
|
|
|
|
DebugMode bool
|
|
|
|
Endpoints Endpoints
|
|
|
|
Providers Providers
|
|
|
|
TemplateData TemplateData
|
|
|
|
}
|
|
|
|
|
|
|
|
type Endpoints struct {
|
|
|
|
InitCode string
|
|
|
|
PasswordReset string
|
|
|
|
VerifyEmail string
|
|
|
|
}
|
|
|
|
|
|
|
|
type Providers struct {
|
|
|
|
Chat chat.ChatConfig
|
|
|
|
Email email.EmailConfig
|
|
|
|
Twilio twilio.TwilioConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
type TemplateData struct {
|
|
|
|
InitCode templates.TemplateData
|
|
|
|
PasswordReset templates.TemplateData
|
|
|
|
VerifyEmail templates.TemplateData
|
|
|
|
VerifyPhone templates.TemplateData
|
|
|
|
}
|