DB-persisted security configuration silently overrides yaml/env auth config — Helm/GitOps changes ignored without warning
Affected module
Backend (security configuration loading) — also affects Helm/GitOps deployments
Describe the bug
Since security settings became persistable in the database (UI-based SSO configuration), the DB-stored authenticationConfiguration / authorizerConfiguration silently take precedence over openmetadata.yaml / environment variables on every startup. Once a row exists in openmetadata_settings, any auth config delivered via env vars (docker-compose, Helm chart values, ArgoCD) is ignored — with no warning, no error, and no documented precedence rule.
SecurityConfigurationManager.initialize() (1.11.7):
try {
currentAuthConfig = SettingsCache.getSetting(AUTHENTICATION_CONFIGURATION, AuthenticationConfiguration.class);
currentAuthzConfig = SettingsCache.getSetting(AUTHORIZER_CONFIGURATION, AuthorizerConfiguration.class);
LOG.info("Loaded security configuration from database");
} catch (Exception e) {
currentAuthConfig = config.getAuthenticationConfiguration();
currentAuthzConfig = config.getAuthorizerConfiguration();
LOG.info("Using security configuration from YAML");
}
This is extremely painful in GitOps setups, because every observable signal reports success while the config is discarded:
- Helm/ArgoCD render the correct
AUTHENTICATION_*/OIDC_*env vars into the Secret → sync is green - The pod's environment contains the correct values (verified via
kubectl exec ... env) - Full pod recreation changes nothing
/api/v1/system/config/authkeeps returning the old (DB-stored) provider
Nothing in logs indicates that the env-provided configuration was considered and discarded (the single INFO line "Loaded security configuration from database" does not convey "…and your environment variables are being ignored").
To Reproduce
- Deploy OpenMetadata 1.11.7 via the Helm chart with default auth (
provider: basic). The security configuration gets persisted intoopenmetadata_settings. - Change Helm values to a full
custom-oidcconfidential setup (authentication.provider: custom-oidc,oidcConfiguration.enabled: true, etc.) and sync. - Confirm the rendered Secret and the pod environment contain the new
AUTHENTICATION_*/OIDC_*values. - Restart / delete the pod.
Expected behavior: the server picks up the configuration provided via environment variables, or at minimum clearly reports that it is using a different (DB-stored) configuration and how to reset it.
Actual behavior: /api/v1/system/config/auth still returns basic with default parameters. The env configuration is silently ignored because a DB row exists.
Workaround (undocumented)
./bootstrap/openmetadata-ops.sh remove-security-config
# or directly:
# DELETE FROM openmetadata_settings WHERE configtype IN ('authenticationConfiguration','authorizerConfiguration');
then restart the server, after which the log shows "Using security configuration from YAML" and env config applies.
Suggestions
Any of these would prevent hours of debugging:
- Log a WARN on startup when a DB security configuration exists and differs from the yaml/env configuration, explicitly stating that env values are being ignored and referencing
remove-security-config. - Document the precedence (DB > yaml/env once a row exists) in the deployment/security docs, along with
remove-security-config. - Ideally: an explicit opt-in source-of-truth switch (e.g.
SECURITY_CONFIG_SOURCE=env|database) so GitOps deployments can keep env/Helm authoritative and UI-based SSO config can be disabled.
Version
- OpenMetadata: 1.11.7 (server + Helm chart
openmetadata-1.11.7) - Deployment: Kubernetes via ArgoCD, PostgreSQL backend
Likely related: #30903 (backend response_type changes ignored — same shadowing mechanism), #30882 (multi-replica propagation of UI-set security config).
I will work on this.