2020-04-23 08:43:39 +00:00
|
|
|
package systemdefaults
|
|
|
|
|
2020-05-14 09:48:57 +00:00
|
|
|
import (
|
2022-02-14 16:22:30 +00:00
|
|
|
"time"
|
|
|
|
|
2020-08-06 13:03:03 +00:00
|
|
|
"golang.org/x/text/language"
|
|
|
|
|
2020-05-14 09:48:57 +00:00
|
|
|
"github.com/caos/zitadel/internal/crypto"
|
2022-01-06 08:00:24 +00:00
|
|
|
"github.com/caos/zitadel/internal/notification/channels/chat"
|
|
|
|
"github.com/caos/zitadel/internal/notification/channels/fs"
|
2022-02-14 16:22:30 +00:00
|
|
|
"github.com/caos/zitadel/internal/notification/channels/log"
|
2022-01-06 08:00:24 +00:00
|
|
|
"github.com/caos/zitadel/internal/notification/channels/twilio"
|
2020-05-20 12:28:08 +00:00
|
|
|
"github.com/caos/zitadel/internal/notification/templates"
|
2020-05-14 09:48:57 +00:00
|
|
|
)
|
2020-04-23 08:43:39 +00:00
|
|
|
|
|
|
|
type SystemDefaults struct {
|
2022-02-16 15:49:17 +00:00
|
|
|
DefaultLanguage language.Tag
|
|
|
|
Domain string
|
|
|
|
ZitadelDocs ZitadelDocs
|
|
|
|
SecretGenerators SecretGenerators
|
|
|
|
UserVerificationKey *crypto.KeyConfig
|
|
|
|
IDPConfigVerificationKey *crypto.KeyConfig
|
|
|
|
SMTPPasswordVerificationKey *crypto.KeyConfig
|
2022-02-21 12:22:20 +00:00
|
|
|
SMSVerificationKey *crypto.KeyConfig
|
2022-02-16 15:49:17 +00:00
|
|
|
Multifactors MultifactorConfig
|
|
|
|
DomainVerification DomainVerification
|
|
|
|
Notifications Notifications
|
|
|
|
KeyConfig KeyConfig
|
2020-04-23 08:43:39 +00:00
|
|
|
}
|
|
|
|
|
2020-07-22 14:15:11 +00:00
|
|
|
type ZitadelDocs struct {
|
|
|
|
Issuer string
|
|
|
|
DiscoveryEndpoint string
|
|
|
|
}
|
|
|
|
|
2020-05-11 08:16:27 +00:00
|
|
|
type SecretGenerators struct {
|
2022-02-16 15:49:17 +00:00
|
|
|
PasswordSaltCost int
|
|
|
|
MachineKeySize uint32
|
|
|
|
ApplicationKeySize uint32
|
2020-05-11 08:16:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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-08-06 13:03:03 +00:00
|
|
|
type DomainVerification struct {
|
|
|
|
VerificationKey *crypto.KeyConfig
|
|
|
|
VerificationGenerator crypto.GeneratorConfig
|
|
|
|
}
|
|
|
|
|
2020-05-20 12:28:08 +00:00
|
|
|
type Notifications struct {
|
2022-02-16 15:49:17 +00:00
|
|
|
DebugMode bool
|
|
|
|
Endpoints Endpoints
|
|
|
|
Providers Channels
|
2020-05-20 12:28:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Endpoints struct {
|
2021-08-02 13:24:58 +00:00
|
|
|
InitCode string
|
|
|
|
PasswordReset string
|
|
|
|
VerifyEmail string
|
|
|
|
DomainClaimed string
|
|
|
|
PasswordlessRegistration string
|
2020-05-20 12:28:08 +00:00
|
|
|
}
|
|
|
|
|
2022-01-06 08:00:24 +00:00
|
|
|
type Channels struct {
|
|
|
|
Chat chat.ChatConfig
|
|
|
|
Twilio twilio.TwilioConfig
|
|
|
|
FileSystem fs.FSConfig
|
|
|
|
Log log.LogConfig
|
2020-05-20 12:28:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type TemplateData struct {
|
|
|
|
InitCode templates.TemplateData
|
|
|
|
PasswordReset templates.TemplateData
|
|
|
|
VerifyEmail templates.TemplateData
|
|
|
|
VerifyPhone templates.TemplateData
|
2020-08-27 15:18:23 +00:00
|
|
|
DomainClaimed templates.TemplateData
|
2020-05-20 12:28:08 +00:00
|
|
|
}
|
2020-12-02 16:00:04 +00:00
|
|
|
|
2021-02-12 15:51:12 +00:00
|
|
|
type KeyConfig struct {
|
2021-02-23 07:32:00 +00:00
|
|
|
Size int
|
2022-02-14 16:22:30 +00:00
|
|
|
PrivateKeyLifetime time.Duration
|
|
|
|
PublicKeyLifetime time.Duration
|
|
|
|
SigningKeyRotationCheck time.Duration
|
|
|
|
SigningKeyGracefulPeriod time.Duration
|
2021-02-12 15:51:12 +00:00
|
|
|
}
|