Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_signature_key(key, date_stamp, region_name, service_name):
"""
See: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
In AWS Signature Version 4, instead of using your AWS access keys to sign a request, you
first create a signing key that is scoped to a specific region and service. For more
information about signing keys, see Introduction to Signing Requests.
"""
k_date = sign(('AWS4' + key).encode('utf-8'), date_stamp)
k_region = sign(k_date, region_name)
k_service = sign(k_region, service_name)
k_signing = sign(k_service, 'aws4_request')
return k_signing
def get_signature_key(key, date_stamp, region_name, service_name):
"""
See: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
In AWS Signature Version 4, instead of using your AWS access keys to sign a request, you
first create a signing key that is scoped to a specific region and service. For more
information about signing keys, see Introduction to Signing Requests.
"""
k_date = sign(('AWS4' + key).encode('utf-8'), date_stamp)
k_region = sign(k_date, region_name)
k_service = sign(k_region, service_name)
k_signing = sign(k_service, 'aws4_request')
return k_signing
def get_signature_key(key, date_stamp, region_name, service_name):
"""
See: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
In AWS Signature Version 4, instead of using your AWS access keys to sign a request, you
first create a signing key that is scoped to a specific region and service. For more
information about signing keys, see Introduction to Signing Requests.
"""
k_date = sign(('AWS4' + key).encode('utf-8'), date_stamp)
k_region = sign(k_date, region_name)
k_service = sign(k_region, service_name)
k_signing = sign(k_service, 'aws4_request')
return k_signing
def get_signature_key(key, date_stamp, region_name, service_name):
"""
See: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
In AWS Signature Version 4, instead of using your AWS access keys to sign a request, you
first create a signing key that is scoped to a specific region and service. For more
information about signing keys, see Introduction to Signing Requests.
"""
k_date = sign(('AWS4' + key).encode('utf-8'), date_stamp)
k_region = sign(k_date, region_name)
k_service = sign(k_region, service_name)
k_signing = sign(k_service, 'aws4_request')
return k_signing