tessl install tessl/pypi-aws-requests-auth@0.4.0AWS signature version 4 signing process for the python requests module
Agent Success
Agent success rate when using this tile
84%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.11x
Baseline
Agent success rate without this tile
76%
A tool that verifies AWS API request signatures by implementing the AWS Signature Version 4 key derivation process.
@generates
def derive_signing_key(secret_key: str, date: str, region: str, service: str) -> bytes:
"""
Derives an AWS Signature Version 4 signing key.
Implements the multi-stage HMAC-SHA256 signing process:
1. kSecret = secret_key
2. kDate = HMAC-SHA256(kSecret, date)
3. kRegion = HMAC-SHA256(kDate, region)
4. kService = HMAC-SHA256(kRegion, service)
5. kSigning = HMAC-SHA256(kService, "aws4_request")
Args:
secret_key: AWS secret access key
date: Date in YYYYMMDD format
region: AWS region (e.g., "us-east-1")
service: AWS service name (e.g., "s3", "iam")
Returns:
The derived signing key as bytes
"""
pass
def validate_signing_key(derived_key: bytes, expected_key: bytes) -> bool:
"""
Validates that a derived signing key matches an expected key.
Args:
derived_key: The signing key that was derived
expected_key: The expected signing key value
Returns:
True if the keys match, False otherwise
"""
passProvides AWS Signature Version 4 authentication support, including signature key derivation functionality.
@satisfied-by