amazon web services - AWS Secret Manager API Canonical Request - Stack Overflow

I am trying to get AWS secrets via API in uipath and I am not sure if the format of my canonical reques

I am trying to get AWS secrets via API in uipath and I am not sure if the format of my canonical request is correct. I am getting this error:

{
"__type":"InvalidSignatureException",
"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details."
}

Below is my canonical request:

POST
/
 
content-type:application/x-amz-json-1.1
host:secretsmanager.ap-southeast-2.amazonaws
x-amz-content-sha256:{hashed_payload}
x-amz-date:{timestamp}
x-amz-target:secretsmanager.GetSecretValue
 
content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target
{hashed_payload}

This is my string to sign:

AWS4-HMAC-SHA256
{timestamp}
{YYYYMMDD}/{region}/secretsmanager/aws4_request
{hashedCanonicalRequest}

This is my authorization header:

AWS4-HMAC-SHA256 Credential={accesskey}/{YYYYMMDD}/{region}/secretsmanager/aws4_request,SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target,Signature={aws_signature}

I pass along same arguments in the authorization to the headers in my POST request. I can get correct hash output with my code using the samples from AWS documentation. Can someone please check where did it go wrong? Thank you!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742395614a4435880.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信