Skip to content

Commit 1c3e2c4

Browse files
committed
fix(proxy): include partial identity fields in fallback warning
Include binary, binary_pid, and ancestors from IdentityError in the warn!() structured fields so they provide diagnostics in production. Fixes clippy dead_code lint on IdentityError fields. Signed-off-by: Paolo Dettori <paolo@dettori.dev> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
1 parent d2267f5 commit 1c3e2c4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎crates/openshell-sandbox/src/proxy.rs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,8 +1405,12 @@ fn evaluate_opa_tcp(
14051405
// Fall through to OPA with an unresolved identity — policies without
14061406
// binary restrictions (empty binaries list) will still allow.
14071407
warn!(
1408-
"identity resolution failed (port={peer_port}): {}; using unresolved identity",
1409-
err.reason
1408+
port = peer_port,
1409+
reason = %err.reason,
1410+
binary = ?err.binary,
1411+
binary_pid = ?err.binary_pid,
1412+
ancestors = ?err.ancestors,
1413+
"identity resolution failed; using unresolved identity",
14101414
);
14111415
ResolvedIdentity {
14121416
bin_path: PathBuf::from("<unresolved>"),

0 commit comments

Comments
 (0)