]> git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_crypt_sanitize.h
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / rgw / rgw_crypt_sanitize.h
1 // -*- mode:C; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #ifndef RGW_RGW_CRYPT_SANITIZE_H_
5 #define RGW_RGW_CRYPT_SANITIZE_H_
6
7 #include "rgw_common.h"
8
9 namespace rgw {
10 namespace crypt_sanitize {
11
12 /*
13 * Temporary container for suppressing printing if variable contains secret key.
14 */
15 struct env {
16 boost::string_ref name;
17 boost::string_ref value;
18
19 env(boost::string_ref name, boost::string_ref value)
20 : name(name), value(value) {}
21 };
22
23 /*
24 * Temporary container for suppressing printing if aws meta attributes contains secret key.
25 */
26 struct x_meta_map {
27 boost::string_ref name;
28 boost::string_ref value;
29 x_meta_map(boost::string_ref name, boost::string_ref value)
30 : name(name), value(value) {}
31 };
32
33 /*
34 * Temporary container for suppressing printing if s3_policy calculation variable contains secret key.
35 */
36 struct s3_policy {
37 boost::string_ref name;
38 boost::string_ref value;
39 s3_policy(boost::string_ref name, boost::string_ref value)
40 : name(name), value(value) {}
41 };
42
43 /*
44 * Temporary container for suppressing printing if auth string contains secret key.
45 */
46 struct auth {
47 const req_state* const s;
48 boost::string_ref value;
49 auth(const req_state* const s, boost::string_ref value)
50 : s(s), value(value) {}
51 };
52
53 /*
54 * Temporary container for suppressing printing if log made from civetweb may contain secret key.
55 */
56 struct log_content {
57 const char* buf;
58 log_content(const char* buf)
59 : buf(buf) {}
60 };
61
62 std::ostream& operator<<(std::ostream& out, const env& e);
63 std::ostream& operator<<(std::ostream& out, const x_meta_map& x);
64 std::ostream& operator<<(std::ostream& out, const s3_policy& x);
65 std::ostream& operator<<(std::ostream& out, const auth& x);
66 std::ostream& operator<<(std::ostream& out, const log_content& x);
67 }
68 }
69 #endif /* RGW_RGW_CRYPT_SANITIZE_H_ */