Possible issue with upload url, SignatureDoesNotMatch

  • 1
  • Problem
  • Updated 2 months ago
This error occurs once I post to the upload URL I received. Error "SignatureDoesNotMatch:The request signature we calculated does not match the signature you provided. Check your key and signing method." What could be going on? I am using ColdFusion, *NOT* PHP. CF and/or plain English responses will suffice. I know the upload URL already contains my auth. Why would it return SignatureDoesNotMatch though? Is it possible that somehow, my upload URL is not correct, ie: the server may have messed with it on my end? Thank you very much!!!!!!!!!

Please let me know whether the upload URL I received is correct or whether my server may have messed it up. Here it is:

https://rightsignature-sr-production.s3.amazonaws.com/public_api/sending_requests/00781214-38e4-4b7c-9325-1d861a0c4edd/testingfile_3.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3O5OABKJS3RDKI72%2F20180928%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180928T174950Z&X-Amz-Expires=3600&X-Amz-Security-Token=FQoGZXIvYXdzEJP%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDOTIO2xIp%2B%2BVNuVqYiK3AyEOgtQqgLQUasSBdcHiG7GqPMrJptLF0ZpmiUg55q6MqgV4cgcz5bHVBB1eu8axYHks4ZrG%2FVNJkdlP09JZq5z85jsCiliYAJzp%2B8fytkdIdm%2B%2F10wOGy43Tgk3amKFfNcd16eCo288nEFy5rlOhdaQyq73PrflZFjGbL6jA6gr%2FIeSW1Jr0fJG8MdI7bMoFFqhClTuoZQiy4NPkV5ppyB%2BlUtJAT62xAkAvqUfRqp8%2Bxr61atE%2FI7zzqX%2FPI9wEW75Z0S4BoO%2Ff2YlEdc%2F5V3onJiMxbV%2FSjyGfyocJtL7c8MuYwBbq6OAGt3juEYZro2VopXrMbsdQ6XBGMFv%2FRf33fk1l4f0rQxSNN9rUuX%2FCbfSXfbDTPYfxgQTCf6MBOg1txUoEmCZRnBw3CI0CDAKdDvBXnqXy%2Bv%2BPk5AoR4KHgu%2FOIOpYh9Uf4INXKxwNtnpjMUoOfKVTWvuBIf4nqREkHI5QBXY7LSaePzadIBUnFuKRBtoOQsOupBiNuKmSBlLVRxt5KHtPXVnMDddvhSNzC49tPj96k89P2LftrsHEpO%2Bca%2F%2BHNHMJqN%2F8ZpICxnkOFZEQf8oo8O53QU%3D&X-Amz-Signature=85d091fe9dc705b3c44053fbdf452cd092efacf9533d4cf33ddb94f3fb398262&X-Amz-SignedHeaders=Host&x-amz-acl=private file:



Photo of Stephanie Fischer

Stephanie Fischer

  • 13 Posts
  • 0 Reply Likes

Posted 2 months ago

  • 1
Photo of Saravanan Kannan

Saravanan Kannan, Employee

  • 37 Posts
  • 6 Reply Likes
Hi Stephanie,

Looking at your upload url, it seems to be encoded or somehow incorrect.
A sample upload url will look like:

https:// rightsignature-sr-development.s3.amazonaws.com/public_api/sending_requests/b0ad3d8a-4a61-4d6a-80e3-4095bc9d7b0f/my_upload.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJSRMQNOZ6XOBJZ4A%2F20181001%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181001T134936Z&X-Amz-Expires=3600&X-Amz-Signature=057067cfd5d58827bf2ccbdb02e9db4688aa07cf2eef6f7982619755fc6ddba1&X-Amz-SignedHeaders=Host&x-amz-acl=private

Also when the url does not match, we show the error "The request signature we calculated does not match the signature you provided. Check your key and signing method."

Please make sure, you use the s3 url you receive from step 1 as such for your PUT request.

Hope this helps.

Thanks
Saravanan
Photo of Stephanie Fischer

Stephanie Fischer

  • 13 Posts
  • 0 Reply Likes
I am now getting the below as upload_url. I think my problem could have been decoding/encoding previously. However, with the below URL, I now get the error "X-Amz-Algorithm only supports "AWS4-HMAC-SHA256" I do not know what that means. All I am doing is posting to the URL provided. I am not including any auth headers as I understand that the URL contains my auth information. Can you please help me further? Thank you!

