]> git.proxmox.com Git - ceph.git/blame - ceph/src/rgw/rgw_crypt_sanitize.h
bump version to 19.2.0-pve1
[ceph.git] / ceph / src / rgw / rgw_crypt_sanitize.h
CommitLineData
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
9namespace rgw {
10namespace crypt_sanitize {
11
12/*
13 * Temporary container for suppressing printing if variable contains secret key.
14 */
15struct 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 */
26struct 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 */
36struct 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 */
46struct 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 */
56struct 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
62std::ostream& operator<<(std::ostream& out, const env& e);
63std::ostream& operator<<(std::ostream& out, const x_meta_map& x);
64std::ostream& operator<<(std::ostream& out, const s3_policy& x);
65std::ostream& operator<<(std::ostream& out, const auth& x);
66std::ostream& operator<<(std::ostream& out, const log_content& x);
67}
68}