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:
Ralf Haferkamp
2025-10-06 11:21:57 +02:00
committed by Ralf Haferkamp
parent bbf30b5802
commit 7e86d85d62
5 changed files with 96 additions and 14 deletions
@@ -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