From f1d694fca20eeb9376e15c2bed44f2c5f8cdc201 Mon Sep 17 00:00:00 2001 From: Finn Date: Sat, 3 Aug 2024 15:31:30 -0700 Subject: [PATCH] Allow disabling local auth if AUTH_PROXY_HEADER is configured --- internal/cli/cli.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cli/cli.go b/internal/cli/cli.go index d2b6ae755e2..e0c85d05a49 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -226,8 +226,8 @@ func Parse() { return } - if config.Opts.DisableLocalAuth() && config.Opts.OAuth2Provider() == "" { - printErrorAndExit(errors.New("DISABLE_LOCAL_AUTH is enabled but OAUTH2_PROVIDER is not set. Please enable at least one authentication source")) + if config.Opts.DisableLocalAuth() && config.Opts.OAuth2Provider() == "" && config.Opts.AuthProxyHeader() == "" { + printErrorAndExit(errors.New("DISABLE_LOCAL_AUTH is enabled but neither OAUTH2_PROVIDER nor AUTH_PROXY_HEADER is not set. Please enable at least one authentication source")) } startDaemon(store)