plugin-for-aws improperly includes port number of URI as 'host' attribute when creating presigned URLs - triggers SignatureDoesNotMatch
#10,114 opened on Jul 30, 2026
Repository metrics
- Stars
- (10,111 stars)
- PR merge metrics
- (Avg merge 5d 1h) (144 merged PRs in 30d)
Description
What steps did you take and what happened:
config.S3Url = https://<Netapp storageGrid>:443
Reliably returns SignatureDoesNotMatch with signature payload as
host:<hostname>:443
Then generated presigned URLs using aws s3 presign--endpoint-url <StorageGrid>[:443] which storageGrid handled correctly both ways.
Note the value of the host attribute is the SAME (not port number) in both invocations of the AWS CLI
X-Amz-Algorithm=AWS4-HMAC-SHA256& ...
Date=<now>&X-Amz-Expires= ...
host:<storageGrid hostname>
StorageGrid version = v11.9.0.5
Removed the port spec from config.S3Url and works flawlessly.
What did you expect to happen:
(edit, this part is wrong, see comment below)
The URL parser is smart enough to know that the 'authority' section of a URL is made up of
(end edit)[userinfo @] host [:port] and that port is not a component of the host. The mechanism of network path (eg. port number, protocol scheme) do not belong in the signature.
Maybe the S3 spec is unclear on that matter and various S3 backend implementations may differ, but this gratuitous inclusion of the port spec into the 'host' attribute has been tripping people up for years and across implementations per the drumbeat of Issues going back 5 years, or at least since plugin version 1.9+
Environment:
- Velero version: 1.18.x
- Velero features: plugin-for-aws 1.14.2