hvac.aws_utils¶
-
class
hvac.aws_utils.
SigV4Auth
(access_key, secret_key, session_token=None, region='us-east-1')[source]¶ Bases:
object
-
hvac.aws_utils.
generate_sigv4_auth_request
(header_value=None)[source]¶ Helper function to prepare a AWS API request to subsequently generate a “AWS Signature Version 4” header.
Parameters: header_value (str) – Vault allows you to require an additional header, X-Vault-AWS-IAM-Server-ID, to be present to mitigate against different types of replay attacks. Depending on the configuration of the AWS auth backend, providing a argument to this optional parameter may be required. Returns: A PreparedRequest instance, optionally containing the provided header value under a ‘X-Vault-AWS-IAM-Server-ID’ header name pointed to AWS’s simple token service with action “GetCallerIdentity” Return type: requests.PreparedRequest