@aws-sdk/signature-v4-crt 3.36.0 → 3.40.0
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/CHANGELOG.md +32 -0
- package/dist-types/ts3.4/CrtSignerV4.d.ts +3 -31
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.40.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.39.0...v3.40.0) (2021-11-05)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/signature-v4-crt
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.39.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.38.0...v3.39.0) (2021-10-29)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-sdk/signature-v4-crt
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [3.38.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.37.0...v3.38.0) (2021-10-22)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @aws-sdk/signature-v4-crt
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [3.37.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.1...v3.37.0) (2021-10-15)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @aws-sdk/signature-v4-crt
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
# [3.36.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.35.0...v3.36.0) (2021-10-08)
|
|
7
39
|
|
|
8
40
|
|
|
@@ -3,22 +3,10 @@ import { HttpRequest, RequestPresigner, RequestPresigningArguments, RequestSigne
|
|
|
3
3
|
import { auth as crtAuth } from "aws-crt";
|
|
4
4
|
export declare type AwsSigningAlgorithm = crtAuth.AwsSigningAlgorithm;
|
|
5
5
|
export interface CrtSignerV4Init extends SignatureV4Init {
|
|
6
|
-
|
|
7
|
-
* The Algorithm used for the signer. Includes: SigV4, SigV4Asymmetric.
|
|
8
|
-
*
|
|
9
|
-
* @default [SigV4]
|
|
10
|
-
*/
|
|
6
|
+
|
|
11
7
|
signingAlgorithm?: AwsSigningAlgorithm;
|
|
12
8
|
}
|
|
13
|
-
|
|
14
|
-
* Based aws-crt, with the same API as signing the request from SignatureV4, compatible with request Signer from SDK.
|
|
15
|
-
* The difference between them is CrtSignerV4 only supports signing/presigning the request. The behavior of two signers
|
|
16
|
-
* are slightly different, includes the case of headers name after signing and the CrtSignerV4 does NOT support overwrite
|
|
17
|
-
* the internal check against (x-amzn-trace-id, user-agent), which will always be skipped.
|
|
18
|
-
* Most importantly, CrtSignerV4 supports Signature V4 Asymmetric.
|
|
19
|
-
*
|
|
20
|
-
* Note: aws-crt that supports SigV4A is still a private repo https://github.com/awslabs/aws-crt-nodejs-staging/tree/sigv4a-binding
|
|
21
|
-
*/
|
|
9
|
+
|
|
22
10
|
export declare class CrtSignerV4 implements RequestPresigner, RequestSigner {
|
|
23
11
|
private readonly service;
|
|
24
12
|
private readonly regionProvider;
|
|
@@ -33,23 +21,7 @@ export declare class CrtSignerV4 implements RequestPresigner, RequestSigner {
|
|
|
33
21
|
sign(toSign: HttpRequest, options?: RequestSigningArguments): Promise<HttpRequest>;
|
|
34
22
|
private getQueryParam;
|
|
35
23
|
private signRequest;
|
|
36
|
-
|
|
37
|
-
* Test-only API used for cross-library signing verification tests. Verify sign.
|
|
38
|
-
*
|
|
39
|
-
* Verifies:
|
|
40
|
-
* (1) The canonical request generated during sigv4a signing of the request matches what is passed in
|
|
41
|
-
* (2) The signature passed in is a valid ECDSA signature of the hashed string-to-sign derived from the
|
|
42
|
-
* canonical request
|
|
43
|
-
*
|
|
44
|
-
* @param request The original request used for signing
|
|
45
|
-
* @param signature the actual signature computed from a previous signing of the signable
|
|
46
|
-
* @param expectedCanonicalRequest expected result when building the canonical request
|
|
47
|
-
* @param eccPubKeyX the x coordinate of the public part of the ecc key to verify the signature
|
|
48
|
-
* @param eccPubKeyY the y coordinate of the public part of the ecc key to verify the signature
|
|
49
|
-
* @param options the RequestSigningArguments used for signing
|
|
50
|
-
*
|
|
51
|
-
* @return True, if the verification succeed. Otherwise, false.
|
|
52
|
-
*/
|
|
24
|
+
|
|
53
25
|
verifySigv4aSigning(request: HttpRequest, signature: string, expectedCanonicalRequest: string, eccPubKeyX: string, eccPubKeyY: string, options?: RequestSigningArguments): Promise<boolean>;
|
|
54
26
|
verifySigv4aPreSigning(request: HttpRequest, signature: string | Array<string> | null, expectedCanonicalRequest: string, eccPubKeyX: string, eccPubKeyY: string, options?: RequestPresigningArguments): Promise<boolean>;
|
|
55
27
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/signature-v4-crt",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.40.0",
|
|
4
4
|
"description": "A revision of AWS Signature V4 request signer based on AWS Common Runtime https://github.com/awslabs/aws-crt-nodejs",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
},
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@aws-sdk/is-array-buffer": "3.
|
|
23
|
-
"@aws-sdk/querystring-parser": "3.
|
|
24
|
-
"@aws-sdk/signature-v4": "3.
|
|
25
|
-
"@aws-sdk/util-hex-encoding": "3.
|
|
26
|
-
"@aws-sdk/util-uri-escape": "3.
|
|
22
|
+
"@aws-sdk/is-array-buffer": "3.37.0",
|
|
23
|
+
"@aws-sdk/querystring-parser": "3.40.0",
|
|
24
|
+
"@aws-sdk/signature-v4": "3.40.0",
|
|
25
|
+
"@aws-sdk/util-hex-encoding": "3.37.0",
|
|
26
|
+
"@aws-sdk/util-uri-escape": "3.37.0",
|
|
27
27
|
"aws-crt": "^1.9.7",
|
|
28
28
|
"tslib": "^2.3.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@aws-crypto/sha256-js": "
|
|
32
|
-
"@aws-sdk/protocol-http": "3.
|
|
33
|
-
"@aws-sdk/types": "3.
|
|
34
|
-
"@aws-sdk/util-buffer-from": "3.
|
|
31
|
+
"@aws-crypto/sha256-js": "2.0.0",
|
|
32
|
+
"@aws-sdk/protocol-http": "3.40.0",
|
|
33
|
+
"@aws-sdk/types": "3.40.0",
|
|
34
|
+
"@aws-sdk/util-buffer-from": "3.37.0",
|
|
35
35
|
"@types/jest": "^26.0.4",
|
|
36
36
|
"jest": "^26.1.0",
|
|
37
37
|
"typescript": "~4.3.5"
|