@cdk8s/awscdk-resolver 0.0.48 → 0.0.50
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/.jsii +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +14 -14
- package/node_modules/@aws-sdk/client-sso/package.json +11 -11
- package/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +8 -8
- package/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js +8 -8
- package/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +6 -6
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/package.json +12 -12
- package/node_modules/@aws-sdk/core/CHANGELOG.md +11 -0
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/{AWSSDKSigV4Signer.js → AwsSdkSigV4Signer.js} +15 -9
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/index.js +2 -2
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/{resolveAWSSDKSigV4Config.js → resolveAwsSdkSigV4Config.js} +4 -3
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/{AWSSDKSigV4Signer.js → AwsSdkSigV4Signer.js} +13 -7
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/index.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/{resolveAWSSDKSigV4Config.js → resolveAwsSdkSigV4Config.js} +2 -1
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/{AWSSDKSigV4Signer.d.ts → AwsSdkSigV4Signer.d.ts} +5 -1
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/index.d.ts +2 -2
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/{resolveAWSSDKSigV4Config.d.ts → resolveAwsSdkSigV4Config.d.ts} +27 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/{AWSSDKSigV4Signer.d.ts → AwsSdkSigV4Signer.d.ts} +2 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/index.d.ts +2 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/{resolveAWSSDKSigV4Config.d.ts → resolveAwsSdkSigV4Config.d.ts} +14 -5
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/{AWSSDKSigV4Signer.ts → AwsSdkSigV4Signer.ts} +29 -15
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/index.ts +2 -2
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/{resolveAWSSDKSigV4Config.ts → resolveAwsSdkSigV4Config.ts} +30 -10
- package/node_modules/@aws-sdk/core/tsconfig.cjs.tsbuildinfo +1 -1
- package/node_modules/@aws-sdk/core/tsconfig.es.tsbuildinfo +1 -1
- package/node_modules/@aws-sdk/core/tsconfig.types.tsbuildinfo +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-signing/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +3 -3
- package/node_modules/@aws-sdk/region-config-resolver/package.json +2 -1
- package/node_modules/@aws-sdk/token-providers/package.json +10 -10
- package/node_modules/@aws-sdk/types/package.json +3 -8
- package/node_modules/@aws-sdk/util-endpoints/package.json +3 -2
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/package.json +6 -6
- package/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/throwAWSSDKSigningPropertyError.js +0 -10
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/throwAWSSDKSigningPropertyError.js +0 -6
- package/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/throwAWSSDKSigningPropertyError.d.ts +0 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/throwAWSSDKSigningPropertyError.d.ts +0 -4
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/throwAWSSDKSigningPropertyError.ts +0 -9
- package/node_modules/@aws-sdk/types/dist-cjs/blob/runtime-blob-types.browser.js +0 -2
- package/node_modules/@aws-sdk/types/dist-cjs/blob/runtime-blob-types.node.js +0 -2
- package/node_modules/@aws-sdk/types/dist-es/blob/runtime-blob-types.browser.js +0 -1
- package/node_modules/@aws-sdk/types/dist-es/blob/runtime-blob-types.node.js +0 -1
- package/node_modules/@aws-sdk/types/dist-types/blob/runtime-blob-types.browser.d.ts +0 -6
- package/node_modules/@aws-sdk/types/dist-types/blob/runtime-blob-types.node.d.ts +0 -9
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/blob/runtime-blob-types.browser.d.ts +0 -1
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/blob/runtime-blob-types.node.d.ts +0 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
import { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider, normalizeProvider, } from "@smithy/core";
|
2
2
|
import { SignatureV4 } from "@smithy/signature-v4";
|
3
|
-
export const
|
3
|
+
export const resolveAwsSdkSigV4Config = (config) => {
|
4
4
|
let normalizedCreds;
|
5
5
|
if (config.credentials) {
|
6
6
|
normalizedCreds = memoizeIdentityProvider(config.credentials, isIdentityExpired, doesIdentityRequireRefresh);
|
@@ -75,3 +75,4 @@ export const resolveAWSSDKSigV4Config = (config) => {
|
|
75
75
|
signer,
|
76
76
|
};
|
77
77
|
};
|
78
|
+
export const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;
|
@@ -2,7 +2,7 @@ import { AwsCredentialIdentity, HttpRequest as IHttpRequest, HttpResponse, HttpS
|
|
2
2
|
/**
|
3
3
|
* @internal
|
4
4
|
*/
|
5
|
-
export declare class
|
5
|
+
export declare class AwsSdkSigV4Signer implements HttpSigner {
|
6
6
|
sign(httpRequest: IHttpRequest,
|
7
7
|
/**
|
8
8
|
* `identity` is bound in {@link resolveAWSSDKSigV4Config}
|
@@ -11,3 +11,7 @@ export declare class AWSSDKSigV4Signer implements HttpSigner {
|
|
11
11
|
errorHandler(signingProperties: Record<string, unknown>): (error: Error) => never;
|
12
12
|
successHandler(httpResponse: HttpResponse | unknown, signingProperties: Record<string, unknown>): void;
|
13
13
|
}
|
14
|
+
/**
|
15
|
+
* @deprecated renamed to {@link AwsSdkSigV4Signer}
|
16
|
+
*/
|
17
|
+
export declare const AWSSDKSigV4Signer: typeof AwsSdkSigV4Signer;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from "./
|
2
|
-
export * from "./
|
1
|
+
export * from "./AwsSdkSigV4Signer";
|
2
|
+
export * from "./resolveAwsSdkSigV4Config";
|
@@ -3,7 +3,7 @@ import { AuthScheme, AwsCredentialIdentity, AwsCredentialIdentityProvider, Check
|
|
3
3
|
/**
|
4
4
|
* @internal
|
5
5
|
*/
|
6
|
-
export interface
|
6
|
+
export interface AwsSdkSigV4AuthInputConfig {
|
7
7
|
/**
|
8
8
|
* The credentials used to sign requests.
|
9
9
|
*/
|
@@ -36,7 +36,7 @@ export interface AWSSDKSigV4AuthInputConfig {
|
|
36
36
|
/**
|
37
37
|
* @internal
|
38
38
|
*/
|
39
|
-
export interface
|
39
|
+
export interface AwsSdkSigV4PreviouslyResolved {
|
40
40
|
credentialDefaultProvider?: (input: any) => MemoizedProvider<AwsCredentialIdentity>;
|
41
41
|
region: string | Provider<string>;
|
42
42
|
sha256: ChecksumConstructor | HashConstructor;
|
@@ -50,27 +50,46 @@ export interface AWSSDKSigV4PreviouslyResolved {
|
|
50
50
|
/**
|
51
51
|
* @internal
|
52
52
|
*/
|
53
|
-
export interface
|
53
|
+
export interface AwsSdkSigV4AuthResolvedConfig {
|
54
54
|
/**
|
55
|
-
* Resolved value for input config {@link
|
55
|
+
* Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.credentials}
|
56
56
|
* This provider MAY memoize the loaded credentials for certain period.
|
57
57
|
* See {@link MemoizedProvider} for more information.
|
58
58
|
*/
|
59
59
|
credentials: AwsCredentialIdentityProvider;
|
60
60
|
/**
|
61
|
-
* Resolved value for input config {@link
|
61
|
+
* Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.signer}
|
62
62
|
*/
|
63
63
|
signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
|
64
64
|
/**
|
65
|
-
* Resolved value for input config {@link
|
65
|
+
* Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.signingEscapePath}
|
66
66
|
*/
|
67
67
|
signingEscapePath: boolean;
|
68
68
|
/**
|
69
|
-
* Resolved value for input config {@link
|
69
|
+
* Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.systemClockOffset}
|
70
70
|
*/
|
71
71
|
systemClockOffset: number;
|
72
72
|
}
|
73
73
|
/**
|
74
74
|
* @internal
|
75
75
|
*/
|
76
|
-
export declare const
|
76
|
+
export declare const resolveAwsSdkSigV4Config: <T>(config: T & AwsSdkSigV4AuthInputConfig & AwsSdkSigV4PreviouslyResolved) => T & AwsSdkSigV4AuthResolvedConfig;
|
77
|
+
/**
|
78
|
+
* @deprecated renamed to {@link AwsSdkSigV4AuthInputConfig}
|
79
|
+
*/
|
80
|
+
export interface AWSSDKSigV4AuthInputConfig extends AwsSdkSigV4AuthInputConfig {
|
81
|
+
}
|
82
|
+
/**
|
83
|
+
* @deprecated renamed to {@link AwsSdkSigV4PreviouslyResolved}
|
84
|
+
*/
|
85
|
+
export interface AWSSDKSigV4PreviouslyResolved extends AwsSdkSigV4PreviouslyResolved {
|
86
|
+
}
|
87
|
+
/**
|
88
|
+
* @deprecated renamed to {@link AwsSdkSigV4AuthResolvedConfig}
|
89
|
+
*/
|
90
|
+
export interface AWSSDKSigV4AuthResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
|
91
|
+
}
|
92
|
+
/**
|
93
|
+
* @deprecated renamed to {@link resolveAwsSdkSigV4Config}
|
94
|
+
*/
|
95
|
+
export declare const resolveAWSSDKSigV4Config: <T>(config: T & AwsSdkSigV4AuthInputConfig & AwsSdkSigV4PreviouslyResolved) => T & AwsSdkSigV4AuthResolvedConfig;
|
@@ -4,7 +4,7 @@ import {
|
|
4
4
|
HttpResponse,
|
5
5
|
HttpSigner,
|
6
6
|
} from "@smithy/types";
|
7
|
-
export declare class
|
7
|
+
export declare class AwsSdkSigV4Signer implements HttpSigner {
|
8
8
|
sign(
|
9
9
|
httpRequest: IHttpRequest,
|
10
10
|
identity: AwsCredentialIdentity,
|
@@ -18,3 +18,4 @@ export declare class AWSSDKSigV4Signer implements HttpSigner {
|
|
18
18
|
signingProperties: Record<string, unknown>
|
19
19
|
): void;
|
20
20
|
}
|
21
|
+
export declare const AWSSDKSigV4Signer: typeof AwsSdkSigV4Signer;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from "./
|
2
|
-
export * from "./
|
1
|
+
export * from "./AwsSdkSigV4Signer";
|
2
|
+
export * from "./resolveAwsSdkSigV4Config";
|
@@ -10,7 +10,7 @@ import {
|
|
10
10
|
RegionInfoProvider,
|
11
11
|
RequestSigner,
|
12
12
|
} from "@smithy/types";
|
13
|
-
export interface
|
13
|
+
export interface AwsSdkSigV4AuthInputConfig {
|
14
14
|
credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
|
15
15
|
signer?:
|
16
16
|
| RequestSigner
|
@@ -22,7 +22,7 @@ export interface AWSSDKSigV4AuthInputConfig {
|
|
22
22
|
options: SignatureV4Init & SignatureV4CryptoInit
|
23
23
|
) => RequestSigner;
|
24
24
|
}
|
25
|
-
export interface
|
25
|
+
export interface AwsSdkSigV4PreviouslyResolved {
|
26
26
|
credentialDefaultProvider?: (
|
27
27
|
input: any
|
28
28
|
) => MemoizedProvider<AwsCredentialIdentity>;
|
@@ -35,12 +35,21 @@ export interface AWSSDKSigV4PreviouslyResolved {
|
|
35
35
|
useFipsEndpoint: Provider<boolean>;
|
36
36
|
useDualstackEndpoint: Provider<boolean>;
|
37
37
|
}
|
38
|
-
export interface
|
38
|
+
export interface AwsSdkSigV4AuthResolvedConfig {
|
39
39
|
credentials: AwsCredentialIdentityProvider;
|
40
40
|
signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
|
41
41
|
signingEscapePath: boolean;
|
42
42
|
systemClockOffset: number;
|
43
43
|
}
|
44
|
+
export declare const resolveAwsSdkSigV4Config: <T>(
|
45
|
+
config: T & AwsSdkSigV4AuthInputConfig & AwsSdkSigV4PreviouslyResolved
|
46
|
+
) => T & AwsSdkSigV4AuthResolvedConfig;
|
47
|
+
export interface AWSSDKSigV4AuthInputConfig
|
48
|
+
extends AwsSdkSigV4AuthInputConfig {}
|
49
|
+
export interface AWSSDKSigV4PreviouslyResolved
|
50
|
+
extends AwsSdkSigV4PreviouslyResolved {}
|
51
|
+
export interface AWSSDKSigV4AuthResolvedConfig
|
52
|
+
extends AwsSdkSigV4AuthResolvedConfig {}
|
44
53
|
export declare const resolveAWSSDKSigV4Config: <T>(
|
45
|
-
config: T &
|
46
|
-
) => T &
|
54
|
+
config: T & AwsSdkSigV4AuthInputConfig & AwsSdkSigV4PreviouslyResolved
|
55
|
+
) => T & AwsSdkSigV4AuthResolvedConfig;
|
@@ -11,12 +11,21 @@ import {
|
|
11
11
|
} from "@smithy/types";
|
12
12
|
|
13
13
|
import { getDateHeader, getSkewCorrectedDate, getUpdatedSystemClockOffset } from "../utils";
|
14
|
-
import { throwAWSSDKSigningPropertyError } from "./throwAWSSDKSigningPropertyError";
|
15
14
|
|
16
15
|
/**
|
17
16
|
* @internal
|
18
17
|
*/
|
19
|
-
|
18
|
+
const throwSigningPropertyError = <T>(name: string, property: T | undefined): T | never => {
|
19
|
+
if (!property) {
|
20
|
+
throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
|
21
|
+
}
|
22
|
+
return property;
|
23
|
+
};
|
24
|
+
|
25
|
+
/**
|
26
|
+
* @internal
|
27
|
+
*/
|
28
|
+
interface AwsSdkSigV4Config {
|
20
29
|
systemClockOffset: number;
|
21
30
|
signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
|
22
31
|
}
|
@@ -24,8 +33,8 @@ interface AWSSDKSigV4Config {
|
|
24
33
|
/**
|
25
34
|
* @internal
|
26
35
|
*/
|
27
|
-
interface
|
28
|
-
config:
|
36
|
+
interface AwsSdkSigV4AuthSigningProperties {
|
37
|
+
config: AwsSdkSigV4Config;
|
29
38
|
signer: RequestSigner;
|
30
39
|
signingRegion?: string;
|
31
40
|
signingName?: string;
|
@@ -34,7 +43,7 @@ interface AWSSDKSigV4AuthSigningProperties {
|
|
34
43
|
/**
|
35
44
|
* @internal
|
36
45
|
*/
|
37
|
-
interface
|
46
|
+
interface AwsSdkSigV4Exception extends ServiceException {
|
38
47
|
ServerTime?: string;
|
39
48
|
}
|
40
49
|
|
@@ -43,14 +52,14 @@ interface AWSSDKSigV4Exception extends ServiceException {
|
|
43
52
|
*/
|
44
53
|
const validateSigningProperties = async (
|
45
54
|
signingProperties: Record<string, unknown>
|
46
|
-
): Promise<
|
47
|
-
const context =
|
55
|
+
): Promise<AwsSdkSigV4AuthSigningProperties> => {
|
56
|
+
const context = throwSigningPropertyError(
|
48
57
|
"context",
|
49
58
|
signingProperties.context as HandlerExecutionContext | undefined
|
50
59
|
);
|
51
|
-
const config =
|
60
|
+
const config = throwSigningPropertyError("config", signingProperties.config as AwsSdkSigV4Config | undefined);
|
52
61
|
const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
|
53
|
-
const signerFunction =
|
62
|
+
const signerFunction = throwSigningPropertyError(
|
54
63
|
"signer",
|
55
64
|
config.signer as ((authScheme?: AuthScheme) => Promise<RequestSigner>) | undefined
|
56
65
|
);
|
@@ -68,7 +77,7 @@ const validateSigningProperties = async (
|
|
68
77
|
/**
|
69
78
|
* @internal
|
70
79
|
*/
|
71
|
-
export class
|
80
|
+
export class AwsSdkSigV4Signer implements HttpSigner {
|
72
81
|
async sign(
|
73
82
|
httpRequest: IHttpRequest,
|
74
83
|
/**
|
@@ -93,11 +102,11 @@ export class AWSSDKSigV4Signer implements HttpSigner {
|
|
93
102
|
errorHandler(signingProperties: Record<string, unknown>): (error: Error) => never {
|
94
103
|
return (error: Error) => {
|
95
104
|
const serverTime: string | undefined =
|
96
|
-
(error as
|
105
|
+
(error as AwsSdkSigV4Exception).ServerTime ?? getDateHeader((error as AwsSdkSigV4Exception).$response);
|
97
106
|
if (serverTime) {
|
98
|
-
const config =
|
107
|
+
const config = throwSigningPropertyError(
|
99
108
|
"config",
|
100
|
-
signingProperties.config as
|
109
|
+
signingProperties.config as AwsSdkSigV4Config | undefined
|
101
110
|
);
|
102
111
|
config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
|
103
112
|
}
|
@@ -108,11 +117,16 @@ export class AWSSDKSigV4Signer implements HttpSigner {
|
|
108
117
|
successHandler(httpResponse: HttpResponse | unknown, signingProperties: Record<string, unknown>): void {
|
109
118
|
const dateHeader = getDateHeader(httpResponse);
|
110
119
|
if (dateHeader) {
|
111
|
-
const config =
|
120
|
+
const config = throwSigningPropertyError(
|
112
121
|
"config",
|
113
|
-
signingProperties.config as
|
122
|
+
signingProperties.config as AwsSdkSigV4Config | undefined
|
114
123
|
);
|
115
124
|
config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
|
116
125
|
}
|
117
126
|
}
|
118
127
|
}
|
128
|
+
|
129
|
+
/**
|
130
|
+
* @deprecated renamed to {@link AwsSdkSigV4Signer}
|
131
|
+
*/
|
132
|
+
export const AWSSDKSigV4Signer = AwsSdkSigV4Signer;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from "./
|
2
|
-
export * from "./
|
1
|
+
export * from "./AwsSdkSigV4Signer";
|
2
|
+
export * from "./resolveAwsSdkSigV4Config";
|
@@ -21,7 +21,7 @@ import {
|
|
21
21
|
/**
|
22
22
|
* @internal
|
23
23
|
*/
|
24
|
-
export interface
|
24
|
+
export interface AwsSdkSigV4AuthInputConfig {
|
25
25
|
/**
|
26
26
|
* The credentials used to sign requests.
|
27
27
|
*/
|
@@ -60,7 +60,7 @@ export interface AWSSDKSigV4AuthInputConfig {
|
|
60
60
|
/**
|
61
61
|
* @internal
|
62
62
|
*/
|
63
|
-
export interface
|
63
|
+
export interface AwsSdkSigV4PreviouslyResolved {
|
64
64
|
credentialDefaultProvider?: (input: any) => MemoizedProvider<AwsCredentialIdentity>;
|
65
65
|
region: string | Provider<string>;
|
66
66
|
sha256: ChecksumConstructor | HashConstructor;
|
@@ -75,23 +75,23 @@ export interface AWSSDKSigV4PreviouslyResolved {
|
|
75
75
|
/**
|
76
76
|
* @internal
|
77
77
|
*/
|
78
|
-
export interface
|
78
|
+
export interface AwsSdkSigV4AuthResolvedConfig {
|
79
79
|
/**
|
80
|
-
* Resolved value for input config {@link
|
80
|
+
* Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.credentials}
|
81
81
|
* This provider MAY memoize the loaded credentials for certain period.
|
82
82
|
* See {@link MemoizedProvider} for more information.
|
83
83
|
*/
|
84
84
|
credentials: AwsCredentialIdentityProvider;
|
85
85
|
/**
|
86
|
-
* Resolved value for input config {@link
|
86
|
+
* Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.signer}
|
87
87
|
*/
|
88
88
|
signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
|
89
89
|
/**
|
90
|
-
* Resolved value for input config {@link
|
90
|
+
* Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.signingEscapePath}
|
91
91
|
*/
|
92
92
|
signingEscapePath: boolean;
|
93
93
|
/**
|
94
|
-
* Resolved value for input config {@link
|
94
|
+
* Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.systemClockOffset}
|
95
95
|
*/
|
96
96
|
systemClockOffset: number;
|
97
97
|
}
|
@@ -99,9 +99,9 @@ export interface AWSSDKSigV4AuthResolvedConfig {
|
|
99
99
|
/**
|
100
100
|
* @internal
|
101
101
|
*/
|
102
|
-
export const
|
103
|
-
config: T &
|
104
|
-
): T &
|
102
|
+
export const resolveAwsSdkSigV4Config = <T>(
|
103
|
+
config: T & AwsSdkSigV4AuthInputConfig & AwsSdkSigV4PreviouslyResolved
|
104
|
+
): T & AwsSdkSigV4AuthResolvedConfig => {
|
105
105
|
// Normalize credentials
|
106
106
|
let normalizedCreds: AwsCredentialIdentityProvider | undefined;
|
107
107
|
if (config.credentials) {
|
@@ -214,3 +214,23 @@ export const resolveAWSSDKSigV4Config = <T>(
|
|
214
214
|
signer,
|
215
215
|
};
|
216
216
|
};
|
217
|
+
|
218
|
+
/**
|
219
|
+
* @deprecated renamed to {@link AwsSdkSigV4AuthInputConfig}
|
220
|
+
*/
|
221
|
+
export interface AWSSDKSigV4AuthInputConfig extends AwsSdkSigV4AuthInputConfig {}
|
222
|
+
|
223
|
+
/**
|
224
|
+
* @deprecated renamed to {@link AwsSdkSigV4PreviouslyResolved}
|
225
|
+
*/
|
226
|
+
export interface AWSSDKSigV4PreviouslyResolved extends AwsSdkSigV4PreviouslyResolved {}
|
227
|
+
|
228
|
+
/**
|
229
|
+
* @deprecated renamed to {@link AwsSdkSigV4AuthResolvedConfig}
|
230
|
+
*/
|
231
|
+
export interface AWSSDKSigV4AuthResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {}
|
232
|
+
|
233
|
+
/**
|
234
|
+
* @deprecated renamed to {@link resolveAwsSdkSigV4Config}
|
235
|
+
*/
|
236
|
+
export const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;
|