16 #ifndef HAZELCAST_CLIENT_AWS_SECURITY_EC2REQUESTSIGNER_H_
17 #define HAZELCAST_CLIENT_AWS_SECURITY_EC2REQUESTSIGNER_H_
23 #include "hazelcast/util/HazelcastDll.h"
25 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
27 #pragma warning(disable: 4251) //for dll export
33 class ClientAwsConfig;
40 const std::string &endpoint);
44 std::string sign(
const std::map<std::string, std::string> &attributes);
46 std::string createFormattedCredential()
const;
48 std::string getCanonicalizedQueryString(
const std::map<std::string, std::string> &attributes)
const;
51 std::string getCanonicalizedRequest(
const std::map<std::string, std::string> &attributes)
const;
53 std::string getCanonicalHeaders()
const;
55 std::string getCanonicalizedQueryString(
const std::vector<std::string> &list)
const;
57 std::vector<std::string> getListOfEntries(
const std::map<std::string, std::string> &entries)
const;
59 void addComponents(std::vector<std::string> &components,
60 const std::map<std::string, std::string> &attributes,
61 const std::string &key)
const;
64 std::string createStringToSign(
const std::string &canonicalRequest)
const;
66 std::string getCredentialScope()
const;
69 std::vector<unsigned char> deriveSigningKey()
const;
71 std::string createSignature(
const std::string &stringToSign,
const std::vector<unsigned char> &signingKey)
const;
73 std::string hmacSHA256Hex(
const std::vector<unsigned char> &key,
const std::string &msg)
const;
75 std::string convertToHexString(
const unsigned char *buffer,
unsigned int len)
const;
77 unsigned int hmacSHA256Bytes(
const void *key,
int keyLen,
const std::string &msg,
78 unsigned char *hash)
const;
80 unsigned int hmacSHA256Bytes(
const std::string &key,
const std::string &msg,
81 unsigned char *hash)
const;
83 unsigned int hmacSHA256Bytes(
const std::vector<unsigned char> &key,
const std::string &msg,
84 unsigned char *hash)
const;
86 unsigned int hmacSHA256Bytes(
const void *keyBuffer,
int keyLen,
const unsigned char *data,
88 unsigned char *hash)
const;
90 std::string sha256Hashhex(
const std::string &in)
const;
92 static std::string NEW_LINE;
93 static size_t DATE_LENGTH;
96 std::string timestamp;
97 const std::string &endpoint;
104 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
The ClientAwsConfig contains the configuration for client to connect to nodes in aws environment...
Definition: ClientAwsConfig.h:53
Definition: MapEntryView.h:32
Definition: EC2RequestSigner.h:37