Skip to content

Commit

Permalink
Redact in native bridge web service.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpfs committed Dec 11, 2024
1 parent 1efda4d commit 8cca222
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion crates/ipc/src/web_service/secret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,15 @@ where
};

match account.read_secret(request.secret_id(), Some(folder)).await {
Ok(result) => json(StatusCode::OK, &result.0),
Ok(result) => {
let mut secret_row = result.0;
let redacted = secret_row.secret_mut().redact(true, 12);
tracing::debug!(
kind = %secret_row.meta().kind(),
redacted = %redacted,
"read_secret");
json(StatusCode::OK, &secret_row)
}
Err(e) => {
tracing::error!(error = %e, "read_secret");
status(StatusCode::INTERNAL_SERVER_ERROR)
Expand Down

0 comments on commit 8cca222

Please sign in to comment.