SignatureDoesNotMatch when deployed behind haproxy with url rewrite? #553
Replies: 1 comment 4 replies
-
@alexlovelltroy I was able to reproduce the error you are seeing. The issue is the "http-request replace-path" directive. This is causing the host header to change in the requests, and causing the v4 signature check to fail. Here are the relevant lines from the client (s3cmd) debug output using the command:
We can enable similar debug server side like this:
The client is calculating the request signature with To get matching host header you probably need the following in the s3cmd config:
And this will require a change to the haproxy config to remove the "http-request replace-path" directive. |
Beta Was this translation helpful? Give feedback.
-
I'm just getting started with versity and looking to include it with a larger set of applications within a microservice infrastructure. When deploying it alone, the quickstart with s3cmd works fine. However, when deploying it within docker-compose and behind haproxy, I keep getting signature errors when trying to upload files. I've enabled debug flags everywhere, but I still can't figure out what is being signed and why it isn't working.
my guess is that there's a problem that the uri called by the client isn't the same as the one read by versity, but I can't figure out how to tell versity that it is behind haproxy.
I don't know what to check next. Hopefully there's enough information in this post to help me figure out what to change.
haproxy terminates SSL with a self-signed cert at a hostname I reference in /etc/hosts. For this test it was foobar.openchami.cluster
Here's my docker compose snippet:
Here's the relevant parts of my haproxy config:
My S3cmd config:
Interestingly, I can make a bucket without issue:
Most anything else fails with a 403 Signature problem:
Here's the expanded error with
--debug
added:Beta Was this translation helpful? Give feedback.
All reactions