@cdk8s/awscdk-resolver 0.0.57 → 0.0.59
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/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +267 -1714
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.shared.js +10 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/CloudFormationClient.js +17 -4
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/protocols/Aws_query.js +180 -1685
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/runtimeConfig.shared.js +10 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/runtimeExtensions.js +3 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormationClient.d.ts +13 -11
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/extensionConfiguration.d.ts +2 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.browser.d.ts +5 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.d.ts +4 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.native.d.ts +6 -4
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.shared.d.ts +2 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/CloudFormationClient.d.ts +11 -9
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.d.ts +4 -4
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.native.d.ts +8 -8
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -0
- package/node_modules/@aws-sdk/client-cloudformation/package.json +16 -16
- package/node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js +68 -0
- package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +76 -96
- package/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js +16 -0
- package/node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js +19 -3
- package/node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthSchemeProvider.js +62 -0
- package/node_modules/@aws-sdk/client-sso/dist-es/protocols/Aws_restJson1.js +8 -89
- package/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.shared.js +16 -0
- package/node_modules/@aws-sdk/client-sso/dist-es/runtimeExtensions.js +3 -0
- package/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts +9 -6
- package/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/node_modules/@aws-sdk/client-sso/dist-types/extensionConfiguration.d.ts +2 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts +16 -0
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts +16 -0
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +17 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.shared.d.ts +13 -0
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts +9 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +43 -0
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts +46 -0
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts +46 -0
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +47 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
- package/node_modules/@aws-sdk/client-sso/package.json +14 -13
- package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js +64 -0
- package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js +96 -144
- package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js +16 -0
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js +17 -3
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js +58 -0
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js +0 -2
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js +29 -134
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js +16 -0
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js +3 -0
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts +13 -11
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/extensionConfiguration.d.ts +2 -1
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts +13 -3
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts +12 -2
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts +14 -4
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.shared.d.ts +13 -0
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts +11 -9
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts +30 -5
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts +29 -4
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts +33 -8
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
- package/node_modules/@aws-sdk/client-sso-oidc/package.json +16 -16
- package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +74 -196
- package/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js +17 -15
- package/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js +30 -178
- package/node_modules/@aws-sdk/client-sts/dist-types/defaultRoleAssumers.d.ts +4 -4
- package/node_modules/@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers.d.ts +11 -3
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultRoleAssumers.d.ts +4 -7
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +11 -3
- package/node_modules/@aws-sdk/client-sts/package.json +14 -14
- package/node_modules/@aws-sdk/core/CHANGELOG.md +22 -0
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +13 -7
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +6 -2
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts +10 -2
- 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-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +10 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js +5 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +1 -0
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-node/package.json +10 -9
- 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/dist-cjs/fromWebToken.js +28 -1
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js +5 -1
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- 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-user-agent/package.json +3 -3
- package/node_modules/@aws-sdk/region-config-resolver/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/types/dist-types/credentials.d.ts +16 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts +3 -0
- package/node_modules/@aws-sdk/types/package.json +1 -1
- package/node_modules/@aws-sdk/util-endpoints/package.json +2 -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/node_modules/@smithy/core/dist-cjs/index.js +26 -15
- package/node_modules/@smithy/core/dist-es/pagination/createPaginator.js +12 -1
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +13 -3
- package/node_modules/@smithy/util-defaults-mode-node/dist-es/resolveDefaultsModeConfig.js +1 -1
- package/node_modules/@smithy/util-defaults-mode-node/package.json +1 -1
- package/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-signing/LICENSE +0 -201
- package/node_modules/@aws-sdk/middleware-signing/README.md +0 -4
- package/node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthConfiguration.js +0 -1
- package/node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthMiddleware.js +0 -1
- package/node_modules/@aws-sdk/middleware-signing/dist-cjs/index.js +0 -227
- package/node_modules/@aws-sdk/middleware-signing/dist-es/awsAuthConfiguration.js +0 -103
- package/node_modules/@aws-sdk/middleware-signing/dist-es/awsAuthMiddleware.js +0 -55
- package/node_modules/@aws-sdk/middleware-signing/dist-es/index.js +0 -2
- package/node_modules/@aws-sdk/middleware-signing/dist-es/utils/getSkewCorrectedDate.js +0 -1
- package/node_modules/@aws-sdk/middleware-signing/dist-es/utils/getUpdatedSystemClockOffset.js +0 -8
- package/node_modules/@aws-sdk/middleware-signing/dist-es/utils/isClockSkewed.js +0 -2
- package/node_modules/@aws-sdk/middleware-signing/dist-types/awsAuthConfiguration.d.ts +0 -99
- package/node_modules/@aws-sdk/middleware-signing/dist-types/awsAuthMiddleware.d.ts +0 -6
- package/node_modules/@aws-sdk/middleware-signing/dist-types/index.d.ts +0 -2
- package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/awsAuthConfiguration.d.ts +0 -68
- package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/awsAuthMiddleware.d.ts +0 -19
- package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/index.d.ts +0 -2
- package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/utils/getSkewCorrectedDate.d.ts +0 -1
- package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/utils/getUpdatedSystemClockOffset.d.ts +0 -4
- package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/utils/isClockSkewed.d.ts +0 -4
- package/node_modules/@aws-sdk/middleware-signing/dist-types/utils/getSkewCorrectedDate.d.ts +0 -6
- package/node_modules/@aws-sdk/middleware-signing/dist-types/utils/getUpdatedSystemClockOffset.d.ts +0 -8
- package/node_modules/@aws-sdk/middleware-signing/dist-types/utils/isClockSkewed.d.ts +0 -7
- package/node_modules/@aws-sdk/middleware-signing/package.json +0 -59
- /package/node_modules/@aws-sdk/{middleware-signing/dist-cjs/utils/getSkewCorrectedDate.js → client-cloudformation/dist-cjs/auth/httpAuthExtensionConfiguration.js} +0 -0
- /package/node_modules/@aws-sdk/{middleware-signing/dist-cjs/utils/isClockSkewed.js → client-sso/dist-cjs/auth/httpAuthExtensionConfiguration.js} +0 -0
- /package/node_modules/@aws-sdk/{middleware-signing/dist-cjs/utils/getUpdatedSystemClockOffset.js → client-sso-oidc/dist-cjs/auth/httpAuthExtensionConfiguration.js} +0 -0
@@ -1,10 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.getRuntimeConfig = void 0;
|
4
|
+
const core_1 = require("@aws-sdk/core");
|
4
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
5
6
|
const url_parser_1 = require("@smithy/url-parser");
|
6
7
|
const util_base64_1 = require("@smithy/util-base64");
|
7
8
|
const util_utf8_1 = require("@smithy/util-utf8");
|
9
|
+
const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
|
8
10
|
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
9
11
|
const getRuntimeConfig = (config) => {
|
10
12
|
return {
|
@@ -14,6 +16,14 @@ const getRuntimeConfig = (config) => {
|
|
14
16
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
15
17
|
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
16
18
|
extensions: config?.extensions ?? [],
|
19
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultCloudFormationHttpAuthSchemeProvider,
|
20
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
21
|
+
{
|
22
|
+
schemeId: "aws.auth#sigv4",
|
23
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
24
|
+
signer: new core_1.AwsSdkSigV4Signer(),
|
25
|
+
},
|
26
|
+
],
|
17
27
|
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
18
28
|
serviceId: config?.serviceId ?? "CloudFormation",
|
19
29
|
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
2
2
|
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
|
3
3
|
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
|
4
|
-
import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
|
5
4
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
6
5
|
import { resolveRegionConfig } from "@smithy/config-resolver";
|
6
|
+
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
7
7
|
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
8
8
|
import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
|
9
9
|
import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
|
10
10
|
import { Client as __Client, } from "@smithy/smithy-client";
|
11
|
+
import { defaultCloudFormationHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
|
11
12
|
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
12
13
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
13
14
|
import { resolveRuntimeExtensions } from "./runtimeExtensions";
|
@@ -20,8 +21,8 @@ export class CloudFormationClient extends __Client {
|
|
20
21
|
const _config_3 = resolveEndpointConfig(_config_2);
|
21
22
|
const _config_4 = resolveRetryConfig(_config_3);
|
22
23
|
const _config_5 = resolveHostHeaderConfig(_config_4);
|
23
|
-
const _config_6 =
|
24
|
-
const _config_7 =
|
24
|
+
const _config_6 = resolveUserAgentConfig(_config_5);
|
25
|
+
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
25
26
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
26
27
|
super(_config_8);
|
27
28
|
this.config = _config_8;
|
@@ -30,10 +31,22 @@ export class CloudFormationClient extends __Client {
|
|
30
31
|
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
31
32
|
this.middlewareStack.use(getLoggerPlugin(this.config));
|
32
33
|
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
33
|
-
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
34
34
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
35
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
36
|
+
httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
|
37
|
+
identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
|
38
|
+
}));
|
39
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
35
40
|
}
|
36
41
|
destroy() {
|
37
42
|
super.destroy();
|
38
43
|
}
|
44
|
+
getDefaultHttpAuthSchemeParametersProvider() {
|
45
|
+
return defaultCloudFormationHttpAuthSchemeParametersProvider;
|
46
|
+
}
|
47
|
+
getIdentityProviderConfigProvider() {
|
48
|
+
return async (config) => new DefaultIdentityProviderConfig({
|
49
|
+
"aws.auth#sigv4": config.credentials,
|
50
|
+
});
|
51
|
+
}
|
39
52
|
}
|
package/node_modules/@aws-sdk/client-cloudformation/dist-es/auth/httpAuthExtensionConfiguration.js
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
2
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
3
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
4
|
+
let _credentials = runtimeConfig.credentials;
|
5
|
+
return {
|
6
|
+
setHttpAuthScheme(httpAuthScheme) {
|
7
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
8
|
+
if (index === -1) {
|
9
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
10
|
+
}
|
11
|
+
else {
|
12
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
13
|
+
}
|
14
|
+
},
|
15
|
+
httpAuthSchemes() {
|
16
|
+
return _httpAuthSchemes;
|
17
|
+
},
|
18
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
19
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
20
|
+
},
|
21
|
+
httpAuthSchemeProvider() {
|
22
|
+
return _httpAuthSchemeProvider;
|
23
|
+
},
|
24
|
+
setCredentials(credentials) {
|
25
|
+
_credentials = credentials;
|
26
|
+
},
|
27
|
+
credentials() {
|
28
|
+
return _credentials;
|
29
|
+
},
|
30
|
+
};
|
31
|
+
};
|
32
|
+
export const resolveHttpAuthRuntimeConfig = (config) => {
|
33
|
+
return {
|
34
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
35
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
36
|
+
credentials: config.credentials(),
|
37
|
+
};
|
38
|
+
};
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
|
2
|
+
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
|
3
|
+
export const defaultCloudFormationHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
4
|
+
return {
|
5
|
+
operation: getSmithyContext(context).operation,
|
6
|
+
region: (await normalizeProvider(config.region)()) ||
|
7
|
+
(() => {
|
8
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
9
|
+
})(),
|
10
|
+
};
|
11
|
+
};
|
12
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
13
|
+
return {
|
14
|
+
schemeId: "aws.auth#sigv4",
|
15
|
+
signingProperties: {
|
16
|
+
name: "cloudformation",
|
17
|
+
region: authParameters.region,
|
18
|
+
},
|
19
|
+
propertiesExtractor: (config, context) => ({
|
20
|
+
signingProperties: {
|
21
|
+
config,
|
22
|
+
context,
|
23
|
+
},
|
24
|
+
}),
|
25
|
+
};
|
26
|
+
}
|
27
|
+
export const defaultCloudFormationHttpAuthSchemeProvider = (authParameters) => {
|
28
|
+
const options = [];
|
29
|
+
switch (authParameters.operation) {
|
30
|
+
default: {
|
31
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
32
|
+
}
|
33
|
+
}
|
34
|
+
return options;
|
35
|
+
};
|
36
|
+
export const resolveHttpAuthSchemeConfig = (config) => {
|
37
|
+
const config_0 = resolveAwsSdkSigV4Config(config);
|
38
|
+
return {
|
39
|
+
...config_0,
|
40
|
+
};
|
41
|
+
};
|