Skip to content

Commit 29e77ea

Browse files
authored
Merge pull request ceph#57098 from kchheda3/wip-dont-log-passwd
rgw/notification: Do not log endpoint as it could contain broker user-id & password. Reviewed-by: Yuval Lifshitz <[email protected]>
2 parents f809df2 + 34da6f9 commit 29e77ea

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/rgw/driver/rados/rgw_notify.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "rgw_perf_counters.h"
2020
#include "services/svc_zone.h"
2121
#include "common/dout.h"
22+
#include "rgw_url.h"
2223
#include <chrono>
2324

2425
#define dout_subsys ceph_subsys_rgw_notification
@@ -71,9 +72,14 @@ WRITE_CLASS_ENCODER(event_entry_t)
7172

7273
static inline std::ostream& operator<<(std::ostream& out,
7374
const event_entry_t& e) {
75+
std::string host;
76+
std::string user;
77+
std::string password;
78+
parse_url_authority(e.push_endpoint, host, user, password);
7479
return out << "notification id: '" << e.event.configurationId
7580
<< "', topic: '" << e.arn_topic
76-
<< "', endpoint: '" << e.push_endpoint
81+
<< "', endpoint: '" << host
82+
<< "', endpoint_user: '" << user
7783
<< "', bucket_owner: '" << e.event.bucket_ownerIdentity
7884
<< "', bucket: '" << e.event.bucket_name
7985
<< "', object: '" << e.event.object_key

0 commit comments

Comments
 (0)