Krijg fout voor ontbrekende X-Amz-Date header ondanks header worden opgenomen in krul verzoek

stemmen
0

Ik heb de opgenomen curlopdracht met zijn uitgebreide uitvoer uit mijn krullen verzoek hieronder. API eindpunt toetsen gemaskeerd. Ik heb de meegeleverde X-Amz-Dateheader, maar nog steeds een fout zeggend dat het ontbreekt.

curl --location --request POST 'https:<endpoint>' \
> --header 'Authorization: AWS4-HMAC-SHA256 Credential=<ACCESS-KEY>/202
00113/us-east-1/execute-api/aws4_request, SignedHeaders=host;X-Amz-Date, Signat
ure=b24542659436d1e0f3d8dbd6a24ebded3e6070aabe504fc1f62dec31e019216e' --verbose
*   Trying <IP address>...
* TCP_NODELAY set
* Connected to ENDPOINT (IP ADDRESS) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /Users/omarrahman/anaconda3/ssl/cacert.pem
  CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: CN=*.execute-api.us-east-1.amazonaws.com
*  start date: Sep 17 00:00:00 2019 GMT
*  expire date: Oct 17 12:00:00 2020 GMT
*  subjectAltName: host ENDPOINT matched cert's *.execute-api.us-east-1.amazonaws.com
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify ok.
> POST /staging/crc-alerts HTTP/1.1
> Host: ENDPOINT
> User-Agent: curl/7.55.1
> Accept: */*
> Authorization: AWS4-HMAC-SHA256 Credential=ACCESSKEY/20200113/us-east-1/execute-api/aws4_request, SignedHeaders=host;X-Amz-Date, Signature=b24542659436d1e0f3d8dbd6a24ebded3e6070aabe504fc1f62dec31e019216e
> 
< HTTP/1.1 403 Forbidden
< Date: Mon, 13 Jan 2020 20:47:16 GMT
< Content-Type: application/json
< Content-Length: 312
< Connection: keep-alive
< x-amzn-RequestId: 1a8b317e-f18f-436d-8013-0846d95c72f4
< x-amzn-ErrorType: IncompleteSignatureException
< x-amz-apigw-id: GQaVLG2cIAMFyfA=
< 
* Connection #0 to host ENDPOINT left intact
{message:Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=AWS4-HMAC-SHA256 Credential=ACCESSKEY/20200113/us-east-1/execute-api/aws4_request, SignedHeaders=host;X-Amz-Date, Signature=b24542659436d1e0f3d8dbd6a24ebded3e6070aabe504fc1f62dec31e019216e}
De vraag is gesteld op 13/01/2020 om 23:55
bron van user
In andere talen...                            

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more