mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-23 16:10:37 +00:00
proxy: local auth backend (#8806)
Adds a Local authentication backend. Updates http to extract JWT bearer tokens and passes them to the local backend to validate.
This commit is contained in:
@@ -61,7 +61,7 @@ pub trait ComputeConnectBackend {
|
||||
ctx: &RequestMonitoring,
|
||||
) -> Result<CachedNodeInfo, console::errors::WakeComputeError>;
|
||||
|
||||
fn get_keys(&self) -> Option<&ComputeCredentialKeys>;
|
||||
fn get_keys(&self) -> &ComputeCredentialKeys;
|
||||
}
|
||||
|
||||
pub struct TcpMechanism<'a> {
|
||||
@@ -112,9 +112,8 @@ where
|
||||
let mut num_retries = 0;
|
||||
let mut node_info =
|
||||
wake_compute(&mut num_retries, ctx, user_info, wake_compute_retry_config).await?;
|
||||
if let Some(keys) = user_info.get_keys() {
|
||||
node_info.set_keys(keys);
|
||||
}
|
||||
|
||||
node_info.set_keys(user_info.get_keys());
|
||||
node_info.allow_self_signed_compute = allow_self_signed_compute;
|
||||
// let mut node_info = credentials.get_node_info(ctx, user_info).await?;
|
||||
mechanism.update_connect_config(&mut node_info.config);
|
||||
|
||||
Reference in New Issue
Block a user