@vizamodo/aws-sts-core 0.1.38 → 0.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sts/issue.js +4 -4
- package/package.json +1 -1
package/dist/sts/issue.js
CHANGED
|
@@ -63,7 +63,7 @@ export async function issueAwsCredentials(input) {
|
|
|
63
63
|
"content-type": "application/json",
|
|
64
64
|
"host": host,
|
|
65
65
|
"x-amz-date": amzDate,
|
|
66
|
-
"x-amz-x509
|
|
66
|
+
"x-amz-x509": normalizedCert,
|
|
67
67
|
};
|
|
68
68
|
const { canonicalHeaders, signedHeaders } = canonicalizeHeaders(baseHeaders);
|
|
69
69
|
const credentialScope = `${dateStamp}/${region}/${service}/aws4_request`;
|
|
@@ -86,7 +86,7 @@ export async function issueAwsCredentials(input) {
|
|
|
86
86
|
const finalHeaders = new Headers({
|
|
87
87
|
"Content-Type": "application/json",
|
|
88
88
|
"X-Amz-Date": amzDate,
|
|
89
|
-
"X-Amz-X509
|
|
89
|
+
"X-Amz-X509": normalizedCert,
|
|
90
90
|
"Authorization": `AWS4-X509-ECDSA-SHA256 Credential=${profileArn}/${credentialScope}, SignedHeaders=${signedHeaders}, Signature=${signatureHex}`
|
|
91
91
|
});
|
|
92
92
|
// 6. Execution (fetch)
|
|
@@ -103,7 +103,7 @@ export async function issueAwsCredentials(input) {
|
|
|
103
103
|
`curl -X POST "https://${host}${path}" \\`,
|
|
104
104
|
` -H "Content-Type: application/json" \\`,
|
|
105
105
|
` -H "X-Amz-Date: ${amzDate}" \\`,
|
|
106
|
-
` -H "X-Amz-X509
|
|
106
|
+
` -H "X-Amz-X509: ${normalizedCert}" \\`,
|
|
107
107
|
` -H "Authorization: AWS4-X509-ECDSA-SHA256 Credential=${profileArn}/${credentialScope}, SignedHeaders=${signedHeaders}, Signature=${signatureHex}" \\`,
|
|
108
108
|
` -d '${body}'`
|
|
109
109
|
].join("\n");
|
|
@@ -140,7 +140,7 @@ export async function issueAwsCredentials(input) {
|
|
|
140
140
|
sentHeaders: {
|
|
141
141
|
"Content-Type": "application/json",
|
|
142
142
|
"X-Amz-Date": amzDate,
|
|
143
|
-
"X-Amz-X509
|
|
143
|
+
"X-Amz-X509": normalizedCert,
|
|
144
144
|
"Authorization": `AWS4-X509-ECDSA-SHA256 Credential=${profileArn}/${credentialScope}, SignedHeaders=${signedHeaders}, Signature=${signatureHex}`
|
|
145
145
|
}
|
|
146
146
|
});
|