Merge pull request #25881 from cbodley/wip-rgw-sanitize-v4

rgw: sanitize customer encryption keys from log output in v4 auth
This commit is contained in:
Ali Maredia 2019-01-14 16:30:47 -05:00 committed by GitHub
commit b5bd434598
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -640,7 +640,8 @@ get_v4_canon_req_hash(CephContext* cct,
const auto canonical_req_hash = calc_hash_sha256(canonical_req);
ldout(cct, 10) << "canonical request = " << canonical_req << dendl;
using sanitize = rgw::crypt_sanitize::log_content;
ldout(cct, 10) << "canonical request = " << sanitize{canonical_req} << dendl;
ldout(cct, 10) << "canonical request hash = "
<< buf_to_hex(canonical_req_hash).data() << dendl;

View File

@ -3883,8 +3883,9 @@ AWSGeneralAbstractor::get_auth_data_v4(const req_state* const s,
boost::optional<std::string> canonical_headers = \
get_v4_canonical_headers(s->info, signed_hdrs, using_qs);
if (canonical_headers) {
ldout(s->cct, 10) << "canonical headers format = " << *canonical_headers
<< dendl;
using sanitize = rgw::crypt_sanitize::log_content;
ldout(s->cct, 10) << "canonical headers format = "
<< sanitize{*canonical_headers} << dendl;
} else {
throw -EPERM;
}