Copy link to clipboard
Copied
Hi community,
would really appreciate the swarm knowledge to help me solve my riddle. I want to use Adobe Extract PDF API from within a SAP ERP report I am currently coding. I implemented all steps as I have tested them in Postman, all working fine there.
In SAP I encountered the problem during the put method to upload the PDF (as binary data), that the response was always the below 403 Forbidden. I installed a certificate in STRUST for *s3-accelerate.amazonaws.com, but that may be wrong according to the error?
Thanks,
André
HTTP/1.1 403 Forbidden
content-type: application/xml
transfer-encoding: chunked
connection: keep-alive
x-amz-request-id: ZTRKGBT40HVN0Z8G
x-amz-id-2: kzGtEYfihTEbHdLgRpXZTdON6LjRedpowTMcfqIUy5pmPh1TApz2qsfG55ACAiq0HzYygAElfug=
date: Thu, 19 Sep 2024 14:36:43 GMT
server: AmazonS3
x-cache: Error from cloudfront
via: 1.1 4b69099d64ffa1fbe8adbe1235065a14.cloudfront.net (CloudFront)
x-amz-cf-pop: FRA56-P7
x-amz-cf-id: pOWNrsQdiJAlOGEQRq_byitxjoZmRJpKozbgYrOWMEXUbKka6_majQ==
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><AWSAccessKeyId>ASIAWD2N7EVPARF6TTRP</AWSAccessKeyId><StringToSign>AWS4-HMAC-SHA256
20240919T143640Z
20240919/us-east-1/s3/aws4_request
ef462f233fef940347e3d9d567623c70c4a240f03772bb9d3f5f691fa6fd9043</StringToSign><SignatureProvided>760cfa6e6266af260a1a114af53f0838e0b6cba8dcf7b6839ce8e1a800a0c3db</SignatureProvided><StringToSignBytes>41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 0a 32 30 32 34 30 39 31 39 54 31 34 33 36 34 30 5a 0a 32 30 32 34 30 39 31 39 2f 75 73 2d 65 61 73 74 2d 31 2f 73 33 2f 61 77 73 34 5f 72 65 71 75 65 73 74 0a 65 66 34 36 32 66 32 33 33 66 65 66 39 34 30 33 34 37 65 33 64 39 64 35 36 37 36 32 33 63 37 30 63 34 61 32 34 30 66 30 33 37 37 32 62 62 39 64 33 66 35 66 36 39 31 66 61 36 66 64 39 30 34 33</StringToSignBytes><CanonicalRequest>PUT
/b109917f90d040b79e0ee83e7b0406c6_54491DCD6516854E0A495C73%40techacct.adobe.com/1ae16e81-f902-4969-a657-a4dd50ab9085
X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAWD2N7EVPARF6TTRP%2F20240919%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240919T143640Z&X-Amz-Expires=3600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjECMaCXVzLWVhc3QtMSJHMEUCIQCfiHax7gtPDHs9M6iiyDlF1%2F%2Fzt6kyB3od7CtQdsxBGAIgLGv%2BYMUbrmreysI7Bwaw3pSVSz%2BrPNcCSGqdKY00GxkqqwUIXBAAGgw0MjA1MzM0NDU5ODIiDIF3ed12MbC7jjY3kiqIBen97Nt76c8QYzswKX%2FmKX5o2%2F8fLkPJ50W5Os4zjDMcwthPs03HEmGF9ype4DiEpmtDwhaKL9%2F4wcC8Pj9eLQv6dgd1ZACC7Hdyfjo3yGWL3s3ZGaENTu5gCAiPuLb5h007SS8S90K2nDwZH5a3GFUPpAc4CJ1UNZz1TuH1CPL3CB0TNYJAmCdVIx9udxXFfbrOkuydO8%2FLTeyFCeGkFpIA6zj4JmCQjSP5DFTQPmhA7%2FWam6OsUBw4MQhMFnOO1g7HYWSIpqnY9l6HOO1%2Bjra68wvSmi2JN6BYfERw8mNe07UuSswYyCCz6Jy1AOfjcYcjkdNbbeXcpJGDyRdG9dE9FR5xl7vg7Bm40TE%2BLix7Q0%2Fb%2B0BrZG9SB1Vtx6B8RA3bZxT3kQJjc3sJLsG3Ms04XO4kfOW%2B4z%2Ba1J5gD2FOghFTdu174c1Wwv9yAuM7EnvknUNBC7xQAF0fNaAQCLzh%2FpCmPFbzERcrJ%2BJjLn6qvTYdPJeCQIYthJiiZJHpXFuxKiB%2F5Y2rJw4EdcHs9vyBX4XnFzSNuCHvYBIvHuZpHFzQYA%2F0bKlJd1VKsBjHecwGDw2kbZ1MrrlOgGRTzLBnHYCtBc48fVrBtm1cfFk05qTMAVP9W%2B1%2F9oY6ZaG1P%2FfDvANezsXsyswgPWUSNoK1TsSaNcUJjR7b%2BFPSb4AHVgshIH9wnA1iOrY2DOJGMchjEDSsQu6cUoQENWhp0cnpf8FVY9G44ETnUuPJr06A9xba%2FrT%2BFJD87KAAU%2FYDZgGXHRbWi8XBAyytx%2F%2BTaiEbYhgSQQvy%2BT7i6SmC0F94OYlw%2BAsGspvKquGpdMdNjM32vW%2FBWgcO4T6VPKoG4Mhi9uMdhWYwcDDCg7C3BjqpAfEbJspSduIZQ2%2FRF4iAh1Ej%2BA1ErjEo2gnz19V0FEStTKkDy7TBBnZ9O2IWVckg9seoYmobXFo3xvjZzavpAhrDvP%2FXoimh5AZmx1D9M406661xMs4%2Fnr%2FJLKrs%2BaILUeL5IM6oaFiH3dUDK%2BMsoXdPzr9r52OC8a4%2Fj9WNgKrcCROuB%2F1uwIOTNkk%2Ft25ZHFML7msDJj9LxcZxjmmJG9dqdrUIofPUCgA%3D&X-Amz-SignedHeaders=content-type%3Bhost
content-type:application/octet-stream
host:dcplatformstorageservice-prod-us-east-1.s3-accelerate.amazonaws.com
content-type;host
UNSIGNED-PAYLOAD</CanonicalRequest><CanonicalRequestBytes>50 55 54 0a 2f 62 31 30 39 39 31 37 66 39 30 64 30 34 30 62 37 39 65 30 65 65 38 33 65 37 62 30 34 30 36 63 36 5f 35 34 34 39 31 44 43 44 36 35 31 36 38 35 34 45 30 41 34 39 35 43 37 33 25 34 30 74 65 63 68 61 63 63 74 2e 61 64 6f 62 65 2e 63 6f 6d 2f 31 61 65 31 36 65 38 31 2d 66 39 30 32 2d 34 39 36 39 2d 61 36 35 37 2d 61 34 64 64 35 30 61 62 39 30 38 35 0a 58 2d 41 6d 7a 2d 41 6c 67 6f 72 69 74 68 6d 3d 41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 26 58 2d 41 6d 7a 2d 43 72 65 64 65 6e 74 69 61 6c 3d 41 53 49 41 57 44 32 4e 37 45 56 50 41 52 46 36 54 54 52 50 25 32 46 32 30 32 34 30 39 31 39 25 32 46 75 73 2d 65 61 73 74 2d 31 25 32 46 73 33 25 32 46 61 77 73 34 5f 72 65 71 75 65 73 74 26 58 2d 41 6d 7a 2d 44 61 74 65 3d 32 30 32 34 30 39 31 39 54 31 34 33 36 34 30 5a 26 58 2d 41 6d 7a 2d 45 78 70 69 72 65 73 3d 33 36 30 30 26 58 2d 41 6d 7a 2d 53 65 63 75 72 69 74 79 2d 54 6f 6b 65 6e 3d 49 51 6f 4a 62 33 4a 70 5a 32 6c 75 58 32 56 6a 45 43 4d 61 43 58 56 7a 4c 57 56 68 63 33 51 74 4d 53 4a 48 4d 45 55 43 49 51 43 66 69 48 61 78 37 67 74 50 44 48 73 39 4d 36 69 69 79 44 6c 46 31 25 32 46 25 32 46 7a 74 36 6b 79 42 33 6f 64 37 43 74 51 64 73 78 42 47 41 49 67 4c 47 76 25 32 42 59 4d 55 62 72 6d 72 65 79 73 49 37 42 77 61 77 33 70 53 56 53 7a 25 32 42 72 50 4e 63 43 53 47 71 64 4b 59 30 30 47 78 6b 71 71 77 55 49 58 42 41 41 47 67 77 30 4d 6a 41 31 4d 7a 4d 30 4e 44 55 35 4f 44 49 69 44 49 46 33 65 64 31 32 4d 62 43 37 6a 6a 59 33 6b 69 71 49 42 65 6e 39 37 4e 74 37 36 63 38 51 59 7a 73 77 4b 58 25 32 46 6d 4b 58 35 6f 32 25 32 46 38 66 4c 6b 50 4a 35 30 57 35 4f 73 34 7a 6a 44 4d 63 77 74 68 50 73 30 33 48 45 6d 47 46 39 79 70 65 34 44 69 45 70 6d 74 44 77 68 61 4b 4c 39 25 32 46 34 77 63 43 38 50 6a 39 65 4c 51 76 36 64 67 64 31 5a 41 43 43 37 48 64 79 66 6a 6f 33 79 47 57 4c 33 73 33 5a 47 61 45 4e 54 75 35 67 43 41 69 50 75 4c 62 35 68 30 30 37 53 53 38 53 39 30 4b 32 6e 44 77 5a 48 35 61 33 47 46 55 50 70 41 63 34 43 4a 31 55 4e 5a 7a 31 54 75 48 31 43 50 4c 33 43 42 30 54 4e 59 4a 41 6d 43 64 56 49 78 39 75 64 78 58 46 66 62 72 4f 6b 75 79 64 4f 38 25 32 46 4c 54 65 79 46 43 65 47 6b 46 70 49 41 36 7a 6a 34 4a 6d 43 51 6a 53 50 35 44 46 54 51 50 6d 68 41 37 25 32 46 57 61 6d 36 4f 73 55 42 77 34 4d 51 68 4d 46 6e 4f 4f 31 67 37 48 59 57 53 49 70 71 6e 59 39 6c 36 48 4f 4f 31 25 32 42 6a 72 61 36 38 77 76 53 6d 69 32 4a 4e 36 42 59 66 45 52 77 38 6d 4e 65 30 37 55 75 53 73 77 59 79 43 43 7a 36 4a 79 31 41 4f 66 6a 63 59 63 6a 6b 64 4e 62 62 65 58 63 70 4a 47 44 79 52 64 47 39 64 45 39 46 52 35 78 6c 37 76 67 37 42 6d 34 30 54 45 25 32 42 4c 69 78 37 51 30 25 32 46 62 25 32 42 30 42 72 5a 47 39 53 42 31 56 74 78 36 42 38 52 41 33 62 5a 78 54 33 6b 51 4a 6a 63 33 73 4a 4c 73 47 33 4d 73 30 34 58 4f 34 6b 66 4f 57 25 32 42 34 7a 25 32 42 61 31 4a 35 67 44 32 46 4f 67 68 46 54 64 75 31 37 34 63 31 57 77 76 39 79 41 75 4d 37 45 6e 76 6b 6e 55 4e 42 43 37 78 51 41 46 30 66 4e 61 41 51 43 4c 7a 68 25 32 46 70 43 6d 50 46 62 7a 45 52 63 72 4a 25 32 42 4a 6a 4c 6e 36 71 76 54 59 64 50 4a 65 43 51 49 59 74 68 4a 69 69 5a 4a 48 70 58 46 75 78 4b 69 42 25 32 46 35 59 32 72 4a 77 34 45 64 63 48 73 39 76 79 42 58 34 58 6e 46 7a 53 4e 75 43 48 76 59 42 49 76 48 75 5a 70 48 46 7a 51 59 41 25 32 46 30 62 4b 6c 4a 64 31 56 4b 73 42 6a 48 65 63 77 47 44 77 32 6b 62 5a 31 4d 72 72 6c 4f 67 47 52 54 7a 4c 42 6e 48 59 43 74 42 63 34 38 66 56 72 42 74 6d 31 63 66 46 6b 30 35 71 54 4d 41 56 50 39 57 25 32 42 31 25 32 46 39 6f 59 36 5a 61 47 31 50 25 32 46 66 44 76 41 4e 65 7a 73 58 73 79 73 77 67 50 57 55 53 4e 6f 4b 31 54 73 53 61 4e 63 55 4a 6a 52 37 62 25 32 42 46 50 53 62 34 41 48 56 67 73 68 49 48 39 77 6e 41 31 69 4f 72 59 32 44 4f 4a 47 4d 63 68 6a 45 44 53 73 51 75 36 63 55 6f 51 45 4e 57 68 70 30 63 6e 70 66 38 46 56 59 39 47 34 34 45 54 6e 55 75 50 4a 72 30 36 41 39 78 62 61 25 32 46 72 54 25 32 42 46 4a 44 38 37 4b 41 41 55 25 32 46 59 44 5a 67 47 58 48 52 62 57 69 38 58 42 41 79 79 74 78 25 32 46 25 32 42 54 61 69 45 62 59 68 67 53 51 51 76 79 25 32 42 54 37 69 36 53 6d 43 30 46 39 34 4f 59 6c 77 25 32 42 41 73 47 73 70 76 4b 71 75 47 70 64 4d 64 4e 6a 4d 33 32 76 57 25 32 46 42 57 67 63 4f 34 54 36 56 50 4b 6f 47 34 4d 68 69 39 75 4d 64 68 57 59 77 63 44 44 43 67 37 43 33 42 6a 71 70 41 66 45 62 4a 73 70 53 64 75 49 5a 51 32 25 32 46 52 46 34 69 41 68 31 45 6a 25 32 42 41 31 45 72 6a 45 6f 32 67 6e 7a 31 39 56 30 46 45 53 74 54 4b 6b 44 79 37 54 42 42 6e 5a 39 4f 32 49 57 56 63 6b 67 39 73 65 6f 59 6d 6f 62 58 46 6f 33 78 76 6a 5a 7a 61 76 70 41 68 72 44 76 50 25 32 46 58 6f 69 6d 68 35 41 5a 6d 78 31 44 39 4d 34 30 36 36 36 31 78 4d 73 34 25 32 46 6e 72 25 32 46 4a 4c 4b 72 73 25 32 42 61 49 4c 55 65 4c 35 49 4d 36 6f 61 46 69 48 33 64 55 44 4b 25 32 42 4d 73 6f 58 64 50 7a 72 39 72 35 32 4f 43 38 61 34 25 32 46 6a 39 57 4e 67 4b 72 63 43 52 4f 75 42 25 32 46 31 75 77 49 4f 54 4e 6b 6b 25 32 46 74 32 35 5a 48 46 4d 4c 37 6d 73 44 4a 6a 39 4c 78 63 5a 78 6a 6d 6d 4a 47 39 64 71 64 72 55 49 6f 66 50 55 43 67 41 25 33 44 26 58 2d 41 6d 7a 2d 53 69 67 6e 65 64 48 65 61 64 65 72 73 3d 63 6f 6e 74 65 6e 74 2d 74 79 70 65 25 33 42 68 6f 73 74 0a 63 6f 6e 74 65 6e 74 2d 74 79 70 65 3a 61 70 70 6c 69 63 61 74 69 6f 6e 2f 6f 63 74 65 74 2d 73 74 72 65 61 6d 0a 68 6f 73 74 3a 64 63 70 6c 61 74 66 6f 72 6d 73 74 6f 72 61 67 65 73 65 72 76 69 63 65 2d 70 72 6f 64 2d 75 73 2d 65 61 73 74 2d 31 2e 73 33 2d 61 63 63 65 6c 65 72 61 74 65 2e 61 6d 61 7a 6f 6e 61 77 73 2e 63 6f 6d 0a 0a 63 6f 6e 74 65 6e 74 2d 74 79 70 65 3b 68 6f 73 74 0a 55 4e 53 49 47 4e 45 44 2d 50 41 59 4c 4f 41 44</CanonicalRequestBytes><RequestId>ZTRKGBT40HVN0Z8G</RequestId><HostId>kzGtEYfihTEbHdLgRpXZTdON6LjRedpowTMcfqIUy5pmPh1TApz2qsfG55ACAiq0HzYygAElfug=</HostId></Error>
Just found the solution myself. In Postman content-type `application/octet-stream` was used and it worked. In my coding I had to use `application/pdf` instead, whyever.
Thanks anyways,
André
Copy link to clipboard
Copied
I don't know enough about the SAP API to help here. But my guess is that SAP is modifying the content such that it no longer matches what the presigned URL is expecting.
Copy link to clipboard
Copied
Hi Joel,
thanks for your reply. I tried various ways of pushing the URL:
1. the HTTP client connector class in SAP is splitting the URL automatically based on the standard: Main URL, Path starting from `/`, Query starting from `?`.
2. I also tried splitting it before passing into URL and URI
Both gave the same result. So my assumption from reading the error response was, that it has to do with authentification and/or SSL certificate. After googling the error, it sounded more like it could be anything, even wrong request by some misplaced characters or the encoding (like the occasional %2 etc.). But the exact request URL works fine in Postman from local PC. So its either auth or SAP is messing something up that I just can´t see.......
Regards,
André
Copy link to clipboard
Copied
Just found the solution myself. In Postman content-type `application/octet-stream` was used and it worked. In my coding I had to use `application/pdf` instead, whyever.
Thanks anyways,
André