]>
Commit | Line | Data |
---|---|---|
1e59de90 | 1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
9f95a23c | 2 | // vim: ts=8 sw=2 smarttab ft=cpp |
7c673cae | 3 | |
1e59de90 | 4 | #pragma once |
7c673cae | 5 | |
f67539c2 | 6 | #include <string_view> |
7c673cae FG |
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 { | |
f67539c2 TL |
16 | std::string_view name; |
17 | std::string_view value; | |
7c673cae | 18 | |
f67539c2 | 19 | env(std::string_view name, std::string_view value) |
7c673cae FG |
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 { | |
f67539c2 TL |
27 | std::string_view name; |
28 | std::string_view value; | |
29 | x_meta_map(std::string_view name, std::string_view value) | |
7c673cae FG |
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 { | |
f67539c2 TL |
37 | std::string_view name; |
38 | std::string_view value; | |
39 | s3_policy(std::string_view name, std::string_view value) | |
7c673cae FG |
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; | |
f67539c2 TL |
48 | std::string_view value; |
49 | auth(const req_state* const s, std::string_view value) | |
7c673cae FG |
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 { | |
f67539c2 TL |
57 | const std::string_view buf; |
58 | explicit log_content(const std::string_view buf) | |
7c673cae FG |
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 | } |