https://rightsignature-sr-production.s3.amazonaws.com/public_api/sending_requests/012137a3-1b80-4e8f-9e25-3ebfe2f84976/app_3196.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Credential=ASIA3O5OABKJULMXDTVK%2F20181004%2Fus-east-1%2Fs3%2Faws4_request\u0026X-Amz-Date=20181004T213959Z\u0026X-Amz-Expires=3600\u0026X-Amz-Security-Token=FQoGZXIvYXdzECUaDHZxiGmqUbTQWo2LnSK3A8eD35LEJxdc2BsC4QgVyBbEU2XZK4SznsVNFiDDeBDGQaa6rz7%2BDjJuwHh0AjbRMmZRZI9CvPk6ekV4szZcwa%2BKSA2jTAU5yd9ymyQnvn43PkK1vTCZ16UhTcA3llUkD2F6DIFrd%2BbHWnsdB3TzIB%2FgmLq9XSom%2B25x7CZuJZqgvUYfDvg3ZzPTZ1G6qCpMp0hl9wiAOpkyESN3wCC6KASViGWCuSbOiaII5zGSrWxfWITxSFTzJM6iqmfifmz6A9JkXV5UIy4aqQ3cbJsuk8Wauu73omtt0mFXj2goKPCianRBCvhltl8LB3KOFQoumpACPqzsW995noYcL0qOWflowlMpfELnivD8TgRGtEBo7z2vNAVMHZY%2FIWvPy1BABsMQTaYHaG8OxNNSvF0Avv%2FwQlEaBw%2FiOTf44h0chNE6FxLryQnMvD04nF0Maas%2BnqAoGCneoQPSB7woAspkl2btTZ%2B3d%2FOaV46u4vT4RGGzoWln1Y7NXovv55znIpltg%2F4U%2FB4cCFNNxhyLbR4qx7LT6Eey3JiqjQ%2FloolbOtOgqskbBLsGnIvR5bWnRBAhhWIq332tsRgoyM%2FZ3QU%3D\u0026X-Amz-Signature=87173eea073422f6d991d4f7a15d7fa622c0eaf821a2945fd609ce6b8061a3d1\u0026X-Amz-SignedHeaders=Host\u0026x-amz-acl=privat


Photo of Saravanan Kannan

Saravanan Kannan, Employee

  • 37 Posts
  • 6 Reply Likes
I can see some occurrence of this unicode `\u0026` in your url, may be try to replace them with `&` and see if it works. Not sure if there are any other characters like that.
Photo of Stephanie Fischer

Stephanie Fischer

  • 13 Posts
  • 0 Reply Likes
Thank you. That seems to have worked. Now I get the error "Unable to determine MIME type of file." I am providing the mimetype. Here is the ColdFusion code:

<cfhttp url="https://rightsignature-sr-production.s3.amazonaws.com/public_api/sending_requests/e596a133-cae0-4ed5-b398-98f3bc5a52b4/app_3196.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3O5OABKJRDWQPYGW%2F20181005%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181005T141641Z&X-Amz-Expires=3600&X-Amz-Security-Token=FQoGZXIvYXdzEDcaDPBm8aiGZx1E3WaIrCK3A36VItLlyn5U5KfNd%2BJ%2FoS0XXvjBhCPMolZr4C36lYh0eJAChDWxlpLbzNxmamVSLJilmRMjwjh9X1Jw2Y2wNgmYRSWttaBROADkGZ9l3OXZeCk98ZkooJr5IK2a2FEf2sdNtMPeU0%2BD8KAnuvKiouPjwka5JMX%2FqH9zLC%2B3%2FzEgQDdOz2gw8FYnNYkhaFTllOkUGnp3SstUEEuQqLLaKx%2FMgLhCnJe98AqdFg4Wj42TMN3aZUf3voKKGT5Hvc3pKolbtqQ2mu08wHFKV%2FE%2FgBbDgcWDOG7t4N04gCUNo9KI44Jnp0TR%2Bmy0%2Fva4ZJBP%2BcBB6GtZxP3DrE%2BOoLoD5Ko%2FR%2Bc5mqzMVrIYbWRXuKvhCfvR%2BmOl%2F2w4fNeQ8DS5GWt4zOMVUpL0XD5EO7Rc9m35jx86HFyeuUmrVWID%2BJwj1ELrEdC5pPLgUN7mRiZLw1J1QeI2F2UwAfDmVLFSuD0YkcpDttC%2FCIv9haQSSAwRpPQiiZ%2FP5MG62CpGRB4svCN4aHXZez%2Fyzbki56umgEWDls%2F%2Bj2fuO7xKI4QrrsR%2Ft6C1m6Vr0yfl9KFEiJ0FaZuj%2B6IvVoko5NHd3QU%3D&X-Amz-Signature=b34888a3d63f5d398dd09507f010376f25dc9b949276b2757a27457cb9c8d7c6&X-Amz-SignedHeaders=Host&x-amz-acl=private" method="put" result="setDocUpload" resolveurl="No">
<cfhttpparam type="header" name="Content-Type" value="application/pdf">
<cfhttpparam type="header" name="mimetype" value="application/pdf">
<cfhttpparam type="file" name="app_3196.pdf" file="C:\Sites\straightlineprocessing.com\data\applicationDev\uploads\3196\app_3196.pdf">
</cfhttp>


Photo of Saravanan Kannan

Saravanan Kannan, Employee

  • 37 Posts
  • 6 Reply Likes
I am not familiar with cold fusion syntax, what happens when you just have content-type and remove the mimetype param?
Photo of Stephanie Fischer

Stephanie Fischer

  • 13 Posts
  • 0 Reply Likes
I get the same error regarding mimetype missing.