diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go index ff716ec87de..044ed7c414c 100644 --- a/services/frontend/pkg/config/config.go +++ b/services/frontend/pkg/config/config.go @@ -58,7 +58,7 @@ type Config struct { AutoAcceptShares bool `yaml:"auto_accept_shares" env:"FRONTEND_AUTO_ACCEPT_SHARES" desc:"Defines if shares should be auto accepted by default. Users can change this setting individually in their profile."` ServiceAccount ServiceAccount `yaml:"service_account"` - PasswordPolicies PasswordPolicies `yaml:"password_policies"` + PasswordPolicy PasswordPolicy `yaml:"password_policy"` Supervised bool `yaml:"-"` Context context.Context `yaml:"-"` @@ -174,8 +174,8 @@ type ServiceAccount struct { ServiceAccountSecret string `yaml:"service_account_secret" env:"OCIS_SERVICE_ACCOUNT_SECRET;FRONTEND_SERVICE_ACCOUNT_SECRET" desc:"The service account secret."` } -// PasswordPolicies configures reva password policies -type PasswordPolicies struct { +// PasswordPolicy configures reva password policy +type PasswordPolicy struct { MinCharacters int `yaml:"min_characters,omitempty" env:"FRONTEND_PASSWORD_POLICIES_MIN_CHARACTERS" desc:"Define the minimum password length. Defaults to 0 if not set."` MinLowerCaseCharacters int `yaml:"min_lowercase_characters" env:"FRONTEND_PASSWORD_POLICIES_MIN_LOWERCASE_CHARACTERS" desc:"Define the minimum number of uppercase letters. Defaults to 0 if not set."` MinUpperCaseCharacters int `yaml:"min_uppercase_characters" env:"FRONTEND_PASSWORD_POLICIES_MIN_UPPERCASE_CHARACTERS" desc:"Define the minimum number of lowercase letters. Defaults to 0 if not set."` diff --git a/services/frontend/pkg/revaconfig/config.go b/services/frontend/pkg/revaconfig/config.go index 7d29a5ba803..8792edc414d 100644 --- a/services/frontend/pkg/revaconfig/config.go +++ b/services/frontend/pkg/revaconfig/config.go @@ -276,11 +276,11 @@ func FrontendConfigFromStruct(cfg *config.Config) (map[string]interface{}, error }, "password_policy": map[string]interface{}{ "max_characters": 72, - "min_characters": cfg.PasswordPolicies.MinCharacters, - "min_lowercase_characters": cfg.PasswordPolicies.MinLowerCaseCharacters, - "min_uppercase_characters": cfg.PasswordPolicies.MinUpperCaseCharacters, - "min_digits": cfg.PasswordPolicies.MinDigits, - "min_special_characters": cfg.PasswordPolicies.MinSpecialCharacters, + "min_characters": cfg.PasswordPolicy.MinCharacters, + "min_lowercase_characters": cfg.PasswordPolicy.MinLowerCaseCharacters, + "min_uppercase_characters": cfg.PasswordPolicy.MinUpperCaseCharacters, + "min_digits": cfg.PasswordPolicy.MinDigits, + "min_special_characters": cfg.PasswordPolicy.MinSpecialCharacters, }, "notifications": map[string]interface{}{ "endpoints": []string{"list", "get", "delete"},