mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-10 06:52:55 +00:00
review: validate that neon and hadron tokens aren't mixed
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user