I'm a developer that is trying to integrate (send data) to a ECS instance using the S3 API.
In maybe 1-5% of the requests we get an error stating that signature doesnt match. Obviously the auth is correct, since most requests goes through and data is stored.
The Error thrown by the client is (hand typed so might be some typos):
com.amazonaws.request - Received error response: com.amazonaws.services.s3.model.amazonS3Exception: The request signature we calculated does not match the signature you provided. Check your secret Access Key and signing method.
I'm wondering if someone else experienced this? It's the random bahavior and the small amount of errors that is a bit confusing in my opinion.
We are using ECS Community Edition v3.6.2.0 have same error reported:
Caused by: software.amazon.awssdk.services.s3.model.S3Exception: The request signature we calculated does not match the signature you provided. Check your Secret Access Key and signing method.
I am 100% we are using the correct Secret Access Key. To be sure, where can I check the setting for the signing method in the Community edition?
We run a number of tests and we have 2 partial update tests that give this error. The same code executed against the ECS TestDrive (https://object.ecstestdrive.com) are successful.
ECS: 3.7: S3: (HTTP 403) The request signature we calculated does not match the signature you provided
Summary: After upgrade to ECS Release 3.7 S3 application(s) show error: (HTTP 403) The request signature we calculated does not match the signature you provided This happens for applicationsSee more
After upgrade to ECS Release 3.7 S3 application(s) show error: (HTTP 403) The request signature we calculated does not match the signature you provided
This only affects applications utilizing signature version 4.
s3cmd --host 10.246.151.145:9020 ls s3://restic
ERROR: S3 error: 403 (SignatureDoesNotMatch): The request signature we calculated does not match the signature you provided. Check your Secret Access Key and signing method. For more information, see REST Authentication and SOAP#
from ECS logs, "?location" request are successful but other PUT/GET requests fail:
Resp Bucket/
Size Time Object/
Node Time Request ID Prot Type MPU Client IP Status (bytes) (ms) Options
10.x.x.x 04-20 10:10:47 0af69791:1802f264522:3d4a:8cb s3 GET - 10.x.x.x 200 330 4 restic/?location
10.x.x.x 04-20 10:10:47 0af69791:1802f264522:3c18:b99 s3 GET - 10.x.x.x 403 330 2 restic/?delimiter=%2F
Signature version 4 incorporates the bucket region into the authentification.
In version 3.7 changes were made to bucket-location API. The response from the API is currently " ", causing the signature mismatch.
This is being reworked and will be updated in a later release.
First option is to not use signature version 4 and use signature version 2 instead, if applicable.
The second option is to configure a default location.
Please check the documentation for your application how to properly set the region. The default Region is "us-east-1"
Applications such as S3 Browser or CloudBerry Explorer cannot connect to ECS using S3 signature v4 and below error message can be seen:
The request signature we calculated does not match the signature you provided. Check your Secret Access Key and signing method. For more information, see REST Authentication and SOAP Authentication for details.
Errors shown in dataheadsvc.log:
Either LoadBalancer or Proxy Server was changing host header to point to different end point than what was configured.
Resolution
Please get answers to below questions:
What ECS Version is installed? S3 Signature v4 is supported since ECS 3.0 (https://dell.to/3LGP4mJ)
What version of tools used such as Cloudberry Explorer and/or S3 Browser?
Is the connection via Load Balancer or Proxy Server?
If yes: Please try the v4 connection by using an ECS node as endpoint
If this is working, please have the customer further investigate the settings of Load Balancer / Proxy Server
For Apache the below settings should be verified:
Turn this option on to preserve the Host header
ProxyPreserveHost Directive
Description:
Use incoming Host HTTP request header for proxy request
Syntax:
ProxyPreserveHost On|Off
Default:
ProxyPreserveHost Off
Context:
server config, virtual host, directory
Status:
Extension
Module:
mod_proxy
Compatibility:
Usable in directory context in 2.3.3 and later.
When enabled, this option will pass the Host: line from the incoming request to the proxied host, instead of the hostname specified in the ProxyPass line.
This option should normally be turned Off. It is mostly useful in special configurations like proxied mass name-based virtual hosting, where the original Host header needs to be evaluated by the backend server.
More details can be found here: https://dell.to/3KHPdVz
JasonCwik
1 Rookie
•
281 Posts
6964
0
Posted September 18th, 2018 08:00
What version of ECS? Also check the name of the object getting uploaded and/or any metadata you're including. If this is the Java SDK, you can turn on request logging to get all the request headers. https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/java-dg-logging.html#sdk-net-logging-verbose