diff --git a/internal/api/v1/auth/auth.go b/internal/api/v1/auth/auth.go index c579d4a..20afcbb 100644 --- a/internal/api/v1/auth/auth.go +++ b/internal/api/v1/auth/auth.go @@ -31,7 +31,7 @@ func GetDefaultAuth() Provider { } func IsEnabled() bool { - return common.APIJWTSecret != nil || IsOIDCEnabled() + return !common.DebugDisableAuth && (common.APIJWTSecret != nil || IsOIDCEnabled()) } func IsOIDCEnabled() bool { diff --git a/internal/common/env.go b/internal/common/env.go index 33d4743..7a10941 100644 --- a/internal/common/env.go +++ b/internal/common/env.go @@ -20,8 +20,6 @@ var ( IsTrace = GetEnvBool("TRACE", false) && IsDebug IsProduction = !IsTest && !IsDebug - DebugMemLogger = GetEnvBool("DEBUG_MEM_LOGGER", false) - ProxyHTTPAddr, ProxyHTTPHost, ProxyHTTPPort, @@ -44,6 +42,8 @@ var ( APIUser = GetEnvString("API_USER", "admin") APIPassword = GetEnvString("API_PASSWORD", "password") + DebugDisableAuth = GetEnvBool("DEBUG_DISABLE_AUTH", false) + // OIDC Configuration. OIDCIssuerURL = GetEnvString("OIDC_ISSUER_URL", "") OIDCLogoutURL = GetEnvString("OIDC_LOGOUT_URL", "")