X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Frgw%2Frgw_crypt_sanitize.cc;fp=src%2Fceph%2Fsrc%2Frgw%2Frgw_crypt_sanitize.cc;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=ab345bcbd1bc7c6dc8b6ff2cfad844e64702929d;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/rgw/rgw_crypt_sanitize.cc b/src/ceph/src/rgw/rgw_crypt_sanitize.cc deleted file mode 100644 index ab345bc..0000000 --- a/src/ceph/src/rgw/rgw_crypt_sanitize.cc +++ /dev/null @@ -1,85 +0,0 @@ -/* - * rgw_crypt_sanitize.cc - * - * Created on: Mar 3, 2017 - * Author: adam - */ - -#include "rgw_common.h" -#include "rgw_crypt_sanitize.h" -#include "boost/algorithm/string/predicate.hpp" - -namespace rgw { -namespace crypt_sanitize { -const char* HTTP_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY = "HTTP_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY"; -const char* x_amz_server_side_encryption_customer_key = "x-amz-server-side-encryption-customer-key"; -const char* dollar_x_amz_server_side_encryption_customer_key = "$x-amz-server-side-encryption-customer-key"; -const char* suppression_message = "=suppressed due to key presence="; - -std::ostream& operator<<(std::ostream& out, const env& e) { - if (g_ceph_context->_conf->rgw_crypt_suppress_logs) { - if (boost::algorithm::iequals( - e.name, - HTTP_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)) - { - out << suppression_message; - return out; - } - if (boost::algorithm::iequals(e.name, "QUERY_STRING") && - boost::algorithm::ifind_first( - e.value, - x_amz_server_side_encryption_customer_key)) - { - out << suppression_message; - return out; - } - } - out << e.value; - return out; -} - -std::ostream& operator<<(std::ostream& out, const x_meta_map& x) { - if (g_ceph_context->_conf->rgw_crypt_suppress_logs && - boost::algorithm::iequals(x.name, x_amz_server_side_encryption_customer_key)) - { - out << suppression_message; - return out; - } - out << x.value; - return out; -} - -std::ostream& operator<<(std::ostream& out, const s3_policy& x) { - if (g_ceph_context->_conf->rgw_crypt_suppress_logs && - boost::algorithm::iequals(x.name, dollar_x_amz_server_side_encryption_customer_key)) - { - out << suppression_message; - return out; - } - out << x.value; - return out; -} - -std::ostream& operator<<(std::ostream& out, const auth& x) { - if (g_ceph_context->_conf->rgw_crypt_suppress_logs && - x.s->info.env->get(HTTP_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY, nullptr) != nullptr) - { - out << suppression_message; - return out; - } - out << x.value; - return out; -} - -std::ostream& operator<<(std::ostream& out, const log_content& x) { - if (g_ceph_context->_conf->rgw_crypt_suppress_logs && - boost::algorithm::ifind_first(x.buf, x_amz_server_side_encryption_customer_key)) { - out << suppression_message; - return out; - } - out << x.buf; - return out; -} - -} -}