From: kchheda3 Date: Thu, 25 Apr 2024 22:34:54 +0000 (-0400) Subject: rgw/notification: Do not log full endpoint as it could contain broker password. X-Git-Tag: v20.0.0~1985^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=34da6f9e4aca02c229ff269bbf1c5c9f6fc483a2;p=ceph.git rgw/notification: Do not log full endpoint as it could contain broker password. Signed-off-by: kchheda3 --- diff --git a/src/rgw/driver/rados/rgw_notify.cc b/src/rgw/driver/rados/rgw_notify.cc index d612d5452cdd..4f0ae5af54a3 100644 --- a/src/rgw/driver/rados/rgw_notify.cc +++ b/src/rgw/driver/rados/rgw_notify.cc @@ -19,6 +19,7 @@ #include "rgw_perf_counters.h" #include "services/svc_zone.h" #include "common/dout.h" +#include "rgw_url.h" #include #define dout_subsys ceph_subsys_rgw_notification @@ -71,9 +72,14 @@ WRITE_CLASS_ENCODER(event_entry_t) static inline std::ostream& operator<<(std::ostream& out, const event_entry_t& e) { + std::string host; + std::string user; + std::string password; + parse_url_authority(e.push_endpoint, host, user, password); return out << "notification id: '" << e.event.configurationId << "', topic: '" << e.arn_topic - << "', endpoint: '" << e.push_endpoint + << "', endpoint: '" << host + << "', endpoint_user: '" << user << "', bucket_owner: '" << e.event.bucket_ownerIdentity << "', bucket: '" << e.event.bucket_name << "', object: '" << e.event.object_key