2020-04-23 08:43:39 +00:00
|
|
|
package systemdefaults
|
|
|
|
|
2020-05-14 09:48:57 +00:00
|
|
|
import (
|
2020-05-18 09:32:16 +00:00
|
|
|
"github.com/caos/zitadel/internal/config/types"
|
2020-05-14 09:48:57 +00:00
|
|
|
"github.com/caos/zitadel/internal/crypto"
|
2020-05-20 12:28:08 +00: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 09:40:18 +00:00
|
|
|
org_model "github.com/caos/zitadel/internal/org/model"
|
2020-05-14 09:48:57 +00:00
|
|
|
pol "github.com/caos/zitadel/internal/policy"
|
2020-06-22 11:51:44 +00:00
|
|
|
"golang.org/x/text/language"
|
2020-05-14 09:48:57 +00:00
|
|
|
)
|
2020-04-23 08:43:39 +00:00
|
|
|
|
|
|
|
type SystemDefaults struct {
|
2020-06-22 11:51:44 +00:00
|
|
|
DefaultLanguage language.Tag
|
2020-05-18 10:06:36 +00:00
|
|
|
SecretGenerators SecretGenerators
|
|
|
|
UserVerificationKey *crypto.KeyConfig
|
|
|
|
Multifactors MultifactorConfig
|
|
|
|
VerificationLifetimes VerificationLifetimes
|
|
|
|
DefaultPolicies DefaultPolicies
|
|
|
|
IamID string
|
|
|
|
SetUp types.IAMSetUp
|
2020-05-20 12:28:08 +00:00
|
|
|
Notifications Notifications
|
2020-04-23 08:43:39 +00:00
|
|
|
}
|
|
|
|
|
2020-05-11 08:16:27 +00: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 08:43:39 +00:00
|
|
|
}
|
2020-05-14 09:48:57 +00:00
|
|
|
|
2020-05-18 10:06:36 +00:00
|
|
|
type VerificationLifetimes struct {
|
|
|
|
PasswordCheck types.Duration
|
|
|
|
MfaInitSkip types.Duration
|
|
|
|
MfaSoftwareCheck types.Duration
|
|
|
|
MfaHardwareCheck types.Duration
|
|
|
|
}
|
|
|
|
|
2020-05-14 09:48:57 +00:00
|
|
|
type DefaultPolicies struct {
|
|
|
|
Age pol.PasswordAgePolicyDefault
|
|
|
|
Complexity pol.PasswordComplexityPolicyDefault
|
|
|
|
Lockout pol.PasswordLockoutPolicyDefault
|
2020-06-16 09:40:18 +00:00
|
|
|
OrgIam org_model.OrgIamPolicy
|
2020-05-14 09:48:57 +00:00
|
|
|
}
|
2020-05-20 12:28:08 +00: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
|
|
|
|
}
|