restore strip_email_domain for migration
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
35b669fe59
commit
2fe65624c0
3 changed files with 75 additions and 17 deletions
|
@ -164,6 +164,7 @@ type OIDCConfig struct {
|
|||
AllowedDomains []string
|
||||
AllowedUsers []string
|
||||
AllowedGroups []string
|
||||
StripEmaildomain bool
|
||||
Expiry time.Duration
|
||||
UseExpiryFromToken bool
|
||||
MapLegacyUsers bool
|
||||
|
@ -276,6 +277,7 @@ func LoadConfig(path string, isFile bool) error {
|
|||
viper.SetDefault("database.sqlite.wal_autocheckpoint", 1000) // SQLite default
|
||||
|
||||
viper.SetDefault("oidc.scope", []string{oidc.ScopeOpenID, "profile", "email"})
|
||||
viper.SetDefault("oidc.strip_email_domain", true)
|
||||
viper.SetDefault("oidc.only_start_if_oidc_is_available", true)
|
||||
viper.SetDefault("oidc.expiry", "180d")
|
||||
viper.SetDefault("oidc.use_expiry_from_token", false)
|
||||
|
@ -323,14 +325,18 @@ func validateServerConfig() error {
|
|||
depr.warn("dns_config.use_username_in_magic_dns")
|
||||
depr.warn("dns.use_username_in_magic_dns")
|
||||
|
||||
depr.fatal("oidc.strip_email_domain")
|
||||
// TODO(kradalby): Reintroduce when strip_email_domain is removed
|
||||
// after #2170 is cleaned up
|
||||
// depr.fatal("oidc.strip_email_domain")
|
||||
depr.fatal("dns.use_username_in_musername_in_magic_dns")
|
||||
depr.fatal("dns_config.use_username_in_musername_in_magic_dns")
|
||||
|
||||
depr.Log()
|
||||
|
||||
for _, removed := range []string{
|
||||
"oidc.strip_email_domain",
|
||||
// TODO(kradalby): Reintroduce when strip_email_domain is removed
|
||||
// after #2170 is cleaned up
|
||||
// "oidc.strip_email_domain",
|
||||
"dns_config.use_username_in_musername_in_magic_dns",
|
||||
} {
|
||||
if viper.IsSet(removed) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue