read request are trace

This commit is contained in:
mbecker20
2026-03-04 19:36:34 -08:00
parent 50cf2f2d50
commit 550c0339d6
8 changed files with 37 additions and 7 deletions

4
Cargo.lock generated
View File

@@ -3224,9 +3224,9 @@ dependencies = [
[[package]]
name = "mogh_auth_server"
version = "1.2.6"
version = "1.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0053e21d85b214a3288c50433cf56cd07ac1dacda66201f5e93205810423daec"
checksum = "0d0b5a9302bb66d461840957dccc9f94549df44c0ad4b8b53c3c7293364bf979"
dependencies = [
"anyhow",
"arc-swap",

View File

@@ -37,7 +37,7 @@ mogh_error = { version = "1.0.3", default-features = false }
derive_default_builder = "0.1.8"
async_timing_util = "1.1.0"
mogh_auth_client = "1.2.2"
mogh_auth_server = "1.2.6"
mogh_auth_server = "1.2.7"
mogh_secret_file = "1.0.1"
mogh_validations = "1.0.1"
mogh_rate_limit = "1.0.1"

View File

@@ -293,7 +293,7 @@ async fn handler(
let req_id = Uuid::new_v4();
let variant: ReadRequestVariant = (&request).into();
debug!(
trace!(
"READ REQUEST {req_id} | METHOD: {variant} | USER: {} ({})",
user.username, user.id
);
@@ -301,7 +301,7 @@ async fn handler(
let res = request.resolve(&ReadArgs { user }).await;
if let Err(e) = &res {
debug!(
trace!(
"READ REQUEST {req_id} | METHOD: {variant} | ERROR: {:#}",
e.error
);

View File

@@ -70,6 +70,14 @@ impl PeripheryConnectionArgs<'_> {
}
};
debug!(
id = connection.args.id,
host = identifiers.host(),
query = core_connection_query(),
sec_websocket_accept = format!("{accept:?}"),
"[PERIPHERY AUTH] Zero trust identifiers"
);
let identifiers = identifiers.build(
accept.as_bytes(),
core_connection_query().as_bytes(),

View File

@@ -129,6 +129,14 @@ async fn existing_server_handler(
return;
};
debug!(
id = &server.id,
host = format!("{:?}", identifiers.host),
query,
sec_websocket_accept = format!("{:?}", identifiers.accept),
"[PERIPHERY AUTH] Zero trust identifiers"
);
let span = info_span!(
"PeripheryLogin",
server_id = server.id,

View File

@@ -94,6 +94,13 @@ pub async fn handler(
already_logged_connection_error = false;
debug!(
host = identifiers.host(),
query,
sec_websocket_accept = format!("{accept:?}"),
"[CORE AUTH] Zero trust identifiers"
);
let identifiers =
identifiers.build(accept.as_bytes(), query.as_bytes());

View File

@@ -109,6 +109,13 @@ async fn handler(
let query = format!("core={}", urlencoding::encode(&core));
debug!(
host = format!("{:?}", identifiers.host),
query,
sec_websocket_accept = format!("{:?}", identifiers.accept),
"[CORE AUTH] Zero trust identifiers"
);
if let Err(e) =
handle_login(&mut socket, identifiers.build(query.as_bytes()))
.await

View File

@@ -295,8 +295,8 @@ impl AddressConnectionIdentifiers {
/// Used to extract owned connection identifier
/// in server side connection handler.
pub struct HeaderConnectionIdentifiers {
host: HeaderValue,
accept: String,
pub host: HeaderValue,
pub accept: String,
}
impl HeaderConnectionIdentifiers {