Skip to content

Conversation

@nspadaccino
Copy link
Member

This PR removes the boto dependency and replaces it with a custom, lightweight AWS Signature Version 4 request signer implementation. This reduces the dependency footprint and
eliminates the need for the heavy boto library that was only used for request signing.

Changes

File Changes
setup.py Removed boto>=2.48.0 from install_requires
src/vinyldns/aws4auth_request_signer.py New custom AWS4 request signer implementation
src/vinyldns/client.py Updated to use Aws4AuthRequestSigner instead of BotoRequestSigner

Motivation

  • Reduced dependencies: Removes the heavy boto package which was only used for AWS Signature V4 signing
  • Lighter footprint: The custom signer uses only standard library modules (hashlib, hmac, datetime) plus requests which is already a dependency
  • Better maintainability: Self-contained signing logic that's easier to understand and maintain

Implementation Details

The new Aws4AuthRequestSigner class implements AWS Signature Version 4 authentication:

  • Generates canonical requests with proper URI, headers, and query string encoding
  • Creates HMAC-SHA256 signing keys using the standard AWS4 key derivation
  • Builds properly formatted Authorization headers
  • Handles date parsing from X-Amz-Date or Date headers with fallback to current time

Testing

  • Run existing test suite to verify signing works correctly
  • Test against VinylDNS API endpoints

Remove the boto library dependency and implement a standalone AWS Signature Version 4 request signer. This eliminates the boto dependency while maintaining API authentication compatibility.
@nspadaccino nspadaccino self-assigned this Dec 11, 2025
@nspadaccino nspadaccino added area/dependencies This issue/PR affects dependencies area/core This issue/PR affects the core functionality labels Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core This issue/PR affects the core functionality area/dependencies This issue/PR affects dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants