Signature expired: is now earlier than error : InvalidSignatureException

后端 未结 10 2325
滥情空心
滥情空心 2020-12-05 04:45

I am trying a small example with AWS API Gateway and IAM authorization. The AWS API Gateway generated the below Endpoint :

https://xyz1234.execute-api.us-e         


        
10条回答
  •  误落风尘
    2020-12-05 05:06

    A request signed with AWS sigV4 includes a timestamp for when the signature was created. Signatures are only valid for a short amount of time after they are created. (This limits the amount of time that a replay attack can be attempted.)

    When the signature is validated the timestamp is compared to the current time. If this indicates that the signature was not created recently, then signature validation fails with the error message you mentioned.

    A common cause of this is when the local clock on the host generating the signature is off by more than a couple of minutes.

提交回复
热议问题