review: validate that neon and hadron tokens aren't mixed

This commit is contained in:
Vlad Lazar
2025-07-25 12:15:08 +01:00
parent 8f7314c429
commit 688d0771d3

View File

@@ -629,6 +629,13 @@ impl PageServerConf {
}
};
let auth_types = [conf.http_auth_type, conf.pg_auth_type, conf.grpc_auth_type];
if auth_types.contains(&AuthType::NeonJWT) && auth_types.contains(&AuthType::HadronJWT) {
return Err(anyhow::anyhow!(
"Mixing neon and hadron style JWT tokens is not supported"
));
}
Ok(conf)
}