@etainabl/nodejs-sdk 1.3.193 → 1.3.196
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/esm/index.js +1533 -9413
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +7747 -31976
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/dist/esm/chunk-3G3VXGQN.js +0 -164
- package/dist/esm/chunk-3G3VXGQN.js.map +0 -1
- package/dist/esm/chunk-4JDZJVKZ.js +0 -29
- package/dist/esm/chunk-4JDZJVKZ.js.map +0 -1
- package/dist/esm/chunk-4QSQRVYQ.js +0 -4408
- package/dist/esm/chunk-4QSQRVYQ.js.map +0 -1
- package/dist/esm/chunk-7QBJXGSP.js +0 -143
- package/dist/esm/chunk-7QBJXGSP.js.map +0 -1
- package/dist/esm/chunk-CRX53WMM.js +0 -222
- package/dist/esm/chunk-CRX53WMM.js.map +0 -1
- package/dist/esm/chunk-D74LA2XQ.js +0 -773
- package/dist/esm/chunk-D74LA2XQ.js.map +0 -1
- package/dist/esm/chunk-G3PMV62Z.js +0 -36
- package/dist/esm/chunk-G3PMV62Z.js.map +0 -1
- package/dist/esm/chunk-IX2LY325.js +0 -38
- package/dist/esm/chunk-IX2LY325.js.map +0 -1
- package/dist/esm/chunk-KWPO3OOT.js +0 -180
- package/dist/esm/chunk-KWPO3OOT.js.map +0 -1
- package/dist/esm/chunk-MCSCBMNG.js +0 -1424
- package/dist/esm/chunk-MCSCBMNG.js.map +0 -1
- package/dist/esm/chunk-RREOR7G6.js +0 -9
- package/dist/esm/chunk-RREOR7G6.js.map +0 -1
- package/dist/esm/chunk-UQAJZJ7E.js +0 -11
- package/dist/esm/chunk-UQAJZJ7E.js.map +0 -1
- package/dist/esm/chunk-UZGMBQZB.js +0 -13
- package/dist/esm/chunk-UZGMBQZB.js.map +0 -1
- package/dist/esm/chunk-XARQOPCZ.js +0 -47
- package/dist/esm/chunk-XARQOPCZ.js.map +0 -1
- package/dist/esm/chunk-YCRW5ZB7.js +0 -257
- package/dist/esm/chunk-YCRW5ZB7.js.map +0 -1
- package/dist/esm/chunk-YLT3BSXS.js +0 -180
- package/dist/esm/chunk-YLT3BSXS.js.map +0 -1
- package/dist/esm/chunk-Z63CAAFL.js +0 -43
- package/dist/esm/chunk-Z63CAAFL.js.map +0 -1
- package/dist/esm/dist-es-4VSEUPMG.js +0 -168
- package/dist/esm/dist-es-4VSEUPMG.js.map +0 -1
- package/dist/esm/dist-es-5G2D4IRG.js +0 -88
- package/dist/esm/dist-es-5G2D4IRG.js.map +0 -1
- package/dist/esm/dist-es-6PYQFA7S.js +0 -68
- package/dist/esm/dist-es-6PYQFA7S.js.map +0 -1
- package/dist/esm/dist-es-O7YXE2TO.js +0 -381
- package/dist/esm/dist-es-O7YXE2TO.js.map +0 -1
- package/dist/esm/dist-es-RVUNLU7U.js +0 -314
- package/dist/esm/dist-es-RVUNLU7U.js.map +0 -1
- package/dist/esm/dist-es-UEBBJXWA.js +0 -22
- package/dist/esm/dist-es-UEBBJXWA.js.map +0 -1
- package/dist/esm/dist-es-XS4DOSVC.js +0 -202
- package/dist/esm/dist-es-XS4DOSVC.js.map +0 -1
- package/dist/esm/event-streams-OE4R7Y65.js +0 -238
- package/dist/esm/event-streams-OE4R7Y65.js.map +0 -1
- package/dist/esm/loadSso-3FHKR3DN.js +0 -662
- package/dist/esm/loadSso-3FHKR3DN.js.map +0 -1
- package/dist/esm/sso-oidc-EORQ3JVU.js +0 -832
- package/dist/esm/sso-oidc-EORQ3JVU.js.map +0 -1
- package/dist/esm/sts-VPLY2J63.js +0 -1169
- package/dist/esm/sts-VPLY2J63.js.map +0 -1
package/dist/esm/sts-VPLY2J63.js
DELETED
|
@@ -1,1169 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseXmlBody,
|
|
3
|
-
parseXmlErrorBody
|
|
4
|
-
} from "./chunk-MCSCBMNG.js";
|
|
5
|
-
import {
|
|
6
|
-
parseRfc3339DateTimeWithOffset
|
|
7
|
-
} from "./chunk-YLT3BSXS.js";
|
|
8
|
-
import {
|
|
9
|
-
createAggregatedClient,
|
|
10
|
-
package_default
|
|
11
|
-
} from "./chunk-7QBJXGSP.js";
|
|
12
|
-
import {
|
|
13
|
-
NoAuthSigner
|
|
14
|
-
} from "./chunk-UQAJZJ7E.js";
|
|
15
|
-
import {
|
|
16
|
-
AwsSdkSigV4Signer,
|
|
17
|
-
Client,
|
|
18
|
-
Command,
|
|
19
|
-
DEFAULT_RETRY_MODE,
|
|
20
|
-
DefaultIdentityProviderConfig,
|
|
21
|
-
EndpointCache,
|
|
22
|
-
Hash,
|
|
23
|
-
NODE_APP_ID_CONFIG_OPTIONS,
|
|
24
|
-
NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
|
|
25
|
-
NODE_MAX_ATTEMPT_CONFIG_OPTIONS,
|
|
26
|
-
NODE_REGION_CONFIG_FILE_OPTIONS,
|
|
27
|
-
NODE_REGION_CONFIG_OPTIONS,
|
|
28
|
-
NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
29
|
-
NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,
|
|
30
|
-
NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,
|
|
31
|
-
NoOpLogger,
|
|
32
|
-
SENSITIVE_STRING,
|
|
33
|
-
ServiceException,
|
|
34
|
-
awsEndpointFunctions,
|
|
35
|
-
calculateBodyLength,
|
|
36
|
-
createDefaultUserAgentProvider,
|
|
37
|
-
customEndpointFunctions,
|
|
38
|
-
decorateServiceException,
|
|
39
|
-
emitWarningIfUnsupportedVersion,
|
|
40
|
-
emitWarningIfUnsupportedVersion2,
|
|
41
|
-
extendedEncodeURIComponent,
|
|
42
|
-
getAwsRegionExtensionConfiguration,
|
|
43
|
-
getContentLengthPlugin,
|
|
44
|
-
getDefaultExtensionConfiguration,
|
|
45
|
-
getEndpointPlugin,
|
|
46
|
-
getHostHeaderPlugin,
|
|
47
|
-
getHttpAuthSchemeEndpointRuleSetPlugin,
|
|
48
|
-
getHttpHandlerExtensionConfiguration,
|
|
49
|
-
getHttpSigningPlugin,
|
|
50
|
-
getLoggerPlugin,
|
|
51
|
-
getRecursionDetectionPlugin,
|
|
52
|
-
getRetryPlugin,
|
|
53
|
-
getSerdePlugin,
|
|
54
|
-
getSmithyContext,
|
|
55
|
-
getUserAgentPlugin,
|
|
56
|
-
loadConfigsForDefaultMode,
|
|
57
|
-
normalizeProvider,
|
|
58
|
-
resolveAwsRegionExtensionConfiguration,
|
|
59
|
-
resolveAwsSdkSigV4Config,
|
|
60
|
-
resolveDefaultRuntimeConfig,
|
|
61
|
-
resolveDefaultsModeConfig,
|
|
62
|
-
resolveEndpoint,
|
|
63
|
-
resolveEndpointConfig,
|
|
64
|
-
resolveHostHeaderConfig,
|
|
65
|
-
resolveHttpHandlerRuntimeConfig,
|
|
66
|
-
resolveRegionConfig,
|
|
67
|
-
resolveRetryConfig,
|
|
68
|
-
resolveUserAgentConfig,
|
|
69
|
-
withBaseException
|
|
70
|
-
} from "./chunk-4QSQRVYQ.js";
|
|
71
|
-
import {
|
|
72
|
-
loadConfig,
|
|
73
|
-
parseUrl
|
|
74
|
-
} from "./chunk-3G3VXGQN.js";
|
|
75
|
-
import "./chunk-4JDZJVKZ.js";
|
|
76
|
-
import {
|
|
77
|
-
HttpRequest,
|
|
78
|
-
NodeHttpHandler,
|
|
79
|
-
expectNonNull,
|
|
80
|
-
expectString,
|
|
81
|
-
fromBase64,
|
|
82
|
-
streamCollector,
|
|
83
|
-
strictParseInt32,
|
|
84
|
-
toBase64
|
|
85
|
-
} from "./chunk-D74LA2XQ.js";
|
|
86
|
-
import {
|
|
87
|
-
fromUtf8,
|
|
88
|
-
toUtf8
|
|
89
|
-
} from "./chunk-Z63CAAFL.js";
|
|
90
|
-
import "./chunk-CRX53WMM.js";
|
|
91
|
-
import {
|
|
92
|
-
setCredentialFeature
|
|
93
|
-
} from "./chunk-UZGMBQZB.js";
|
|
94
|
-
import "./chunk-IX2LY325.js";
|
|
95
|
-
import "./chunk-G3PMV62Z.js";
|
|
96
|
-
|
|
97
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js
|
|
98
|
-
var defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
99
|
-
return {
|
|
100
|
-
operation: getSmithyContext(context).operation,
|
|
101
|
-
region: await normalizeProvider(config.region)() || (() => {
|
|
102
|
-
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
103
|
-
})()
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
107
|
-
return {
|
|
108
|
-
schemeId: "aws.auth#sigv4",
|
|
109
|
-
signingProperties: {
|
|
110
|
-
name: "sts",
|
|
111
|
-
region: authParameters.region
|
|
112
|
-
},
|
|
113
|
-
propertiesExtractor: (config, context) => ({
|
|
114
|
-
signingProperties: {
|
|
115
|
-
config,
|
|
116
|
-
context
|
|
117
|
-
}
|
|
118
|
-
})
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
|
122
|
-
return {
|
|
123
|
-
schemeId: "smithy.api#noAuth"
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
var defaultSTSHttpAuthSchemeProvider = (authParameters) => {
|
|
127
|
-
const options = [];
|
|
128
|
-
switch (authParameters.operation) {
|
|
129
|
-
case "AssumeRoleWithWebIdentity": {
|
|
130
|
-
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
|
131
|
-
break;
|
|
132
|
-
}
|
|
133
|
-
default: {
|
|
134
|
-
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return options;
|
|
138
|
-
};
|
|
139
|
-
var resolveStsAuthConfig = (input) => Object.assign(input, {
|
|
140
|
-
stsClientCtor: STSClient
|
|
141
|
-
});
|
|
142
|
-
var resolveHttpAuthSchemeConfig = (config) => {
|
|
143
|
-
const config_0 = resolveStsAuthConfig(config);
|
|
144
|
-
const config_1 = resolveAwsSdkSigV4Config(config_0);
|
|
145
|
-
return Object.assign(config_1, {
|
|
146
|
-
authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/EndpointParameters.js
|
|
151
|
-
var resolveClientEndpointParameters = (options) => {
|
|
152
|
-
return Object.assign(options, {
|
|
153
|
-
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
154
|
-
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
155
|
-
useGlobalEndpoint: options.useGlobalEndpoint ?? false,
|
|
156
|
-
defaultSigningName: "sts"
|
|
157
|
-
});
|
|
158
|
-
};
|
|
159
|
-
var commonParams = {
|
|
160
|
-
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
|
|
161
|
-
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
162
|
-
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
163
|
-
Region: { type: "builtInParams", name: "region" },
|
|
164
|
-
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/ruleset.js
|
|
168
|
-
var F = "required";
|
|
169
|
-
var G = "type";
|
|
170
|
-
var H = "fn";
|
|
171
|
-
var I = "argv";
|
|
172
|
-
var J = "ref";
|
|
173
|
-
var a = false;
|
|
174
|
-
var b = true;
|
|
175
|
-
var c = "booleanEquals";
|
|
176
|
-
var d = "stringEquals";
|
|
177
|
-
var e = "sigv4";
|
|
178
|
-
var f = "sts";
|
|
179
|
-
var g = "us-east-1";
|
|
180
|
-
var h = "endpoint";
|
|
181
|
-
var i = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
|
|
182
|
-
var j = "tree";
|
|
183
|
-
var k = "error";
|
|
184
|
-
var l = "getAttr";
|
|
185
|
-
var m = { [F]: false, [G]: "String" };
|
|
186
|
-
var n = { [F]: true, "default": false, [G]: "Boolean" };
|
|
187
|
-
var o = { [J]: "Endpoint" };
|
|
188
|
-
var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
|
|
189
|
-
var q = { [J]: "Region" };
|
|
190
|
-
var r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" };
|
|
191
|
-
var s = { [J]: "UseFIPS" };
|
|
192
|
-
var t = { [J]: "UseDualStack" };
|
|
193
|
-
var u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} };
|
|
194
|
-
var v = {};
|
|
195
|
-
var w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h };
|
|
196
|
-
var x = { [H]: c, [I]: [s, true] };
|
|
197
|
-
var y = { [H]: c, [I]: [t, true] };
|
|
198
|
-
var z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] };
|
|
199
|
-
var A = { [J]: "PartitionResult" };
|
|
200
|
-
var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] };
|
|
201
|
-
var C = [{ [H]: "isSet", [I]: [o] }];
|
|
202
|
-
var D = [x];
|
|
203
|
-
var E = [y];
|
|
204
|
-
var _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
|
|
205
|
-
var ruleSet = _data;
|
|
206
|
-
|
|
207
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js
|
|
208
|
-
var cache = new EndpointCache({
|
|
209
|
-
size: 50,
|
|
210
|
-
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
|
|
211
|
-
});
|
|
212
|
-
var defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
213
|
-
return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
|
|
214
|
-
endpointParams,
|
|
215
|
-
logger: context.logger
|
|
216
|
-
}));
|
|
217
|
-
};
|
|
218
|
-
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
219
|
-
|
|
220
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js
|
|
221
|
-
var getRuntimeConfig = (config) => {
|
|
222
|
-
return {
|
|
223
|
-
apiVersion: "2011-06-15",
|
|
224
|
-
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
225
|
-
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
226
|
-
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
227
|
-
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
228
|
-
extensions: config?.extensions ?? [],
|
|
229
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider,
|
|
230
|
-
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
231
|
-
{
|
|
232
|
-
schemeId: "aws.auth#sigv4",
|
|
233
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
234
|
-
signer: new AwsSdkSigV4Signer()
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
schemeId: "smithy.api#noAuth",
|
|
238
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
239
|
-
signer: new NoAuthSigner()
|
|
240
|
-
}
|
|
241
|
-
],
|
|
242
|
-
logger: config?.logger ?? new NoOpLogger(),
|
|
243
|
-
serviceId: config?.serviceId ?? "STS",
|
|
244
|
-
urlParser: config?.urlParser ?? parseUrl,
|
|
245
|
-
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
246
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8
|
|
247
|
-
};
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js
|
|
251
|
-
var getRuntimeConfig2 = (config) => {
|
|
252
|
-
emitWarningIfUnsupportedVersion(process.version);
|
|
253
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
254
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
255
|
-
const clientSharedValues = getRuntimeConfig(config);
|
|
256
|
-
emitWarningIfUnsupportedVersion2(process.version);
|
|
257
|
-
const loaderConfig = {
|
|
258
|
-
profile: config?.profile,
|
|
259
|
-
logger: clientSharedValues.logger
|
|
260
|
-
};
|
|
261
|
-
return {
|
|
262
|
-
...clientSharedValues,
|
|
263
|
-
...config,
|
|
264
|
-
runtime: "node",
|
|
265
|
-
defaultsMode,
|
|
266
|
-
authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
267
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
268
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }),
|
|
269
|
-
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
270
|
-
{
|
|
271
|
-
schemeId: "aws.auth#sigv4",
|
|
272
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
|
|
273
|
-
signer: new AwsSdkSigV4Signer()
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
schemeId: "smithy.api#noAuth",
|
|
277
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
278
|
-
signer: new NoAuthSigner()
|
|
279
|
-
}
|
|
280
|
-
],
|
|
281
|
-
maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
282
|
-
region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
283
|
-
requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
284
|
-
retryMode: config?.retryMode ?? loadConfig({
|
|
285
|
-
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
286
|
-
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
|
|
287
|
-
}, config),
|
|
288
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
289
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
290
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
291
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
292
|
-
userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
|
|
293
|
-
};
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js
|
|
297
|
-
var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
298
|
-
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
299
|
-
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
300
|
-
let _credentials = runtimeConfig.credentials;
|
|
301
|
-
return {
|
|
302
|
-
setHttpAuthScheme(httpAuthScheme) {
|
|
303
|
-
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
304
|
-
if (index === -1) {
|
|
305
|
-
_httpAuthSchemes.push(httpAuthScheme);
|
|
306
|
-
} else {
|
|
307
|
-
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
httpAuthSchemes() {
|
|
311
|
-
return _httpAuthSchemes;
|
|
312
|
-
},
|
|
313
|
-
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
314
|
-
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
315
|
-
},
|
|
316
|
-
httpAuthSchemeProvider() {
|
|
317
|
-
return _httpAuthSchemeProvider;
|
|
318
|
-
},
|
|
319
|
-
setCredentials(credentials) {
|
|
320
|
-
_credentials = credentials;
|
|
321
|
-
},
|
|
322
|
-
credentials() {
|
|
323
|
-
return _credentials;
|
|
324
|
-
}
|
|
325
|
-
};
|
|
326
|
-
};
|
|
327
|
-
var resolveHttpAuthRuntimeConfig = (config) => {
|
|
328
|
-
return {
|
|
329
|
-
httpAuthSchemes: config.httpAuthSchemes(),
|
|
330
|
-
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
331
|
-
credentials: config.credentials()
|
|
332
|
-
};
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js
|
|
336
|
-
var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
337
|
-
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
338
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
339
|
-
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
340
|
-
};
|
|
341
|
-
|
|
342
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js
|
|
343
|
-
var STSClient = class extends Client {
|
|
344
|
-
config;
|
|
345
|
-
constructor(...[configuration]) {
|
|
346
|
-
const _config_0 = getRuntimeConfig2(configuration || {});
|
|
347
|
-
super(_config_0);
|
|
348
|
-
this.initConfig = _config_0;
|
|
349
|
-
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
350
|
-
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
351
|
-
const _config_3 = resolveRetryConfig(_config_2);
|
|
352
|
-
const _config_4 = resolveRegionConfig(_config_3);
|
|
353
|
-
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
354
|
-
const _config_6 = resolveEndpointConfig(_config_5);
|
|
355
|
-
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
356
|
-
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
357
|
-
this.config = _config_8;
|
|
358
|
-
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
359
|
-
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
360
|
-
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
361
|
-
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
362
|
-
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
363
|
-
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
364
|
-
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
365
|
-
httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
|
|
366
|
-
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
367
|
-
"aws.auth#sigv4": config.credentials
|
|
368
|
-
})
|
|
369
|
-
}));
|
|
370
|
-
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
371
|
-
}
|
|
372
|
-
destroy() {
|
|
373
|
-
super.destroy();
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js
|
|
378
|
-
var STSServiceException = class _STSServiceException extends ServiceException {
|
|
379
|
-
constructor(options) {
|
|
380
|
-
super(options);
|
|
381
|
-
Object.setPrototypeOf(this, _STSServiceException.prototype);
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
|
|
385
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/models_0.js
|
|
386
|
-
var CredentialsFilterSensitiveLog = (obj) => ({
|
|
387
|
-
...obj,
|
|
388
|
-
...obj.SecretAccessKey && { SecretAccessKey: SENSITIVE_STRING }
|
|
389
|
-
});
|
|
390
|
-
var AssumeRoleResponseFilterSensitiveLog = (obj) => ({
|
|
391
|
-
...obj,
|
|
392
|
-
...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }
|
|
393
|
-
});
|
|
394
|
-
var ExpiredTokenException = class _ExpiredTokenException extends STSServiceException {
|
|
395
|
-
name = "ExpiredTokenException";
|
|
396
|
-
$fault = "client";
|
|
397
|
-
constructor(opts) {
|
|
398
|
-
super({
|
|
399
|
-
name: "ExpiredTokenException",
|
|
400
|
-
$fault: "client",
|
|
401
|
-
...opts
|
|
402
|
-
});
|
|
403
|
-
Object.setPrototypeOf(this, _ExpiredTokenException.prototype);
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
var MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException {
|
|
407
|
-
name = "MalformedPolicyDocumentException";
|
|
408
|
-
$fault = "client";
|
|
409
|
-
constructor(opts) {
|
|
410
|
-
super({
|
|
411
|
-
name: "MalformedPolicyDocumentException",
|
|
412
|
-
$fault: "client",
|
|
413
|
-
...opts
|
|
414
|
-
});
|
|
415
|
-
Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype);
|
|
416
|
-
}
|
|
417
|
-
};
|
|
418
|
-
var PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException {
|
|
419
|
-
name = "PackedPolicyTooLargeException";
|
|
420
|
-
$fault = "client";
|
|
421
|
-
constructor(opts) {
|
|
422
|
-
super({
|
|
423
|
-
name: "PackedPolicyTooLargeException",
|
|
424
|
-
$fault: "client",
|
|
425
|
-
...opts
|
|
426
|
-
});
|
|
427
|
-
Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
var RegionDisabledException = class _RegionDisabledException extends STSServiceException {
|
|
431
|
-
name = "RegionDisabledException";
|
|
432
|
-
$fault = "client";
|
|
433
|
-
constructor(opts) {
|
|
434
|
-
super({
|
|
435
|
-
name: "RegionDisabledException",
|
|
436
|
-
$fault: "client",
|
|
437
|
-
...opts
|
|
438
|
-
});
|
|
439
|
-
Object.setPrototypeOf(this, _RegionDisabledException.prototype);
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
var IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException {
|
|
443
|
-
name = "IDPRejectedClaimException";
|
|
444
|
-
$fault = "client";
|
|
445
|
-
constructor(opts) {
|
|
446
|
-
super({
|
|
447
|
-
name: "IDPRejectedClaimException",
|
|
448
|
-
$fault: "client",
|
|
449
|
-
...opts
|
|
450
|
-
});
|
|
451
|
-
Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype);
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
var InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException {
|
|
455
|
-
name = "InvalidIdentityTokenException";
|
|
456
|
-
$fault = "client";
|
|
457
|
-
constructor(opts) {
|
|
458
|
-
super({
|
|
459
|
-
name: "InvalidIdentityTokenException",
|
|
460
|
-
$fault: "client",
|
|
461
|
-
...opts
|
|
462
|
-
});
|
|
463
|
-
Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);
|
|
464
|
-
}
|
|
465
|
-
};
|
|
466
|
-
var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = (obj) => ({
|
|
467
|
-
...obj,
|
|
468
|
-
...obj.WebIdentityToken && { WebIdentityToken: SENSITIVE_STRING }
|
|
469
|
-
});
|
|
470
|
-
var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({
|
|
471
|
-
...obj,
|
|
472
|
-
...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }
|
|
473
|
-
});
|
|
474
|
-
var IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {
|
|
475
|
-
name = "IDPCommunicationErrorException";
|
|
476
|
-
$fault = "client";
|
|
477
|
-
constructor(opts) {
|
|
478
|
-
super({
|
|
479
|
-
name: "IDPCommunicationErrorException",
|
|
480
|
-
$fault: "client",
|
|
481
|
-
...opts
|
|
482
|
-
});
|
|
483
|
-
Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);
|
|
484
|
-
}
|
|
485
|
-
};
|
|
486
|
-
|
|
487
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/protocols/Aws_query.js
|
|
488
|
-
var se_AssumeRoleCommand = async (input, context) => {
|
|
489
|
-
const headers = SHARED_HEADERS;
|
|
490
|
-
let body;
|
|
491
|
-
body = buildFormUrlencodedString({
|
|
492
|
-
...se_AssumeRoleRequest(input, context),
|
|
493
|
-
[_A]: _AR,
|
|
494
|
-
[_V]: _
|
|
495
|
-
});
|
|
496
|
-
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
497
|
-
};
|
|
498
|
-
var se_AssumeRoleWithWebIdentityCommand = async (input, context) => {
|
|
499
|
-
const headers = SHARED_HEADERS;
|
|
500
|
-
let body;
|
|
501
|
-
body = buildFormUrlencodedString({
|
|
502
|
-
...se_AssumeRoleWithWebIdentityRequest(input, context),
|
|
503
|
-
[_A]: _ARWWI,
|
|
504
|
-
[_V]: _
|
|
505
|
-
});
|
|
506
|
-
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
507
|
-
};
|
|
508
|
-
var de_AssumeRoleCommand = async (output, context) => {
|
|
509
|
-
if (output.statusCode >= 300) {
|
|
510
|
-
return de_CommandError(output, context);
|
|
511
|
-
}
|
|
512
|
-
const data = await parseXmlBody(output.body, context);
|
|
513
|
-
let contents = {};
|
|
514
|
-
contents = de_AssumeRoleResponse(data.AssumeRoleResult, context);
|
|
515
|
-
const response = {
|
|
516
|
-
$metadata: deserializeMetadata(output),
|
|
517
|
-
...contents
|
|
518
|
-
};
|
|
519
|
-
return response;
|
|
520
|
-
};
|
|
521
|
-
var de_AssumeRoleWithWebIdentityCommand = async (output, context) => {
|
|
522
|
-
if (output.statusCode >= 300) {
|
|
523
|
-
return de_CommandError(output, context);
|
|
524
|
-
}
|
|
525
|
-
const data = await parseXmlBody(output.body, context);
|
|
526
|
-
let contents = {};
|
|
527
|
-
contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);
|
|
528
|
-
const response = {
|
|
529
|
-
$metadata: deserializeMetadata(output),
|
|
530
|
-
...contents
|
|
531
|
-
};
|
|
532
|
-
return response;
|
|
533
|
-
};
|
|
534
|
-
var de_CommandError = async (output, context) => {
|
|
535
|
-
const parsedOutput = {
|
|
536
|
-
...output,
|
|
537
|
-
body: await parseXmlErrorBody(output.body, context)
|
|
538
|
-
};
|
|
539
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
540
|
-
switch (errorCode) {
|
|
541
|
-
case "ExpiredTokenException":
|
|
542
|
-
case "com.amazonaws.sts#ExpiredTokenException":
|
|
543
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
|
544
|
-
case "MalformedPolicyDocument":
|
|
545
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
546
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
547
|
-
case "PackedPolicyTooLarge":
|
|
548
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
549
|
-
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
|
|
550
|
-
case "RegionDisabledException":
|
|
551
|
-
case "com.amazonaws.sts#RegionDisabledException":
|
|
552
|
-
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
553
|
-
case "IDPCommunicationError":
|
|
554
|
-
case "com.amazonaws.sts#IDPCommunicationErrorException":
|
|
555
|
-
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);
|
|
556
|
-
case "IDPRejectedClaim":
|
|
557
|
-
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
558
|
-
throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);
|
|
559
|
-
case "InvalidIdentityToken":
|
|
560
|
-
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
561
|
-
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);
|
|
562
|
-
default:
|
|
563
|
-
const parsedBody = parsedOutput.body;
|
|
564
|
-
return throwDefaultError({
|
|
565
|
-
output,
|
|
566
|
-
parsedBody: parsedBody.Error,
|
|
567
|
-
errorCode
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
var de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
|
|
572
|
-
const body = parsedOutput.body;
|
|
573
|
-
const deserialized = de_ExpiredTokenException(body.Error, context);
|
|
574
|
-
const exception = new ExpiredTokenException({
|
|
575
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
576
|
-
...deserialized
|
|
577
|
-
});
|
|
578
|
-
return decorateServiceException(exception, body);
|
|
579
|
-
};
|
|
580
|
-
var de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => {
|
|
581
|
-
const body = parsedOutput.body;
|
|
582
|
-
const deserialized = de_IDPCommunicationErrorException(body.Error, context);
|
|
583
|
-
const exception = new IDPCommunicationErrorException({
|
|
584
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
585
|
-
...deserialized
|
|
586
|
-
});
|
|
587
|
-
return decorateServiceException(exception, body);
|
|
588
|
-
};
|
|
589
|
-
var de_IDPRejectedClaimExceptionRes = async (parsedOutput, context) => {
|
|
590
|
-
const body = parsedOutput.body;
|
|
591
|
-
const deserialized = de_IDPRejectedClaimException(body.Error, context);
|
|
592
|
-
const exception = new IDPRejectedClaimException({
|
|
593
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
594
|
-
...deserialized
|
|
595
|
-
});
|
|
596
|
-
return decorateServiceException(exception, body);
|
|
597
|
-
};
|
|
598
|
-
var de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context) => {
|
|
599
|
-
const body = parsedOutput.body;
|
|
600
|
-
const deserialized = de_InvalidIdentityTokenException(body.Error, context);
|
|
601
|
-
const exception = new InvalidIdentityTokenException({
|
|
602
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
603
|
-
...deserialized
|
|
604
|
-
});
|
|
605
|
-
return decorateServiceException(exception, body);
|
|
606
|
-
};
|
|
607
|
-
var de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
|
|
608
|
-
const body = parsedOutput.body;
|
|
609
|
-
const deserialized = de_MalformedPolicyDocumentException(body.Error, context);
|
|
610
|
-
const exception = new MalformedPolicyDocumentException({
|
|
611
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
612
|
-
...deserialized
|
|
613
|
-
});
|
|
614
|
-
return decorateServiceException(exception, body);
|
|
615
|
-
};
|
|
616
|
-
var de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
617
|
-
const body = parsedOutput.body;
|
|
618
|
-
const deserialized = de_PackedPolicyTooLargeException(body.Error, context);
|
|
619
|
-
const exception = new PackedPolicyTooLargeException({
|
|
620
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
621
|
-
...deserialized
|
|
622
|
-
});
|
|
623
|
-
return decorateServiceException(exception, body);
|
|
624
|
-
};
|
|
625
|
-
var de_RegionDisabledExceptionRes = async (parsedOutput, context) => {
|
|
626
|
-
const body = parsedOutput.body;
|
|
627
|
-
const deserialized = de_RegionDisabledException(body.Error, context);
|
|
628
|
-
const exception = new RegionDisabledException({
|
|
629
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
630
|
-
...deserialized
|
|
631
|
-
});
|
|
632
|
-
return decorateServiceException(exception, body);
|
|
633
|
-
};
|
|
634
|
-
var se_AssumeRoleRequest = (input, context) => {
|
|
635
|
-
const entries = {};
|
|
636
|
-
if (input[_RA] != null) {
|
|
637
|
-
entries[_RA] = input[_RA];
|
|
638
|
-
}
|
|
639
|
-
if (input[_RSN] != null) {
|
|
640
|
-
entries[_RSN] = input[_RSN];
|
|
641
|
-
}
|
|
642
|
-
if (input[_PA] != null) {
|
|
643
|
-
const memberEntries = se_policyDescriptorListType(input[_PA], context);
|
|
644
|
-
if (input[_PA]?.length === 0) {
|
|
645
|
-
entries.PolicyArns = [];
|
|
646
|
-
}
|
|
647
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
648
|
-
const loc = `PolicyArns.${key}`;
|
|
649
|
-
entries[loc] = value;
|
|
650
|
-
});
|
|
651
|
-
}
|
|
652
|
-
if (input[_P] != null) {
|
|
653
|
-
entries[_P] = input[_P];
|
|
654
|
-
}
|
|
655
|
-
if (input[_DS] != null) {
|
|
656
|
-
entries[_DS] = input[_DS];
|
|
657
|
-
}
|
|
658
|
-
if (input[_T] != null) {
|
|
659
|
-
const memberEntries = se_tagListType(input[_T], context);
|
|
660
|
-
if (input[_T]?.length === 0) {
|
|
661
|
-
entries.Tags = [];
|
|
662
|
-
}
|
|
663
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
664
|
-
const loc = `Tags.${key}`;
|
|
665
|
-
entries[loc] = value;
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
if (input[_TTK] != null) {
|
|
669
|
-
const memberEntries = se_tagKeyListType(input[_TTK], context);
|
|
670
|
-
if (input[_TTK]?.length === 0) {
|
|
671
|
-
entries.TransitiveTagKeys = [];
|
|
672
|
-
}
|
|
673
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
674
|
-
const loc = `TransitiveTagKeys.${key}`;
|
|
675
|
-
entries[loc] = value;
|
|
676
|
-
});
|
|
677
|
-
}
|
|
678
|
-
if (input[_EI] != null) {
|
|
679
|
-
entries[_EI] = input[_EI];
|
|
680
|
-
}
|
|
681
|
-
if (input[_SN] != null) {
|
|
682
|
-
entries[_SN] = input[_SN];
|
|
683
|
-
}
|
|
684
|
-
if (input[_TC] != null) {
|
|
685
|
-
entries[_TC] = input[_TC];
|
|
686
|
-
}
|
|
687
|
-
if (input[_SI] != null) {
|
|
688
|
-
entries[_SI] = input[_SI];
|
|
689
|
-
}
|
|
690
|
-
if (input[_PC] != null) {
|
|
691
|
-
const memberEntries = se_ProvidedContextsListType(input[_PC], context);
|
|
692
|
-
if (input[_PC]?.length === 0) {
|
|
693
|
-
entries.ProvidedContexts = [];
|
|
694
|
-
}
|
|
695
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
696
|
-
const loc = `ProvidedContexts.${key}`;
|
|
697
|
-
entries[loc] = value;
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
return entries;
|
|
701
|
-
};
|
|
702
|
-
var se_AssumeRoleWithWebIdentityRequest = (input, context) => {
|
|
703
|
-
const entries = {};
|
|
704
|
-
if (input[_RA] != null) {
|
|
705
|
-
entries[_RA] = input[_RA];
|
|
706
|
-
}
|
|
707
|
-
if (input[_RSN] != null) {
|
|
708
|
-
entries[_RSN] = input[_RSN];
|
|
709
|
-
}
|
|
710
|
-
if (input[_WIT] != null) {
|
|
711
|
-
entries[_WIT] = input[_WIT];
|
|
712
|
-
}
|
|
713
|
-
if (input[_PI] != null) {
|
|
714
|
-
entries[_PI] = input[_PI];
|
|
715
|
-
}
|
|
716
|
-
if (input[_PA] != null) {
|
|
717
|
-
const memberEntries = se_policyDescriptorListType(input[_PA], context);
|
|
718
|
-
if (input[_PA]?.length === 0) {
|
|
719
|
-
entries.PolicyArns = [];
|
|
720
|
-
}
|
|
721
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
722
|
-
const loc = `PolicyArns.${key}`;
|
|
723
|
-
entries[loc] = value;
|
|
724
|
-
});
|
|
725
|
-
}
|
|
726
|
-
if (input[_P] != null) {
|
|
727
|
-
entries[_P] = input[_P];
|
|
728
|
-
}
|
|
729
|
-
if (input[_DS] != null) {
|
|
730
|
-
entries[_DS] = input[_DS];
|
|
731
|
-
}
|
|
732
|
-
return entries;
|
|
733
|
-
};
|
|
734
|
-
var se_policyDescriptorListType = (input, context) => {
|
|
735
|
-
const entries = {};
|
|
736
|
-
let counter = 1;
|
|
737
|
-
for (const entry of input) {
|
|
738
|
-
if (entry === null) {
|
|
739
|
-
continue;
|
|
740
|
-
}
|
|
741
|
-
const memberEntries = se_PolicyDescriptorType(entry, context);
|
|
742
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
743
|
-
entries[`member.${counter}.${key}`] = value;
|
|
744
|
-
});
|
|
745
|
-
counter++;
|
|
746
|
-
}
|
|
747
|
-
return entries;
|
|
748
|
-
};
|
|
749
|
-
var se_PolicyDescriptorType = (input, context) => {
|
|
750
|
-
const entries = {};
|
|
751
|
-
if (input[_a] != null) {
|
|
752
|
-
entries[_a] = input[_a];
|
|
753
|
-
}
|
|
754
|
-
return entries;
|
|
755
|
-
};
|
|
756
|
-
var se_ProvidedContext = (input, context) => {
|
|
757
|
-
const entries = {};
|
|
758
|
-
if (input[_PAr] != null) {
|
|
759
|
-
entries[_PAr] = input[_PAr];
|
|
760
|
-
}
|
|
761
|
-
if (input[_CA] != null) {
|
|
762
|
-
entries[_CA] = input[_CA];
|
|
763
|
-
}
|
|
764
|
-
return entries;
|
|
765
|
-
};
|
|
766
|
-
var se_ProvidedContextsListType = (input, context) => {
|
|
767
|
-
const entries = {};
|
|
768
|
-
let counter = 1;
|
|
769
|
-
for (const entry of input) {
|
|
770
|
-
if (entry === null) {
|
|
771
|
-
continue;
|
|
772
|
-
}
|
|
773
|
-
const memberEntries = se_ProvidedContext(entry, context);
|
|
774
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
775
|
-
entries[`member.${counter}.${key}`] = value;
|
|
776
|
-
});
|
|
777
|
-
counter++;
|
|
778
|
-
}
|
|
779
|
-
return entries;
|
|
780
|
-
};
|
|
781
|
-
var se_Tag = (input, context) => {
|
|
782
|
-
const entries = {};
|
|
783
|
-
if (input[_K] != null) {
|
|
784
|
-
entries[_K] = input[_K];
|
|
785
|
-
}
|
|
786
|
-
if (input[_Va] != null) {
|
|
787
|
-
entries[_Va] = input[_Va];
|
|
788
|
-
}
|
|
789
|
-
return entries;
|
|
790
|
-
};
|
|
791
|
-
var se_tagKeyListType = (input, context) => {
|
|
792
|
-
const entries = {};
|
|
793
|
-
let counter = 1;
|
|
794
|
-
for (const entry of input) {
|
|
795
|
-
if (entry === null) {
|
|
796
|
-
continue;
|
|
797
|
-
}
|
|
798
|
-
entries[`member.${counter}`] = entry;
|
|
799
|
-
counter++;
|
|
800
|
-
}
|
|
801
|
-
return entries;
|
|
802
|
-
};
|
|
803
|
-
var se_tagListType = (input, context) => {
|
|
804
|
-
const entries = {};
|
|
805
|
-
let counter = 1;
|
|
806
|
-
for (const entry of input) {
|
|
807
|
-
if (entry === null) {
|
|
808
|
-
continue;
|
|
809
|
-
}
|
|
810
|
-
const memberEntries = se_Tag(entry, context);
|
|
811
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
812
|
-
entries[`member.${counter}.${key}`] = value;
|
|
813
|
-
});
|
|
814
|
-
counter++;
|
|
815
|
-
}
|
|
816
|
-
return entries;
|
|
817
|
-
};
|
|
818
|
-
var de_AssumedRoleUser = (output, context) => {
|
|
819
|
-
const contents = {};
|
|
820
|
-
if (output[_ARI] != null) {
|
|
821
|
-
contents[_ARI] = expectString(output[_ARI]);
|
|
822
|
-
}
|
|
823
|
-
if (output[_Ar] != null) {
|
|
824
|
-
contents[_Ar] = expectString(output[_Ar]);
|
|
825
|
-
}
|
|
826
|
-
return contents;
|
|
827
|
-
};
|
|
828
|
-
var de_AssumeRoleResponse = (output, context) => {
|
|
829
|
-
const contents = {};
|
|
830
|
-
if (output[_C] != null) {
|
|
831
|
-
contents[_C] = de_Credentials(output[_C], context);
|
|
832
|
-
}
|
|
833
|
-
if (output[_ARU] != null) {
|
|
834
|
-
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
|
|
835
|
-
}
|
|
836
|
-
if (output[_PPS] != null) {
|
|
837
|
-
contents[_PPS] = strictParseInt32(output[_PPS]);
|
|
838
|
-
}
|
|
839
|
-
if (output[_SI] != null) {
|
|
840
|
-
contents[_SI] = expectString(output[_SI]);
|
|
841
|
-
}
|
|
842
|
-
return contents;
|
|
843
|
-
};
|
|
844
|
-
var de_AssumeRoleWithWebIdentityResponse = (output, context) => {
|
|
845
|
-
const contents = {};
|
|
846
|
-
if (output[_C] != null) {
|
|
847
|
-
contents[_C] = de_Credentials(output[_C], context);
|
|
848
|
-
}
|
|
849
|
-
if (output[_SFWIT] != null) {
|
|
850
|
-
contents[_SFWIT] = expectString(output[_SFWIT]);
|
|
851
|
-
}
|
|
852
|
-
if (output[_ARU] != null) {
|
|
853
|
-
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
|
|
854
|
-
}
|
|
855
|
-
if (output[_PPS] != null) {
|
|
856
|
-
contents[_PPS] = strictParseInt32(output[_PPS]);
|
|
857
|
-
}
|
|
858
|
-
if (output[_Pr] != null) {
|
|
859
|
-
contents[_Pr] = expectString(output[_Pr]);
|
|
860
|
-
}
|
|
861
|
-
if (output[_Au] != null) {
|
|
862
|
-
contents[_Au] = expectString(output[_Au]);
|
|
863
|
-
}
|
|
864
|
-
if (output[_SI] != null) {
|
|
865
|
-
contents[_SI] = expectString(output[_SI]);
|
|
866
|
-
}
|
|
867
|
-
return contents;
|
|
868
|
-
};
|
|
869
|
-
var de_Credentials = (output, context) => {
|
|
870
|
-
const contents = {};
|
|
871
|
-
if (output[_AKI] != null) {
|
|
872
|
-
contents[_AKI] = expectString(output[_AKI]);
|
|
873
|
-
}
|
|
874
|
-
if (output[_SAK] != null) {
|
|
875
|
-
contents[_SAK] = expectString(output[_SAK]);
|
|
876
|
-
}
|
|
877
|
-
if (output[_ST] != null) {
|
|
878
|
-
contents[_ST] = expectString(output[_ST]);
|
|
879
|
-
}
|
|
880
|
-
if (output[_E] != null) {
|
|
881
|
-
contents[_E] = expectNonNull(parseRfc3339DateTimeWithOffset(output[_E]));
|
|
882
|
-
}
|
|
883
|
-
return contents;
|
|
884
|
-
};
|
|
885
|
-
var de_ExpiredTokenException = (output, context) => {
|
|
886
|
-
const contents = {};
|
|
887
|
-
if (output[_m] != null) {
|
|
888
|
-
contents[_m] = expectString(output[_m]);
|
|
889
|
-
}
|
|
890
|
-
return contents;
|
|
891
|
-
};
|
|
892
|
-
var de_IDPCommunicationErrorException = (output, context) => {
|
|
893
|
-
const contents = {};
|
|
894
|
-
if (output[_m] != null) {
|
|
895
|
-
contents[_m] = expectString(output[_m]);
|
|
896
|
-
}
|
|
897
|
-
return contents;
|
|
898
|
-
};
|
|
899
|
-
var de_IDPRejectedClaimException = (output, context) => {
|
|
900
|
-
const contents = {};
|
|
901
|
-
if (output[_m] != null) {
|
|
902
|
-
contents[_m] = expectString(output[_m]);
|
|
903
|
-
}
|
|
904
|
-
return contents;
|
|
905
|
-
};
|
|
906
|
-
var de_InvalidIdentityTokenException = (output, context) => {
|
|
907
|
-
const contents = {};
|
|
908
|
-
if (output[_m] != null) {
|
|
909
|
-
contents[_m] = expectString(output[_m]);
|
|
910
|
-
}
|
|
911
|
-
return contents;
|
|
912
|
-
};
|
|
913
|
-
var de_MalformedPolicyDocumentException = (output, context) => {
|
|
914
|
-
const contents = {};
|
|
915
|
-
if (output[_m] != null) {
|
|
916
|
-
contents[_m] = expectString(output[_m]);
|
|
917
|
-
}
|
|
918
|
-
return contents;
|
|
919
|
-
};
|
|
920
|
-
var de_PackedPolicyTooLargeException = (output, context) => {
|
|
921
|
-
const contents = {};
|
|
922
|
-
if (output[_m] != null) {
|
|
923
|
-
contents[_m] = expectString(output[_m]);
|
|
924
|
-
}
|
|
925
|
-
return contents;
|
|
926
|
-
};
|
|
927
|
-
var de_RegionDisabledException = (output, context) => {
|
|
928
|
-
const contents = {};
|
|
929
|
-
if (output[_m] != null) {
|
|
930
|
-
contents[_m] = expectString(output[_m]);
|
|
931
|
-
}
|
|
932
|
-
return contents;
|
|
933
|
-
};
|
|
934
|
-
var deserializeMetadata = (output) => ({
|
|
935
|
-
httpStatusCode: output.statusCode,
|
|
936
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
937
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
938
|
-
cfId: output.headers["x-amz-cf-id"]
|
|
939
|
-
});
|
|
940
|
-
var throwDefaultError = withBaseException(STSServiceException);
|
|
941
|
-
var buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
942
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
943
|
-
const contents = {
|
|
944
|
-
protocol,
|
|
945
|
-
hostname,
|
|
946
|
-
port,
|
|
947
|
-
method: "POST",
|
|
948
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
949
|
-
headers
|
|
950
|
-
};
|
|
951
|
-
if (resolvedHostname !== void 0) {
|
|
952
|
-
contents.hostname = resolvedHostname;
|
|
953
|
-
}
|
|
954
|
-
if (body !== void 0) {
|
|
955
|
-
contents.body = body;
|
|
956
|
-
}
|
|
957
|
-
return new HttpRequest(contents);
|
|
958
|
-
};
|
|
959
|
-
var SHARED_HEADERS = {
|
|
960
|
-
"content-type": "application/x-www-form-urlencoded"
|
|
961
|
-
};
|
|
962
|
-
var _ = "2011-06-15";
|
|
963
|
-
var _A = "Action";
|
|
964
|
-
var _AKI = "AccessKeyId";
|
|
965
|
-
var _AR = "AssumeRole";
|
|
966
|
-
var _ARI = "AssumedRoleId";
|
|
967
|
-
var _ARU = "AssumedRoleUser";
|
|
968
|
-
var _ARWWI = "AssumeRoleWithWebIdentity";
|
|
969
|
-
var _Ar = "Arn";
|
|
970
|
-
var _Au = "Audience";
|
|
971
|
-
var _C = "Credentials";
|
|
972
|
-
var _CA = "ContextAssertion";
|
|
973
|
-
var _DS = "DurationSeconds";
|
|
974
|
-
var _E = "Expiration";
|
|
975
|
-
var _EI = "ExternalId";
|
|
976
|
-
var _K = "Key";
|
|
977
|
-
var _P = "Policy";
|
|
978
|
-
var _PA = "PolicyArns";
|
|
979
|
-
var _PAr = "ProviderArn";
|
|
980
|
-
var _PC = "ProvidedContexts";
|
|
981
|
-
var _PI = "ProviderId";
|
|
982
|
-
var _PPS = "PackedPolicySize";
|
|
983
|
-
var _Pr = "Provider";
|
|
984
|
-
var _RA = "RoleArn";
|
|
985
|
-
var _RSN = "RoleSessionName";
|
|
986
|
-
var _SAK = "SecretAccessKey";
|
|
987
|
-
var _SFWIT = "SubjectFromWebIdentityToken";
|
|
988
|
-
var _SI = "SourceIdentity";
|
|
989
|
-
var _SN = "SerialNumber";
|
|
990
|
-
var _ST = "SessionToken";
|
|
991
|
-
var _T = "Tags";
|
|
992
|
-
var _TC = "TokenCode";
|
|
993
|
-
var _TTK = "TransitiveTagKeys";
|
|
994
|
-
var _V = "Version";
|
|
995
|
-
var _Va = "Value";
|
|
996
|
-
var _WIT = "WebIdentityToken";
|
|
997
|
-
var _a = "arn";
|
|
998
|
-
var _m = "message";
|
|
999
|
-
var buildFormUrlencodedString = (formEntries) => Object.entries(formEntries).map(([key, value]) => extendedEncodeURIComponent(key) + "=" + extendedEncodeURIComponent(value)).join("&");
|
|
1000
|
-
var loadQueryErrorCode = (output, data) => {
|
|
1001
|
-
if (data.Error?.Code !== void 0) {
|
|
1002
|
-
return data.Error.Code;
|
|
1003
|
-
}
|
|
1004
|
-
if (output.statusCode == 404) {
|
|
1005
|
-
return "NotFound";
|
|
1006
|
-
}
|
|
1007
|
-
};
|
|
1008
|
-
|
|
1009
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js
|
|
1010
|
-
var AssumeRoleCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
|
|
1011
|
-
return [
|
|
1012
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
1013
|
-
getEndpointPlugin(config, Command2.getEndpointParameterInstructions())
|
|
1014
|
-
];
|
|
1015
|
-
}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() {
|
|
1016
|
-
};
|
|
1017
|
-
|
|
1018
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js
|
|
1019
|
-
var AssumeRoleWithWebIdentityCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
|
|
1020
|
-
return [
|
|
1021
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
1022
|
-
getEndpointPlugin(config, Command2.getEndpointParameterInstructions())
|
|
1023
|
-
];
|
|
1024
|
-
}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() {
|
|
1025
|
-
};
|
|
1026
|
-
|
|
1027
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js
|
|
1028
|
-
var commands = {
|
|
1029
|
-
AssumeRoleCommand,
|
|
1030
|
-
AssumeRoleWithWebIdentityCommand
|
|
1031
|
-
};
|
|
1032
|
-
var STS = class extends STSClient {
|
|
1033
|
-
};
|
|
1034
|
-
createAggregatedClient(commands, STS);
|
|
1035
|
-
|
|
1036
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js
|
|
1037
|
-
var ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
|
|
1038
|
-
var getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
|
1039
|
-
if (typeof assumedRoleUser?.Arn === "string") {
|
|
1040
|
-
const arnComponents = assumedRoleUser.Arn.split(":");
|
|
1041
|
-
if (arnComponents.length > 4 && arnComponents[4] !== "") {
|
|
1042
|
-
return arnComponents[4];
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
return void 0;
|
|
1046
|
-
};
|
|
1047
|
-
var resolveRegion = async (_region, _parentRegion, credentialProviderLogger) => {
|
|
1048
|
-
const region = typeof _region === "function" ? await _region() : _region;
|
|
1049
|
-
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
|
1050
|
-
credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (provider)`, `${parentRegion} (parent client)`, `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`);
|
|
1051
|
-
return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;
|
|
1052
|
-
};
|
|
1053
|
-
var getDefaultRoleAssumer = (stsOptions, STSClient2) => {
|
|
1054
|
-
let stsClient;
|
|
1055
|
-
let closureSourceCreds;
|
|
1056
|
-
return async (sourceCreds, params) => {
|
|
1057
|
-
closureSourceCreds = sourceCreds;
|
|
1058
|
-
if (!stsClient) {
|
|
1059
|
-
const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger } = stsOptions;
|
|
1060
|
-
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger);
|
|
1061
|
-
const isCompatibleRequestHandler = !isH2(requestHandler);
|
|
1062
|
-
stsClient = new STSClient2({
|
|
1063
|
-
profile: stsOptions?.parentClientConfig?.profile,
|
|
1064
|
-
credentialDefaultProvider: () => async () => closureSourceCreds,
|
|
1065
|
-
region: resolvedRegion,
|
|
1066
|
-
requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
|
|
1067
|
-
logger
|
|
1068
|
-
});
|
|
1069
|
-
}
|
|
1070
|
-
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
|
|
1071
|
-
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
|
|
1072
|
-
throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
|
|
1073
|
-
}
|
|
1074
|
-
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
|
1075
|
-
const credentials = {
|
|
1076
|
-
accessKeyId: Credentials.AccessKeyId,
|
|
1077
|
-
secretAccessKey: Credentials.SecretAccessKey,
|
|
1078
|
-
sessionToken: Credentials.SessionToken,
|
|
1079
|
-
expiration: Credentials.Expiration,
|
|
1080
|
-
...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
|
|
1081
|
-
...accountId && { accountId }
|
|
1082
|
-
};
|
|
1083
|
-
setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
|
|
1084
|
-
return credentials;
|
|
1085
|
-
};
|
|
1086
|
-
};
|
|
1087
|
-
var getDefaultRoleAssumerWithWebIdentity = (stsOptions, STSClient2) => {
|
|
1088
|
-
let stsClient;
|
|
1089
|
-
return async (params) => {
|
|
1090
|
-
if (!stsClient) {
|
|
1091
|
-
const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger } = stsOptions;
|
|
1092
|
-
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger);
|
|
1093
|
-
const isCompatibleRequestHandler = !isH2(requestHandler);
|
|
1094
|
-
stsClient = new STSClient2({
|
|
1095
|
-
profile: stsOptions?.parentClientConfig?.profile,
|
|
1096
|
-
region: resolvedRegion,
|
|
1097
|
-
requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
|
|
1098
|
-
logger
|
|
1099
|
-
});
|
|
1100
|
-
}
|
|
1101
|
-
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
|
|
1102
|
-
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
|
|
1103
|
-
throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
|
|
1104
|
-
}
|
|
1105
|
-
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
|
1106
|
-
const credentials = {
|
|
1107
|
-
accessKeyId: Credentials.AccessKeyId,
|
|
1108
|
-
secretAccessKey: Credentials.SecretAccessKey,
|
|
1109
|
-
sessionToken: Credentials.SessionToken,
|
|
1110
|
-
expiration: Credentials.Expiration,
|
|
1111
|
-
...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
|
|
1112
|
-
...accountId && { accountId }
|
|
1113
|
-
};
|
|
1114
|
-
if (accountId) {
|
|
1115
|
-
setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
|
|
1116
|
-
}
|
|
1117
|
-
setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
|
|
1118
|
-
return credentials;
|
|
1119
|
-
};
|
|
1120
|
-
};
|
|
1121
|
-
var isH2 = (requestHandler) => {
|
|
1122
|
-
return requestHandler?.metadata?.handlerProtocol === "h2";
|
|
1123
|
-
};
|
|
1124
|
-
|
|
1125
|
-
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js
|
|
1126
|
-
var getCustomizableStsClientCtor = (baseCtor, customizations) => {
|
|
1127
|
-
if (!customizations)
|
|
1128
|
-
return baseCtor;
|
|
1129
|
-
else
|
|
1130
|
-
return class CustomizableSTSClient extends baseCtor {
|
|
1131
|
-
constructor(config) {
|
|
1132
|
-
super(config);
|
|
1133
|
-
for (const customization of customizations) {
|
|
1134
|
-
this.middlewareStack.use(customization);
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
};
|
|
1138
|
-
};
|
|
1139
|
-
var getDefaultRoleAssumer2 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
|
|
1140
|
-
var getDefaultRoleAssumerWithWebIdentity2 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
|
|
1141
|
-
var decorateDefaultCredentialProvider = (provider) => (input) => provider({
|
|
1142
|
-
roleAssumer: getDefaultRoleAssumer2(input),
|
|
1143
|
-
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input),
|
|
1144
|
-
...input
|
|
1145
|
-
});
|
|
1146
|
-
export {
|
|
1147
|
-
Command as $Command,
|
|
1148
|
-
AssumeRoleCommand,
|
|
1149
|
-
AssumeRoleResponseFilterSensitiveLog,
|
|
1150
|
-
AssumeRoleWithWebIdentityCommand,
|
|
1151
|
-
AssumeRoleWithWebIdentityRequestFilterSensitiveLog,
|
|
1152
|
-
AssumeRoleWithWebIdentityResponseFilterSensitiveLog,
|
|
1153
|
-
CredentialsFilterSensitiveLog,
|
|
1154
|
-
ExpiredTokenException,
|
|
1155
|
-
IDPCommunicationErrorException,
|
|
1156
|
-
IDPRejectedClaimException,
|
|
1157
|
-
InvalidIdentityTokenException,
|
|
1158
|
-
MalformedPolicyDocumentException,
|
|
1159
|
-
PackedPolicyTooLargeException,
|
|
1160
|
-
RegionDisabledException,
|
|
1161
|
-
STS,
|
|
1162
|
-
STSClient,
|
|
1163
|
-
STSServiceException,
|
|
1164
|
-
Client as __Client,
|
|
1165
|
-
decorateDefaultCredentialProvider,
|
|
1166
|
-
getDefaultRoleAssumer2 as getDefaultRoleAssumer,
|
|
1167
|
-
getDefaultRoleAssumerWithWebIdentity2 as getDefaultRoleAssumerWithWebIdentity
|
|
1168
|
-
};
|
|
1169
|
-
//# sourceMappingURL=sts-VPLY2J63.js.map
|