Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 对AWS API网关的Sig4请求的主体是否默认签名?_Amazon Web Services_Aws Api Gateway - Fatal编程技术网

Amazon web services 对AWS API网关的Sig4请求的主体是否默认签名?

Amazon web services 对AWS API网关的Sig4请求的主体是否默认签名?,amazon-web-services,aws-api-gateway,Amazon Web Services,Aws Api Gateway,根据我有限的测试,下面对API网关的请求主体在默认情况下似乎没有签名 这是用于调用API的代码: testAPI: function(id_token, access_key, secret_key, session, name, pass) { let apigClient = awsApiGatewayClient.newClient({ invokeUrl: 'https://sdf523lkas.execute-api.ap-southeast-2.amazonaws.com/', /

根据我有限的测试,下面对API网关的请求主体在默认情况下似乎没有签名

这是用于调用API的代码:

testAPI: function(id_token, access_key, secret_key, session, name, pass) {

let apigClient = awsApiGatewayClient.newClient({
invokeUrl: 'https://sdf523lkas.execute-api.ap-southeast-2.amazonaws.com/', // api url
accessKey: access_key, 
secretKey: secret_key, 
sessionToken: session, 
region: 'ap-southeast-2'
});

let method = 'POST'
let pathTemplate = api.createRDSPath
let params = {}
let additionalParams = {
  headers: {
    myHeader: 'this is my header' // Check if custom header is signed
  }
}

let body = { // Check if body is signed
  name: "name",
  pass: "pass",
}

// Send Request
apigClient.invokeApi(params, pathTemplate, method, additionalParams, body)
.then(function(result){
    console.log(result)
}).catch( function(result){
    console.log(result)
});
}
我似乎记得找到了一些文件,实际上表明尸体没有签名,但我再也找不到那个参考资料了


我真的不相信我的测试,所以我想找到一个明确说明这两种方法的引用

签名正文始终是签名版本4的一部分

中的最后一行是请求有效负载的小写、十六进制编码的SHA-256哈希(即正文),它是实际签名过程输入的一个组件。如果正文为空,则空字符串e3b0c44298的SHA-256。。。使用

因此,与签名头不同——如果签名中包含签名头,则请求中会列出签名头——正文总是经过签名的