AWS Signature Version 4 helpers.
Definition in file aws.hpp.
Go to the source code of this file.
#include <ctime>#include <string>#include <string_view>#include <userver/http/header_map.hpp>#include <userver/http/predefined_header.hpp>Classes | |
| struct | crypto::aws::SignV4Request |
| struct | crypto::aws::V4TimeScope |
| Date and credential scope used to sign a request. More... | |
Namespaces | |
| namespace | crypto |
| Cryptographic primitives: hashing, signatures, certificates, and randomness. | |
| namespace | crypto::aws |
| AWS Signature Version 4. | |
Functions | |
| void | crypto::aws::SignRequestV4 (::http::headers::HeaderMap &headers, const SignV4Request &request) |
| V4TimeScope | crypto::aws::MakeV4TimeScope (std::string_view region, std::string_view service) |
| std::string | crypto::aws::MakeCanonicalRequest (std::string_view http_method, std::string_view canonical_uri, std::string_view canonical_query, std::string_view canonical_headers, std::string_view signed_headers, std::string_view payload_hash) |
| Canonical request string: method, URI, query, headers, signed headers, payload hash. | |
| std::string | crypto::aws::MakeV4StringToSign (std::string_view canonical_request, const V4TimeScope &scope) |
| AWS4-HMAC-SHA256 string to sign for canonical_request. | |
| std::string | crypto::aws::MakeV4Signature (std::string_view string_to_sign, const V4TimeScope &scope, std::string_view region, std::string_view service, std::string_view secret_key) |
| HMAC-SHA256 signature of string_to_sign with the derived signing key. | |
Variables | |
| constexpr std::string_view | crypto::aws::kAws4HmacSha256 = "AWS4-HMAC-SHA256" |
| constexpr std::string_view | crypto::aws::kAws4Request = "aws4_request" |
| constexpr std::string_view | crypto::aws::kUnsignedPayload = "UNSIGNED-PAYLOAD" |
| constexpr ::http::headers::PredefinedHeader | crypto::aws::kAmzDate {"X-Amz-Date"} |
| constexpr ::http::headers::PredefinedHeader | crypto::aws::kAmzContentSha256 {"X-Amz-Content-Sha256"} |