我正在尝试签署亚马逊 sts 令牌请求以临时访问我的 S3 帐户。我一直在按照 Signature Version 4 的说明进行操作,但没有成功。
我不断从亚马逊 sts 收到这条消息。
<Code>IncompleteSignature</Code>
<Message>Request must contain a signature that conforms to AWS standards</Message>
这是我发送的 url 请求。
https://sts.amazonaws.com/?AWSAccessKeyId=**********&Action=GetFederationToken&DurationSeconds=3600&SignatureMethod=HmacSHA256&SignatureVersion=4&Timestamp=2013-04-23T19:01:00Z&Version=2011-06-15&Signature=2fc3dc902a20a5aa25c3191f2aa6513088e11596082b6a563b00dc5ea4b8bfa0
按照 Signature Version 4 的步骤,这就是我计算签名的方式。
http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html
任务1:
GET\n
/\n
AWSAccessKeyId=<Access Key Removed>&
Action=GetFederationToken&
DurationSeconds=3600&
SignatureMethod=HmacSHA256&
SignatureVersion=4&
Timestamp=2013-04-23T19:01:00Z&
Version=2011-06-15\n
host:sts.amazonaws.com\n
host\n
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
任务 2:
AWS4-HMAC-SHA256\n
20130423T190100Z\n
20130423/us-gov-west-1/sts/aws4_request\n
5e769aeb49a050fd7cd1035122712098fd83220ea42a0d9871f0ff2fa622b1c6
任务 3:
Signature: 2fc3dc902a20a5aa25c3191f2aa6513088e11596082b6a563b00dc5ea4b8bfa0
任何帮助将不胜感激,到目前为止,我一直在努力解决这个问题。提前致谢 :)