diff --git a/pageserver/src/bin/pageserver.rs b/pageserver/src/bin/pageserver.rs index 32df0d8e0d..d4bd465991 100644 --- a/pageserver/src/bin/pageserver.rs +++ b/pageserver/src/bin/pageserver.rs @@ -102,10 +102,14 @@ 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) || matches!(conf.pg_auth_type, AuthType::Trust) { - bail!("Pageserver refuses to start with HTTP or PostgreSQL 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."); + This is insecure and should only be used in development environments." + ); } } else { warn!("Starting in dev mode: this may be an insecure configuration."); diff --git a/safekeeper/src/bin/safekeeper.rs b/safekeeper/src/bin/safekeeper.rs index 39b6ebd0b7..fb8f7b0c48 100644 --- a/safekeeper/src/bin/safekeeper.rs +++ b/safekeeper/src/bin/safekeeper.rs @@ -350,9 +350,11 @@ async fn main() -> anyhow::Result<()> { let http_auth_enabled = args.http_auth_public_key_path.is_some(); let pg_auth_enabled = args.pg_auth_public_key_path.is_some(); if !http_auth_enabled || !pg_auth_enabled { - bail!("Safekeeper refuses to start with HTTP or PostgreSQL API authentication disabled.\n\ + bail!( + "Safekeeper 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."); + This is insecure and should only be used in development environments." + ); } } else { warn!("Starting in dev mode: this may be an insecure configuration.");