From d74c715602e2190e040a664239a1e93d3d90385f Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 10 Apr 2025 08:50:04 +0000 Subject: [PATCH] Check pg_auth_type in pageserver authentication check Co-Authored-By: John Spray --- pageserver/src/bin/pageserver.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pageserver/src/bin/pageserver.rs b/pageserver/src/bin/pageserver.rs index 2240f29a50..ef98b38727 100644 --- a/pageserver/src/bin/pageserver.rs +++ b/pageserver/src/bin/pageserver.rs @@ -102,8 +102,8 @@ fn main() -> anyhow::Result<()> { let (conf, ignored) = initialize_config(&identity_file_path, &cfg_file_path, &workdir)?; if !dev_mode { - if matches!(conf.http_auth_type, AuthType::Trust) { - bail!("Pageserver refuses to start with HTTP API authentication disabled.\n\ + if matches!(conf.http_auth_type, AuthType::Trust) || matches!(conf.pg_auth_type, AuthType::Trust) { + bail!("Pageserver refuses to start with HTTP or PostgreSQL API authentication disabled.\n\ Run with --dev to allow running without authentication.\n\ This is insecure and should only be used in development environments."); }