feat: Add a global flag to enable multi-tenant support
When enabled the graph service refuses to start with the "ldap" backend. Additional enforcements will follow in subsequent commits.
This commit is contained in:
committed by
Ralf Haferkamp
parent
bbf30b5802
commit
7e86d85d62
@@ -42,6 +42,10 @@ func Validate(cfg *config.Config) error {
|
||||
return shared.MissingJWTTokenError(cfg.Service.Name)
|
||||
}
|
||||
|
||||
// ensure that the "cs3" identity backend is used in multi-tenant setups
|
||||
if cfg.Commons.MultiTenantEnabled && cfg.Identity.Backend != "cs3" {
|
||||
return fmt.Errorf("Multi-tenant support is enabled. The identity backend must be set to 'cs3' for the 'graph' service.")
|
||||
}
|
||||
if cfg.Identity.Backend == "ldap" {
|
||||
if err := validateLDAPSettings(cfg); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user