@aws-sdk/middleware-signing 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-cjs/configurations.js +7 -1
- package/dist-es/configurations.js +22 -6
- package/dist-types/configurations.d.ts +2 -0
- package/dist-types/ts3.4/configurations.d.ts +16 -45
- package/dist-types/ts3.4/utils/getSkewCorrectedDate.d.ts +1 -5
- package/dist-types/ts3.4/utils/getUpdatedSystemClockOffset.d.ts +1 -7
- package/dist-types/ts3.4/utils/isClockSkewed.d.ts +1 -6
- package/package.json +5 -5
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/middleware-signing
|
|
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/middleware-signing
|
|
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/middleware-signing
|
|
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/middleware-signing
|
|
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
|
|
|
@@ -15,7 +15,13 @@ const resolveAwsAuthConfig = (input) => {
|
|
|
15
15
|
}
|
|
16
16
|
else {
|
|
17
17
|
signer = () => normalizeProvider(input.region)()
|
|
18
|
-
.then(async (region) => [
|
|
18
|
+
.then(async (region) => [
|
|
19
|
+
(await input.regionInfoProvider(region, {
|
|
20
|
+
useFipsEndpoint: await input.useFipsEndpoint(),
|
|
21
|
+
useDualstackEndpoint: await input.useDualstackEndpoint(),
|
|
22
|
+
})) || {},
|
|
23
|
+
region,
|
|
24
|
+
])
|
|
19
25
|
.then(([regionInfo, region]) => {
|
|
20
26
|
const { signingRegion, signingService } = regionInfo;
|
|
21
27
|
input.signingRegion = input.signingRegion || signingRegion || region;
|
|
@@ -14,12 +14,28 @@ export var resolveAwsAuthConfig = function (input) {
|
|
|
14
14
|
else {
|
|
15
15
|
signer = function () {
|
|
16
16
|
return normalizeProvider(input.region)()
|
|
17
|
-
.then(function (region) { return __awaiter(void 0, void 0, void 0, function () {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
.then(function (region) { return __awaiter(void 0, void 0, void 0, function () {
|
|
18
|
+
var _a, _b, _c;
|
|
19
|
+
var _d;
|
|
20
|
+
return __generator(this, function (_e) {
|
|
21
|
+
switch (_e.label) {
|
|
22
|
+
case 0:
|
|
23
|
+
_b = (_a = input).regionInfoProvider;
|
|
24
|
+
_c = [region];
|
|
25
|
+
_d = {};
|
|
26
|
+
return [4, input.useFipsEndpoint()];
|
|
27
|
+
case 1:
|
|
28
|
+
_d.useFipsEndpoint = _e.sent();
|
|
29
|
+
return [4, input.useDualstackEndpoint()];
|
|
30
|
+
case 2: return [4, _b.apply(_a, _c.concat([(_d.useDualstackEndpoint = _e.sent(),
|
|
31
|
+
_d)]))];
|
|
32
|
+
case 3: return [2, [
|
|
33
|
+
(_e.sent()) || {},
|
|
34
|
+
region
|
|
35
|
+
]];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}); })
|
|
23
39
|
.then(function (_a) {
|
|
24
40
|
var _b = __read(_a, 2), regionInfo = _b[0], region = _b[1];
|
|
25
41
|
var signingRegion = regionInfo.signingRegion, signingService = regionInfo.signingService;
|
|
@@ -54,6 +54,8 @@ interface PreviouslyResolved {
|
|
|
54
54
|
signingName?: string;
|
|
55
55
|
serviceId: string;
|
|
56
56
|
sha256: HashConstructor;
|
|
57
|
+
useFipsEndpoint: Provider<boolean>;
|
|
58
|
+
useDualstackEndpoint: Provider<boolean>;
|
|
57
59
|
}
|
|
58
60
|
interface SigV4PreviouslyResolved {
|
|
59
61
|
credentialDefaultProvider: (input: any) => Provider<Credentials>;
|
|
@@ -1,50 +1,27 @@
|
|
|
1
1
|
import { SignatureV4CryptoInit, SignatureV4Init } from "@aws-sdk/signature-v4";
|
|
2
2
|
import { Credentials, HashConstructor, Provider, RegionInfoProvider, RequestSigner } from "@aws-sdk/types";
|
|
3
3
|
export interface AwsAuthInputConfig {
|
|
4
|
-
|
|
5
|
-
* The credentials used to sign requests.
|
|
6
|
-
*/
|
|
4
|
+
|
|
7
5
|
credentials?: Credentials | Provider<Credentials>;
|
|
8
|
-
|
|
9
|
-
* The signer to use when signing requests.
|
|
10
|
-
*/
|
|
6
|
+
|
|
11
7
|
signer?: RequestSigner | Provider<RequestSigner>;
|
|
12
|
-
|
|
13
|
-
* Whether to escape request path when signing the request.
|
|
14
|
-
*/
|
|
8
|
+
|
|
15
9
|
signingEscapePath?: boolean;
|
|
16
|
-
|
|
17
|
-
* An offset value in milliseconds to apply to all signing times.
|
|
18
|
-
*/
|
|
10
|
+
|
|
19
11
|
systemClockOffset?: number;
|
|
20
|
-
|
|
21
|
-
* The region where you want to sign your request against. This
|
|
22
|
-
* can be different to the region in the endpoint.
|
|
23
|
-
*/
|
|
12
|
+
|
|
24
13
|
signingRegion?: string;
|
|
25
|
-
|
|
26
|
-
* The injectable SigV4-compatible signer class constructor. If not supplied,
|
|
27
|
-
* regular SignatureV4 constructor will be used.
|
|
28
|
-
* @private
|
|
29
|
-
*/
|
|
14
|
+
|
|
30
15
|
signerConstructor?: new (options: SignatureV4Init & SignatureV4CryptoInit) => RequestSigner;
|
|
31
16
|
}
|
|
32
17
|
export interface SigV4AuthInputConfig {
|
|
33
|
-
|
|
34
|
-
* The credentials used to sign requests.
|
|
35
|
-
*/
|
|
18
|
+
|
|
36
19
|
credentials?: Credentials | Provider<Credentials>;
|
|
37
|
-
|
|
38
|
-
* The signer to use when signing requests.
|
|
39
|
-
*/
|
|
20
|
+
|
|
40
21
|
signer?: RequestSigner | Provider<RequestSigner>;
|
|
41
|
-
|
|
42
|
-
* Whether to escape request path when signing the request.
|
|
43
|
-
*/
|
|
22
|
+
|
|
44
23
|
signingEscapePath?: boolean;
|
|
45
|
-
|
|
46
|
-
* An offset value in milliseconds to apply to all signing times.
|
|
47
|
-
*/
|
|
24
|
+
|
|
48
25
|
systemClockOffset?: number;
|
|
49
26
|
}
|
|
50
27
|
interface PreviouslyResolved {
|
|
@@ -54,6 +31,8 @@ interface PreviouslyResolved {
|
|
|
54
31
|
signingName?: string;
|
|
55
32
|
serviceId: string;
|
|
56
33
|
sha256: HashConstructor;
|
|
34
|
+
useFipsEndpoint: Provider<boolean>;
|
|
35
|
+
useDualstackEndpoint: Provider<boolean>;
|
|
57
36
|
}
|
|
58
37
|
interface SigV4PreviouslyResolved {
|
|
59
38
|
credentialDefaultProvider: (input: any) => Provider<Credentials>;
|
|
@@ -62,21 +41,13 @@ interface SigV4PreviouslyResolved {
|
|
|
62
41
|
sha256: HashConstructor;
|
|
63
42
|
}
|
|
64
43
|
export interface AwsAuthResolvedConfig {
|
|
65
|
-
|
|
66
|
-
* Resolved value for input config {@link AwsAuthInputConfig.credentials}
|
|
67
|
-
*/
|
|
44
|
+
|
|
68
45
|
credentials: Provider<Credentials>;
|
|
69
|
-
|
|
70
|
-
* Resolved value for input config {@link AwsAuthInputConfig.signer}
|
|
71
|
-
*/
|
|
46
|
+
|
|
72
47
|
signer: Provider<RequestSigner>;
|
|
73
|
-
|
|
74
|
-
* Resolved value for input config {@link AwsAuthInputConfig.signingEscapePath}
|
|
75
|
-
*/
|
|
48
|
+
|
|
76
49
|
signingEscapePath: boolean;
|
|
77
|
-
|
|
78
|
-
* Resolved value for input config {@link AwsAuthInputConfig.systemClockOffset}
|
|
79
|
-
*/
|
|
50
|
+
|
|
80
51
|
systemClockOffset: number;
|
|
81
52
|
}
|
|
82
53
|
export interface SigV4AuthResolvedConfig extends AwsAuthResolvedConfig {
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* If clock is skewed, it returns the difference between serverTime and current time.
|
|
3
|
-
* If clock is not skewed, it returns currentSystemClockOffset.
|
|
4
|
-
*
|
|
5
|
-
* @param clockTime The string value of the server time.
|
|
6
|
-
* @param currentSystemClockOffset The current system clock offset.
|
|
7
|
-
*/
|
|
1
|
+
|
|
8
2
|
export declare const getUpdatedSystemClockOffset: (clockTime: string, currentSystemClockOffset: number) => number;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Checks if the provided date is within the skew window of 300000ms.
|
|
3
|
-
*
|
|
4
|
-
* @param clockTime - The time to check for skew in milliseconds.
|
|
5
|
-
* @param systemClockOffset - The offset of the system clock in milliseconds.
|
|
6
|
-
*/
|
|
1
|
+
|
|
7
2
|
export declare const isClockSkewed: (clockTime: number, systemClockOffset: number) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-signing",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.40.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "yarn build:cjs && yarn build:es && yarn build:types",
|
|
6
6
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"typescript": "~4.3.5"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@aws-sdk/property-provider": "3.
|
|
27
|
-
"@aws-sdk/protocol-http": "3.
|
|
28
|
-
"@aws-sdk/signature-v4": "3.
|
|
29
|
-
"@aws-sdk/types": "3.
|
|
26
|
+
"@aws-sdk/property-provider": "3.40.0",
|
|
27
|
+
"@aws-sdk/protocol-http": "3.40.0",
|
|
28
|
+
"@aws-sdk/signature-v4": "3.40.0",
|
|
29
|
+
"@aws-sdk/types": "3.40.0",
|
|
30
30
|
"tslib": "^2.3.0"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|