diff --git a/src/lib/features/instance-stats/instance-stats-service.ts b/src/lib/features/instance-stats/instance-stats-service.ts index 04d845cc5619..9b331bd9d8f2 100644 --- a/src/lib/features/instance-stats/instance-stats-service.ts +++ b/src/lib/features/instance-stats/instance-stats-service.ts @@ -224,7 +224,10 @@ export class InstanceStatsService { 'unleash.auth.simple', ); - return settings?.disabled !== false; + return ( + typeof settings?.disabled === 'undefined' || + settings.disabled === false + ); } async hasSCIM(): Promise { diff --git a/src/lib/metrics.ts b/src/lib/metrics.ts index 003c69e5d353..49108effa89c 100644 --- a/src/lib/metrics.ts +++ b/src/lib/metrics.ts @@ -408,7 +408,7 @@ export function registerPrometheusMetrics( }); dbMetrics.registerGaugeDbMetric({ - name: 'password_auth', + name: 'password_auth_enabled', help: 'Whether password auth is enabled', query: () => instanceStatsService.hasPasswordAuth(), map: (result) => ({ value: result ? 1 : 0 }),