You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that when I explicitly set the default port in an s3 endpoint, the payload signature is calculated using hostname:port, but only hostname is set in the header, leading to a signature validation failure server-side. I encountered this issue when using rook ceph, but I don't know to what extent it impacts other use-cases.
When I run an echo server on localhost:80 and run the example code below, here is the signature trace log:
Notice that host:localhost:80 is used in the signing process, but the host header received was simply localhost. This leads a server to attempt to use a different value to validate the signature than was used by this library.
Regression Issue
Select this option if this issue appears to be a regression.
Expected Behavior
Setting http://hostname:80 should calculate the signature that ends up being specified in the Host header.
Current Behavior
It looks like hostname:80 is used to calculate the signature, and hostname is set as the host header. I get a SignatureDoesNotMatch from a ceph server when :80 is included, but not when :80 is removed.
Describe the bug
It appears that when I explicitly set the default port in an s3 endpoint, the payload signature is calculated using
hostname:port
, but onlyhostname
is set in the header, leading to a signature validation failure server-side. I encountered this issue when using rook ceph, but I don't know to what extent it impacts other use-cases.When I run an echo server on
localhost:80
and run the example code below, here is the signature trace log:And here is the request as was received by the server:
Notice that
host:localhost:80
is used in the signing process, but thehost
header received was simplylocalhost
. This leads a server to attempt to use a different value to validate the signature than was used by this library.Regression Issue
Expected Behavior
Setting
http://hostname:80
should calculate the signature that ends up being specified in theHost
header.Current Behavior
It looks like
hostname:80
is used to calculate the signature, andhostname
is set as the host header. I get aSignatureDoesNotMatch
from a ceph server when:80
is included, but not when:80
is removed.Reproduction Steps
Code:
Possible Solution
Either:
Additional Information/Context
No response
Version
Environment details (OS name and version, etc.)
Linux x86 and macOS M3
Logs
No response
The text was updated successfully, but these errors were encountered: