[identity] use redact_sensitive_data config to redact sensitive data in logs
Summary:
updated all the logs i could find that leaked user or device ID
Depends on D12819
Test Plan:
modified the ping endpoint:
diff --git a/services/identity/src/client_service.rs b/services/identity/src/client_service.rs index 37f9834d43..48f94c1077 100644 --- a/services/identity/src/client_service.rs +++ b/services/identity/src/client_service.rs @@ -934,6 +934,11 @@ impl IdentityClientService for ClientService { _request: tonic::Request<Empty>, ) -> Result<Response<Empty>, tonic::Status> { let response = Response::new(Empty {}); + info!( + user_id = redact_sensitive_data("123"), + "{}", + redact_sensitive_data("Something secret") + ); Ok(response) }
confirmed that the sensitive data was redacted in the logs:
2024-07-20T06:35:56.891148Z INFO grpc_request{request_id="85cb9f6b-93ae-4ffc-b0b6-1b2f438e710b"}:ping: identity::client_service: REDACTED user_id="REDACTED"
Reviewers: ashoat, bartek, will
Reviewed By: bartek
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D12820