S3 backup using V4 signature

Hi,

I have been trying to add V4 signature compatibility to fdb source code . It seemed like just fixing authorization header in accordance to V4 authorization will fix the error.

https://github.com/apple/foundationdb/blob/0a46c6276efc90ef425666e381d1e118c115854c/fdbclient/BlobStore.actor.cpp#L942

But its still showing same errors.

[c3019041375c04d03bfcbe37cde293a0] HTTP ERROR=http_bad_response early=0, time=0.009464s HEAD /test-bucket/backups/mytestbackup contentLen=0 [310 out]
ERROR: Could not create backup container: Operation timed out
ERROR: An error was encountered during submission
Fatal Error: Backup error

Anyone has created authorization header as per s3 version v4 format ? Also is there something else I am missing?

Hi,

Just want to make sure you’ve seen this previous topic, it has a bunch of good info on debugging auth errors and some additional info on the signatures: How do I use `fdbbackup` with Google Cloud Storage?

Hi

Yes I have gone through it . I am using S3 as a backup agent and have modified the authentication signature to include v4 version.

[5723bbcf92f090b7b90a1422995ef52a] HTTP starting HEAD /test-bucket ContentLen:0
Request Header: Accept: application/xml
Request Header: Authorization: AWS4-HMAC-SHA256 Credential=<access_key_id>/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-date,Signature=fe5f80f77d5fa3beca038a248ff027d0445342fe2855ddc963176630326f1024
Request Header: Content-Length: 0
Request Header: Date: 20210811T053827Z
Request Header: Host: <host_address>
[5723bbcf92f090b7b90a1422995ef52a] HTTP ERROR=http_bad_response early=0, time=0.000659s HEAD /test-bucket contentLen=0 [366 out]
ERROR: Could not create backup container: Operation timed out
ERROR: An error was encountered during submission
Fatal Error: Backup error

The header files that are passed are following

and the cmd used for backup is :
fdbbackup start -C <cluster_file_path> -d blobstore://<access_key_id>:@s3.amazonaws.com::90/mytestbackup?bucket=test-bucket --log --knob_http_verbose_level=3