]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/notification: Do not log full endpoint as it could contain broker password. 57098/head
authorkchheda3 <kchheda3@bloomberg.net>
Thu, 25 Apr 2024 22:34:54 +0000 (18:34 -0400)
committerkchheda3 <kchheda3@bloomberg.net>
Wed, 1 May 2024 21:39:58 +0000 (17:39 -0400)
Signed-off-by: kchheda3 <kchheda3@bloomberg.net>
src/rgw/driver/rados/rgw_notify.cc

index d612d5452cddfd8d2a360f8f70f7eded56b4b3ee..4f0ae5af54a347efd589b1bc53b815b1e35bf6d0 100644 (file)
@@ -19,6 +19,7 @@
 #include "rgw_perf_counters.h"
 #include "services/svc_zone.h"
 #include "common/dout.h"
+#include "rgw_url.h"
 #include <chrono>
 
 #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