]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/notification: Do not log full endpoint as it could contain broker password.
authorkchheda3 <kchheda3@bloomberg.net>
Thu, 25 Apr 2024 22:34:54 +0000 (18:34 -0400)
committerkchheda3 <kchheda3@bloomberg.net>
Wed, 20 Nov 2024 20:37:38 +0000 (15:37 -0500)
Signed-off-by: kchheda3 <kchheda3@bloomberg.net>
src/rgw/driver/rados/rgw_notify.cc

index 1363e2092893070df2e252699380f10432a38314..e3f7710b401c9c73c752a58b5e783a2c3ad2a55e 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
@@ -27,9 +28,14 @@ namespace rgw::notify {
   
 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