@rharkor/caching-for-turbo 2.4.2 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/cli/136.index.js +760 -574
- package/dist/cli/136.index.js.map +1 -1
- package/dist/cli/360.index.js +8 -7
- package/dist/cli/360.index.js.map +1 -1
- package/dist/cli/443.index.js +424 -309
- package/dist/cli/443.index.js.map +1 -1
- package/dist/cli/566.index.js +43 -41
- package/dist/cli/566.index.js.map +1 -1
- package/dist/cli/605.index.js +20 -21
- package/dist/cli/605.index.js.map +1 -1
- package/dist/cli/762.index.js +403 -278
- package/dist/cli/762.index.js.map +1 -1
- package/dist/cli/869.index.js +29 -27
- package/dist/cli/869.index.js.map +1 -1
- package/dist/cli/956.index.js +39 -5
- package/dist/cli/956.index.js.map +1 -1
- package/dist/cli/998.index.js +430 -300
- package/dist/cli/998.index.js.map +1 -1
- package/dist/cli/index.js +10090 -5091
- package/dist/cli/licenses.txt +0 -1233
- package/dist/cli/sourcemap-register.cjs +1 -1
- package/package.json +2 -2
package/dist/cli/136.index.js
CHANGED
|
@@ -2,33 +2,302 @@ export const id = 136;
|
|
|
2
2
|
export const ids = [136];
|
|
3
3
|
export const modules = {
|
|
4
4
|
|
|
5
|
-
/***/
|
|
5
|
+
/***/ 63723:
|
|
6
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10
|
+
exports.STSClient = exports.__Client = void 0;
|
|
11
|
+
const middleware_host_header_1 = __webpack_require__(52590);
|
|
12
|
+
const middleware_logger_1 = __webpack_require__(85242);
|
|
13
|
+
const middleware_recursion_detection_1 = __webpack_require__(81568);
|
|
14
|
+
const middleware_user_agent_1 = __webpack_require__(32959);
|
|
15
|
+
const config_resolver_1 = __webpack_require__(39316);
|
|
16
|
+
const core_1 = __webpack_require__(90402);
|
|
17
|
+
const schema_1 = __webpack_require__(26890);
|
|
18
|
+
const middleware_content_length_1 = __webpack_require__(47212);
|
|
19
|
+
const middleware_endpoint_1 = __webpack_require__(40099);
|
|
20
|
+
const middleware_retry_1 = __webpack_require__(19618);
|
|
21
|
+
const smithy_client_1 = __webpack_require__(61411);
|
|
22
|
+
Object.defineProperty(exports, "__Client", ({ enumerable: true, get: function () { return smithy_client_1.Client; } }));
|
|
23
|
+
const httpAuthSchemeProvider_1 = __webpack_require__(27851);
|
|
24
|
+
const EndpointParameters_1 = __webpack_require__(76811);
|
|
25
|
+
const runtimeConfig_1 = __webpack_require__(36578);
|
|
26
|
+
const runtimeExtensions_1 = __webpack_require__(37742);
|
|
27
|
+
class STSClient extends smithy_client_1.Client {
|
|
28
|
+
config;
|
|
29
|
+
constructor(...[configuration]) {
|
|
30
|
+
const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
|
|
31
|
+
super(_config_0);
|
|
32
|
+
this.initConfig = _config_0;
|
|
33
|
+
const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
|
|
34
|
+
const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);
|
|
35
|
+
const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);
|
|
36
|
+
const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);
|
|
37
|
+
const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
|
|
38
|
+
const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);
|
|
39
|
+
const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);
|
|
40
|
+
const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
|
|
41
|
+
this.config = _config_8;
|
|
42
|
+
this.middlewareStack.use((0, schema_1.getSchemaSerdePlugin)(this.config));
|
|
43
|
+
this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
|
|
44
|
+
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
|
|
45
|
+
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
|
|
46
|
+
this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
|
|
47
|
+
this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
|
|
48
|
+
this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
|
|
49
|
+
this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
50
|
+
httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider,
|
|
51
|
+
identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({
|
|
52
|
+
"aws.auth#sigv4": config.credentials,
|
|
53
|
+
"aws.auth#sigv4a": config.credentials,
|
|
54
|
+
}),
|
|
55
|
+
}));
|
|
56
|
+
this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
|
|
57
|
+
}
|
|
58
|
+
destroy() {
|
|
59
|
+
super.destroy();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.STSClient = STSClient;
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/***/ }),
|
|
66
|
+
|
|
67
|
+
/***/ 34532:
|
|
68
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
72
|
+
exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;
|
|
73
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
74
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
75
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
76
|
+
let _credentials = runtimeConfig.credentials;
|
|
77
|
+
return {
|
|
78
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
79
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
80
|
+
if (index === -1) {
|
|
81
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
httpAuthSchemes() {
|
|
88
|
+
return _httpAuthSchemes;
|
|
89
|
+
},
|
|
90
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
91
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
92
|
+
},
|
|
93
|
+
httpAuthSchemeProvider() {
|
|
94
|
+
return _httpAuthSchemeProvider;
|
|
95
|
+
},
|
|
96
|
+
setCredentials(credentials) {
|
|
97
|
+
_credentials = credentials;
|
|
98
|
+
},
|
|
99
|
+
credentials() {
|
|
100
|
+
return _credentials;
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;
|
|
105
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
106
|
+
return {
|
|
107
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
108
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
109
|
+
credentials: config.credentials(),
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/***/ }),
|
|
116
|
+
|
|
117
|
+
/***/ 27851:
|
|
118
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
122
|
+
exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0;
|
|
123
|
+
const httpAuthSchemes_1 = __webpack_require__(97523);
|
|
124
|
+
const signature_v4_multi_region_1 = __webpack_require__(5785);
|
|
125
|
+
const middleware_endpoint_1 = __webpack_require__(40099);
|
|
126
|
+
const util_middleware_1 = __webpack_require__(76324);
|
|
127
|
+
const endpointResolver_1 = __webpack_require__(59765);
|
|
128
|
+
const STSClient_1 = __webpack_require__(63723);
|
|
129
|
+
const createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
|
|
130
|
+
if (!input) {
|
|
131
|
+
throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
|
|
132
|
+
}
|
|
133
|
+
const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
|
|
134
|
+
const instructionsFn = (0, util_middleware_1.getSmithyContext)(context)?.commandInstance?.constructor
|
|
135
|
+
?.getEndpointParameterInstructions;
|
|
136
|
+
if (!instructionsFn) {
|
|
137
|
+
throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
|
|
138
|
+
}
|
|
139
|
+
const endpointParameters = await (0, middleware_endpoint_1.resolveParams)(input, { getEndpointParameterInstructions: instructionsFn }, config);
|
|
140
|
+
return Object.assign(defaultParameters, endpointParameters);
|
|
141
|
+
};
|
|
142
|
+
const _defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
143
|
+
return {
|
|
144
|
+
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
|
|
145
|
+
region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
|
|
146
|
+
(() => {
|
|
147
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
148
|
+
})(),
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
exports.defaultSTSHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultSTSHttpAuthSchemeParametersProvider);
|
|
152
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
153
|
+
return {
|
|
154
|
+
schemeId: "aws.auth#sigv4",
|
|
155
|
+
signingProperties: {
|
|
156
|
+
name: "sts",
|
|
157
|
+
region: authParameters.region,
|
|
158
|
+
},
|
|
159
|
+
propertiesExtractor: (config, context) => ({
|
|
160
|
+
signingProperties: {
|
|
161
|
+
config,
|
|
162
|
+
context,
|
|
163
|
+
},
|
|
164
|
+
}),
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function createAwsAuthSigv4aHttpAuthOption(authParameters) {
|
|
168
|
+
return {
|
|
169
|
+
schemeId: "aws.auth#sigv4a",
|
|
170
|
+
signingProperties: {
|
|
171
|
+
name: "sts",
|
|
172
|
+
region: authParameters.region,
|
|
173
|
+
},
|
|
174
|
+
propertiesExtractor: (config, context) => ({
|
|
175
|
+
signingProperties: {
|
|
176
|
+
config,
|
|
177
|
+
context,
|
|
178
|
+
},
|
|
179
|
+
}),
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
|
183
|
+
return {
|
|
184
|
+
schemeId: "smithy.api#noAuth",
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
|
|
188
|
+
const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
|
|
189
|
+
const endpoint = defaultEndpointResolver(authParameters);
|
|
190
|
+
const authSchemes = endpoint.properties?.authSchemes;
|
|
191
|
+
if (!authSchemes) {
|
|
192
|
+
return defaultHttpAuthSchemeResolver(authParameters);
|
|
193
|
+
}
|
|
194
|
+
const options = [];
|
|
195
|
+
for (const scheme of authSchemes) {
|
|
196
|
+
const { name: resolvedName, properties = {}, ...rest } = scheme;
|
|
197
|
+
const name = resolvedName.toLowerCase();
|
|
198
|
+
if (resolvedName !== name) {
|
|
199
|
+
console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
|
|
200
|
+
}
|
|
201
|
+
let schemeId;
|
|
202
|
+
if (name === "sigv4a") {
|
|
203
|
+
schemeId = "aws.auth#sigv4a";
|
|
204
|
+
const sigv4Present = authSchemes.find((s) => {
|
|
205
|
+
const name = s.name.toLowerCase();
|
|
206
|
+
return name !== "sigv4a" && name.startsWith("sigv4");
|
|
207
|
+
});
|
|
208
|
+
if (signature_v4_multi_region_1.SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
else if (name.startsWith("sigv4")) {
|
|
213
|
+
schemeId = "aws.auth#sigv4";
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);
|
|
217
|
+
}
|
|
218
|
+
const createOption = createHttpAuthOptionFunctions[schemeId];
|
|
219
|
+
if (!createOption) {
|
|
220
|
+
throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
|
|
221
|
+
}
|
|
222
|
+
const option = createOption(authParameters);
|
|
223
|
+
option.schemeId = schemeId;
|
|
224
|
+
option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties };
|
|
225
|
+
options.push(option);
|
|
226
|
+
}
|
|
227
|
+
return options;
|
|
228
|
+
};
|
|
229
|
+
return endpointRuleSetHttpAuthSchemeProvider;
|
|
230
|
+
};
|
|
231
|
+
const _defaultSTSHttpAuthSchemeProvider = (authParameters) => {
|
|
232
|
+
const options = [];
|
|
233
|
+
switch (authParameters.operation) {
|
|
234
|
+
case "AssumeRoleWithWebIdentity": {
|
|
235
|
+
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
|
236
|
+
options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
default: {
|
|
240
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
241
|
+
options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return options;
|
|
245
|
+
};
|
|
246
|
+
exports.defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(endpointResolver_1.defaultEndpointResolver, _defaultSTSHttpAuthSchemeProvider, {
|
|
247
|
+
"aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
|
|
248
|
+
"aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
|
|
249
|
+
"smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption,
|
|
250
|
+
});
|
|
251
|
+
const resolveStsAuthConfig = (input) => Object.assign(input, {
|
|
252
|
+
stsClientCtor: STSClient_1.STSClient,
|
|
253
|
+
});
|
|
254
|
+
exports.resolveStsAuthConfig = resolveStsAuthConfig;
|
|
255
|
+
const resolveHttpAuthSchemeConfig = (config) => {
|
|
256
|
+
const config_0 = (0, exports.resolveStsAuthConfig)(config);
|
|
257
|
+
const config_1 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config_0);
|
|
258
|
+
const config_2 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4AConfig)(config_1);
|
|
259
|
+
return Object.assign(config_2, {
|
|
260
|
+
authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
|
|
261
|
+
});
|
|
262
|
+
};
|
|
263
|
+
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
/***/ }),
|
|
267
|
+
|
|
268
|
+
/***/ 76811:
|
|
269
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
273
|
+
exports.commonParams = exports.resolveClientEndpointParameters = void 0;
|
|
274
|
+
const resolveClientEndpointParameters = (options) => {
|
|
275
|
+
return Object.assign(options, {
|
|
276
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
277
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
278
|
+
useGlobalEndpoint: options.useGlobalEndpoint ?? false,
|
|
279
|
+
defaultSigningName: "sts",
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
|
|
283
|
+
exports.commonParams = {
|
|
284
|
+
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
|
|
285
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
286
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
287
|
+
Region: { type: "builtInParams", name: "region" },
|
|
288
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
/***/ }),
|
|
293
|
+
|
|
294
|
+
/***/ 19669:
|
|
6
295
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7
296
|
|
|
8
|
-
var __webpack_unused_export__;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var middlewareHostHeader = __webpack_require__(52590);
|
|
12
|
-
var middlewareLogger = __webpack_require__(85242);
|
|
13
|
-
var middlewareRecursionDetection = __webpack_require__(81568);
|
|
14
|
-
var middlewareUserAgent = __webpack_require__(32959);
|
|
15
|
-
var core = __webpack_require__(90402);
|
|
16
|
-
var client = __webpack_require__(92658);
|
|
17
|
-
var config = __webpack_require__(47291);
|
|
18
|
-
var endpoints = __webpack_require__(62085);
|
|
19
|
-
var protocols = __webpack_require__(93422);
|
|
20
|
-
var retry = __webpack_require__(23609);
|
|
21
|
-
var schema = __webpack_require__(26890);
|
|
22
|
-
var httpAuthSchemes = __webpack_require__(97523);
|
|
23
|
-
var signatureV4MultiRegion = __webpack_require__(5785);
|
|
24
|
-
var utilEndpoints = __webpack_require__(83068);
|
|
25
|
-
var client$1 = __webpack_require__(5152);
|
|
26
|
-
var utilUserAgentNode = __webpack_require__(51656);
|
|
27
|
-
var serde = __webpack_require__(92430);
|
|
28
|
-
var nodeHttpHandler = __webpack_require__(61279);
|
|
29
|
-
var protocols$1 = __webpack_require__(37288);
|
|
30
|
-
var regionConfigResolver = __webpack_require__(36463);
|
|
31
297
|
|
|
298
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
299
|
+
exports.bdd = void 0;
|
|
300
|
+
const util_endpoints_1 = __webpack_require__(79674);
|
|
32
301
|
const q = "ref";
|
|
33
302
|
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "stringEquals", g = "getAttr", h = "us-east-1", i = "sigv4", j = "sts", k = "https://sts.{Region}.{PartitionResult#dnsSuffix}", l = { [q]: "Endpoint" }, m = { [q]: "Region" }, n = { [q]: d }, o = {}, p = [m];
|
|
34
303
|
const _data = {
|
|
@@ -174,178 +443,272 @@ const nodes = new Int32Array([
|
|
|
174
443
|
r + 4,
|
|
175
444
|
r + 5,
|
|
176
445
|
]);
|
|
177
|
-
|
|
446
|
+
exports.bdd = util_endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
178
447
|
|
|
179
|
-
|
|
448
|
+
|
|
449
|
+
/***/ }),
|
|
450
|
+
|
|
451
|
+
/***/ 59765:
|
|
452
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
456
|
+
exports.defaultEndpointResolver = void 0;
|
|
457
|
+
const util_endpoints_1 = __webpack_require__(83068);
|
|
458
|
+
const util_endpoints_2 = __webpack_require__(79674);
|
|
459
|
+
const bdd_1 = __webpack_require__(19669);
|
|
460
|
+
const cache = new util_endpoints_2.EndpointCache({
|
|
180
461
|
size: 50,
|
|
181
462
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"],
|
|
182
463
|
});
|
|
183
464
|
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
184
|
-
return cache.get(endpointParams, () =>
|
|
465
|
+
return cache.get(endpointParams, () => (0, util_endpoints_2.decideEndpoint)(bdd_1.bdd, {
|
|
185
466
|
endpointParams: endpointParams,
|
|
186
467
|
logger: context.logger,
|
|
187
468
|
}));
|
|
188
469
|
};
|
|
189
|
-
|
|
470
|
+
exports.defaultEndpointResolver = defaultEndpointResolver;
|
|
471
|
+
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
|
|
190
472
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
473
|
+
|
|
474
|
+
/***/ }),
|
|
475
|
+
|
|
476
|
+
/***/ 1136:
|
|
477
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
var STSClient = __webpack_require__(63723);
|
|
482
|
+
var smithyClient = __webpack_require__(61411);
|
|
483
|
+
var middlewareEndpoint = __webpack_require__(40099);
|
|
484
|
+
var EndpointParameters = __webpack_require__(76811);
|
|
485
|
+
var schemas_0 = __webpack_require__(1684);
|
|
486
|
+
var errors = __webpack_require__(41688);
|
|
487
|
+
var client = __webpack_require__(5152);
|
|
488
|
+
var regionConfigResolver = __webpack_require__(36463);
|
|
489
|
+
var STSServiceException = __webpack_require__(17171);
|
|
490
|
+
|
|
491
|
+
class AssumeRoleCommand extends smithyClient.Command
|
|
492
|
+
.classBuilder()
|
|
493
|
+
.ep(EndpointParameters.commonParams)
|
|
494
|
+
.m(function (Command, cs, config, o) {
|
|
495
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
496
|
+
})
|
|
497
|
+
.s("AWSSecurityTokenServiceV20110615", "AssumeRole", {})
|
|
498
|
+
.n("STSClient", "AssumeRoleCommand")
|
|
499
|
+
.sc(schemas_0.AssumeRole$)
|
|
500
|
+
.build() {
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
class AssumeRoleWithWebIdentityCommand extends smithyClient.Command
|
|
504
|
+
.classBuilder()
|
|
505
|
+
.ep(EndpointParameters.commonParams)
|
|
506
|
+
.m(function (Command, cs, config, o) {
|
|
507
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
508
|
+
})
|
|
509
|
+
.s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {})
|
|
510
|
+
.n("STSClient", "AssumeRoleWithWebIdentityCommand")
|
|
511
|
+
.sc(schemas_0.AssumeRoleWithWebIdentity$)
|
|
512
|
+
.build() {
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
const commands = {
|
|
516
|
+
AssumeRoleCommand,
|
|
517
|
+
AssumeRoleWithWebIdentityCommand,
|
|
203
518
|
};
|
|
204
|
-
|
|
205
|
-
return {
|
|
206
|
-
operation: client.getSmithyContext(context).operation,
|
|
207
|
-
region: (await client.normalizeProvider(config.region)()) ||
|
|
208
|
-
(() => {
|
|
209
|
-
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
210
|
-
})(),
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
const defaultSTSHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultSTSHttpAuthSchemeParametersProvider);
|
|
214
|
-
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
215
|
-
return {
|
|
216
|
-
schemeId: "aws.auth#sigv4",
|
|
217
|
-
signingProperties: {
|
|
218
|
-
name: "sts",
|
|
219
|
-
region: authParameters.region,
|
|
220
|
-
},
|
|
221
|
-
propertiesExtractor: (config, context) => ({
|
|
222
|
-
signingProperties: {
|
|
223
|
-
config,
|
|
224
|
-
context,
|
|
225
|
-
},
|
|
226
|
-
}),
|
|
227
|
-
};
|
|
519
|
+
class STS extends STSClient.STSClient {
|
|
228
520
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
propertiesExtractor: (config, context) => ({
|
|
237
|
-
signingProperties: {
|
|
238
|
-
config,
|
|
239
|
-
context,
|
|
240
|
-
},
|
|
241
|
-
}),
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
|
245
|
-
return {
|
|
246
|
-
schemeId: "smithy.api#noAuth",
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
|
|
250
|
-
const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
|
|
251
|
-
const endpoint = defaultEndpointResolver(authParameters);
|
|
252
|
-
const authSchemes = endpoint.properties?.authSchemes;
|
|
253
|
-
if (!authSchemes) {
|
|
254
|
-
return defaultHttpAuthSchemeResolver(authParameters);
|
|
521
|
+
smithyClient.createAggregatedClient(commands, STS);
|
|
522
|
+
|
|
523
|
+
const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
|
524
|
+
if (typeof assumedRoleUser?.Arn === "string") {
|
|
525
|
+
const arnComponents = assumedRoleUser.Arn.split(":");
|
|
526
|
+
if (arnComponents.length > 4 && arnComponents[4] !== "") {
|
|
527
|
+
return arnComponents[4];
|
|
255
528
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
529
|
+
}
|
|
530
|
+
return undefined;
|
|
531
|
+
};
|
|
532
|
+
const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
|
|
533
|
+
const region = typeof _region === "function" ? await _region() : _region;
|
|
534
|
+
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
|
535
|
+
let stsDefaultRegion = "";
|
|
536
|
+
const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());
|
|
537
|
+
credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
|
|
538
|
+
return resolvedRegion;
|
|
539
|
+
};
|
|
540
|
+
const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
|
|
541
|
+
let stsClient;
|
|
542
|
+
let closureSourceCreds;
|
|
543
|
+
return async (sourceCreds, params) => {
|
|
544
|
+
closureSourceCreds = sourceCreds;
|
|
545
|
+
if (!stsClient) {
|
|
546
|
+
const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId, } = stsOptions;
|
|
547
|
+
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
|
|
548
|
+
logger,
|
|
549
|
+
profile,
|
|
550
|
+
});
|
|
551
|
+
const isCompatibleRequestHandler = !isH2(requestHandler);
|
|
552
|
+
stsClient = new STSClient({
|
|
553
|
+
...stsOptions,
|
|
554
|
+
userAgentAppId,
|
|
555
|
+
profile,
|
|
556
|
+
credentialDefaultProvider: () => async () => closureSourceCreds,
|
|
557
|
+
region: resolvedRegion,
|
|
558
|
+
requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
|
|
559
|
+
logger: logger,
|
|
560
|
+
});
|
|
288
561
|
}
|
|
289
|
-
|
|
562
|
+
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
|
|
563
|
+
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
|
|
564
|
+
throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
|
|
565
|
+
}
|
|
566
|
+
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
|
567
|
+
const credentials = {
|
|
568
|
+
accessKeyId: Credentials.AccessKeyId,
|
|
569
|
+
secretAccessKey: Credentials.SecretAccessKey,
|
|
570
|
+
sessionToken: Credentials.SessionToken,
|
|
571
|
+
expiration: Credentials.Expiration,
|
|
572
|
+
...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),
|
|
573
|
+
...(accountId && { accountId }),
|
|
574
|
+
};
|
|
575
|
+
client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
|
|
576
|
+
return credentials;
|
|
290
577
|
};
|
|
291
|
-
return endpointRuleSetHttpAuthSchemeProvider;
|
|
292
578
|
};
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
579
|
+
const getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => {
|
|
580
|
+
let stsClient;
|
|
581
|
+
return async (params) => {
|
|
582
|
+
if (!stsClient) {
|
|
583
|
+
const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId, } = stsOptions;
|
|
584
|
+
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
|
|
585
|
+
logger,
|
|
586
|
+
profile,
|
|
587
|
+
});
|
|
588
|
+
const isCompatibleRequestHandler = !isH2(requestHandler);
|
|
589
|
+
stsClient = new STSClient({
|
|
590
|
+
...stsOptions,
|
|
591
|
+
userAgentAppId,
|
|
592
|
+
profile,
|
|
593
|
+
region: resolvedRegion,
|
|
594
|
+
requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
|
|
595
|
+
logger: logger,
|
|
596
|
+
});
|
|
300
597
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
598
|
+
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
|
|
599
|
+
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
|
|
600
|
+
throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
|
|
304
601
|
}
|
|
305
|
-
|
|
306
|
-
|
|
602
|
+
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
|
603
|
+
const credentials = {
|
|
604
|
+
accessKeyId: Credentials.AccessKeyId,
|
|
605
|
+
secretAccessKey: Credentials.SecretAccessKey,
|
|
606
|
+
sessionToken: Credentials.SessionToken,
|
|
607
|
+
expiration: Credentials.Expiration,
|
|
608
|
+
...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),
|
|
609
|
+
...(accountId && { accountId }),
|
|
610
|
+
};
|
|
611
|
+
if (accountId) {
|
|
612
|
+
client.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
|
|
613
|
+
}
|
|
614
|
+
client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
|
|
615
|
+
return credentials;
|
|
616
|
+
};
|
|
307
617
|
};
|
|
308
|
-
const
|
|
309
|
-
"
|
|
310
|
-
|
|
311
|
-
|
|
618
|
+
const isH2 = (requestHandler) => {
|
|
619
|
+
return requestHandler?.metadata?.handlerProtocol === "h2";
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
const getCustomizableStsClientCtor = (baseCtor, customizations) => {
|
|
623
|
+
if (!customizations)
|
|
624
|
+
return baseCtor;
|
|
625
|
+
else
|
|
626
|
+
return class CustomizableSTSClient extends baseCtor {
|
|
627
|
+
constructor(config) {
|
|
628
|
+
super(config);
|
|
629
|
+
for (const customization of customizations) {
|
|
630
|
+
this.middlewareStack.use(customization);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));
|
|
636
|
+
const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));
|
|
637
|
+
const decorateDefaultCredentialProvider = (provider) => (input) => provider({
|
|
638
|
+
roleAssumer: getDefaultRoleAssumer(input),
|
|
639
|
+
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),
|
|
640
|
+
...input,
|
|
312
641
|
});
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
642
|
+
|
|
643
|
+
exports.$Command = smithyClient.Command;
|
|
644
|
+
exports.STSServiceException = STSServiceException.STSServiceException;
|
|
645
|
+
exports.AssumeRoleCommand = AssumeRoleCommand;
|
|
646
|
+
exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
|
|
647
|
+
exports.STS = STS;
|
|
648
|
+
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
|
|
649
|
+
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
|
650
|
+
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
|
651
|
+
Object.prototype.hasOwnProperty.call(STSClient, '__proto__') &&
|
|
652
|
+
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
653
|
+
Object.defineProperty(exports, '__proto__', {
|
|
654
|
+
enumerable: true,
|
|
655
|
+
value: STSClient['__proto__']
|
|
318
656
|
});
|
|
319
|
-
};
|
|
320
657
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
658
|
+
Object.keys(STSClient).forEach(function (k) {
|
|
659
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = STSClient[k];
|
|
660
|
+
});
|
|
661
|
+
Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
|
|
662
|
+
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
663
|
+
Object.defineProperty(exports, '__proto__', {
|
|
664
|
+
enumerable: true,
|
|
665
|
+
value: schemas_0['__proto__']
|
|
327
666
|
});
|
|
328
|
-
};
|
|
329
|
-
const commonParams = {
|
|
330
|
-
UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
|
|
331
|
-
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
332
|
-
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
333
|
-
Region: { type: "builtInParams", name: "region" },
|
|
334
|
-
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
335
|
-
};
|
|
336
667
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
668
|
+
Object.keys(schemas_0).forEach(function (k) {
|
|
669
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
|
|
670
|
+
});
|
|
671
|
+
Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
|
|
672
|
+
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
673
|
+
Object.defineProperty(exports, '__proto__', {
|
|
674
|
+
enumerable: true,
|
|
675
|
+
value: errors['__proto__']
|
|
676
|
+
});
|
|
340
677
|
|
|
341
|
-
|
|
678
|
+
Object.keys(errors).forEach(function (k) {
|
|
679
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
|
|
680
|
+
});
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
/***/ }),
|
|
684
|
+
|
|
685
|
+
/***/ 17171:
|
|
686
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
690
|
+
exports.STSServiceException = exports.__ServiceException = void 0;
|
|
691
|
+
const smithy_client_1 = __webpack_require__(61411);
|
|
692
|
+
Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } }));
|
|
693
|
+
class STSServiceException extends smithy_client_1.ServiceException {
|
|
342
694
|
constructor(options) {
|
|
343
695
|
super(options);
|
|
344
696
|
Object.setPrototypeOf(this, STSServiceException.prototype);
|
|
345
697
|
}
|
|
346
698
|
}
|
|
699
|
+
exports.STSServiceException = STSServiceException;
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
/***/ }),
|
|
703
|
+
|
|
704
|
+
/***/ 41688:
|
|
705
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
706
|
+
|
|
347
707
|
|
|
348
|
-
|
|
708
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
709
|
+
exports.IDPCommunicationErrorException = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = void 0;
|
|
710
|
+
const STSServiceException_1 = __webpack_require__(17171);
|
|
711
|
+
class ExpiredTokenException extends STSServiceException_1.STSServiceException {
|
|
349
712
|
name = "ExpiredTokenException";
|
|
350
713
|
$fault = "client";
|
|
351
714
|
constructor(opts) {
|
|
@@ -357,7 +720,8 @@ class ExpiredTokenException extends STSServiceException {
|
|
|
357
720
|
Object.setPrototypeOf(this, ExpiredTokenException.prototype);
|
|
358
721
|
}
|
|
359
722
|
}
|
|
360
|
-
|
|
723
|
+
exports.ExpiredTokenException = ExpiredTokenException;
|
|
724
|
+
class MalformedPolicyDocumentException extends STSServiceException_1.STSServiceException {
|
|
361
725
|
name = "MalformedPolicyDocumentException";
|
|
362
726
|
$fault = "client";
|
|
363
727
|
constructor(opts) {
|
|
@@ -369,7 +733,8 @@ class MalformedPolicyDocumentException extends STSServiceException {
|
|
|
369
733
|
Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
|
|
370
734
|
}
|
|
371
735
|
}
|
|
372
|
-
|
|
736
|
+
exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException;
|
|
737
|
+
class PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException {
|
|
373
738
|
name = "PackedPolicyTooLargeException";
|
|
374
739
|
$fault = "client";
|
|
375
740
|
constructor(opts) {
|
|
@@ -381,7 +746,8 @@ class PackedPolicyTooLargeException extends STSServiceException {
|
|
|
381
746
|
Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
|
|
382
747
|
}
|
|
383
748
|
}
|
|
384
|
-
|
|
749
|
+
exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException;
|
|
750
|
+
class RegionDisabledException extends STSServiceException_1.STSServiceException {
|
|
385
751
|
name = "RegionDisabledException";
|
|
386
752
|
$fault = "client";
|
|
387
753
|
constructor(opts) {
|
|
@@ -393,7 +759,8 @@ class RegionDisabledException extends STSServiceException {
|
|
|
393
759
|
Object.setPrototypeOf(this, RegionDisabledException.prototype);
|
|
394
760
|
}
|
|
395
761
|
}
|
|
396
|
-
|
|
762
|
+
exports.RegionDisabledException = RegionDisabledException;
|
|
763
|
+
class IDPRejectedClaimException extends STSServiceException_1.STSServiceException {
|
|
397
764
|
name = "IDPRejectedClaimException";
|
|
398
765
|
$fault = "client";
|
|
399
766
|
constructor(opts) {
|
|
@@ -405,7 +772,8 @@ class IDPRejectedClaimException extends STSServiceException {
|
|
|
405
772
|
Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
|
|
406
773
|
}
|
|
407
774
|
}
|
|
408
|
-
|
|
775
|
+
exports.IDPRejectedClaimException = IDPRejectedClaimException;
|
|
776
|
+
class InvalidIdentityTokenException extends STSServiceException_1.STSServiceException {
|
|
409
777
|
name = "InvalidIdentityTokenException";
|
|
410
778
|
$fault = "client";
|
|
411
779
|
constructor(opts) {
|
|
@@ -417,7 +785,8 @@ class InvalidIdentityTokenException extends STSServiceException {
|
|
|
417
785
|
Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
|
|
418
786
|
}
|
|
419
787
|
}
|
|
420
|
-
|
|
788
|
+
exports.InvalidIdentityTokenException = InvalidIdentityTokenException;
|
|
789
|
+
class IDPCommunicationErrorException extends STSServiceException_1.STSServiceException {
|
|
421
790
|
name = "IDPCommunicationErrorException";
|
|
422
791
|
$fault = "client";
|
|
423
792
|
$retryable = {};
|
|
@@ -430,7 +799,182 @@ class IDPCommunicationErrorException extends STSServiceException {
|
|
|
430
799
|
Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
|
|
431
800
|
}
|
|
432
801
|
}
|
|
802
|
+
exports.IDPCommunicationErrorException = IDPCommunicationErrorException;
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
/***/ }),
|
|
806
|
+
|
|
807
|
+
/***/ 36578:
|
|
808
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
812
|
+
exports.getRuntimeConfig = void 0;
|
|
813
|
+
const tslib_1 = __webpack_require__(61860);
|
|
814
|
+
const package_json_1 = tslib_1.__importDefault(__webpack_require__(39955));
|
|
815
|
+
const client_1 = __webpack_require__(5152);
|
|
816
|
+
const httpAuthSchemes_1 = __webpack_require__(97523);
|
|
817
|
+
const util_user_agent_node_1 = __webpack_require__(51656);
|
|
818
|
+
const config_resolver_1 = __webpack_require__(39316);
|
|
819
|
+
const core_1 = __webpack_require__(90402);
|
|
820
|
+
const hash_node_1 = __webpack_require__(5092);
|
|
821
|
+
const middleware_retry_1 = __webpack_require__(19618);
|
|
822
|
+
const node_config_provider_1 = __webpack_require__(55704);
|
|
823
|
+
const node_http_handler_1 = __webpack_require__(61279);
|
|
824
|
+
const smithy_client_1 = __webpack_require__(61411);
|
|
825
|
+
const util_body_length_node_1 = __webpack_require__(13638);
|
|
826
|
+
const util_defaults_mode_node_1 = __webpack_require__(15435);
|
|
827
|
+
const util_retry_1 = __webpack_require__(15518);
|
|
828
|
+
const runtimeConfig_shared_1 = __webpack_require__(24443);
|
|
829
|
+
const getRuntimeConfig = (config) => {
|
|
830
|
+
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
|
|
831
|
+
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
|
832
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
833
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
834
|
+
(0, client_1.emitWarningIfUnsupportedVersion)(process.version);
|
|
835
|
+
const loaderConfig = {
|
|
836
|
+
profile: config?.profile,
|
|
837
|
+
logger: clientSharedValues.logger,
|
|
838
|
+
};
|
|
839
|
+
return {
|
|
840
|
+
...clientSharedValues,
|
|
841
|
+
...config,
|
|
842
|
+
runtime: "node",
|
|
843
|
+
defaultsMode,
|
|
844
|
+
authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
845
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
|
846
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
847
|
+
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
848
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
849
|
+
{
|
|
850
|
+
schemeId: "aws.auth#sigv4",
|
|
851
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") ||
|
|
852
|
+
(async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
|
|
853
|
+
signer: new httpAuthSchemes_1.AwsSdkSigV4Signer(),
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
schemeId: "aws.auth#sigv4a",
|
|
857
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
|
|
858
|
+
signer: new httpAuthSchemes_1.AwsSdkSigV4ASigner(),
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
schemeId: "smithy.api#noAuth",
|
|
862
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
863
|
+
signer: new core_1.NoAuthSigner(),
|
|
864
|
+
},
|
|
865
|
+
],
|
|
866
|
+
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
867
|
+
region: config?.region ??
|
|
868
|
+
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
869
|
+
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
870
|
+
retryMode: config?.retryMode ??
|
|
871
|
+
(0, node_config_provider_1.loadConfig)({
|
|
872
|
+
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
873
|
+
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
|
|
874
|
+
}, config),
|
|
875
|
+
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
876
|
+
sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, node_config_provider_1.loadConfig)(httpAuthSchemes_1.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
|
|
877
|
+
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
878
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
879
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
880
|
+
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
/***/ }),
|
|
887
|
+
|
|
888
|
+
/***/ 24443:
|
|
889
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
893
|
+
exports.getRuntimeConfig = void 0;
|
|
894
|
+
const httpAuthSchemes_1 = __webpack_require__(97523);
|
|
895
|
+
const protocols_1 = __webpack_require__(37288);
|
|
896
|
+
const signature_v4_multi_region_1 = __webpack_require__(5785);
|
|
897
|
+
const core_1 = __webpack_require__(90402);
|
|
898
|
+
const smithy_client_1 = __webpack_require__(61411);
|
|
899
|
+
const url_parser_1 = __webpack_require__(14494);
|
|
900
|
+
const util_base64_1 = __webpack_require__(68385);
|
|
901
|
+
const util_utf8_1 = __webpack_require__(71577);
|
|
902
|
+
const httpAuthSchemeProvider_1 = __webpack_require__(27851);
|
|
903
|
+
const endpointResolver_1 = __webpack_require__(59765);
|
|
904
|
+
const schemas_0_1 = __webpack_require__(1684);
|
|
905
|
+
const getRuntimeConfig = (config) => {
|
|
906
|
+
return {
|
|
907
|
+
apiVersion: "2011-06-15",
|
|
908
|
+
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
|
|
909
|
+
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
|
|
910
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
911
|
+
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
|
912
|
+
extensions: config?.extensions ?? [],
|
|
913
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
|
|
914
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
915
|
+
{
|
|
916
|
+
schemeId: "aws.auth#sigv4",
|
|
917
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
918
|
+
signer: new httpAuthSchemes_1.AwsSdkSigV4Signer(),
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
schemeId: "aws.auth#sigv4a",
|
|
922
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
|
|
923
|
+
signer: new httpAuthSchemes_1.AwsSdkSigV4ASigner(),
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
schemeId: "smithy.api#noAuth",
|
|
927
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
928
|
+
signer: new core_1.NoAuthSigner(),
|
|
929
|
+
},
|
|
930
|
+
],
|
|
931
|
+
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
932
|
+
protocol: config?.protocol ?? protocols_1.AwsQueryProtocol,
|
|
933
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
934
|
+
defaultNamespace: "com.amazonaws.sts",
|
|
935
|
+
errorTypeRegistries: schemas_0_1.errorTypeRegistries,
|
|
936
|
+
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
|
937
|
+
version: "2011-06-15",
|
|
938
|
+
serviceTarget: "AWSSecurityTokenServiceV20110615",
|
|
939
|
+
},
|
|
940
|
+
serviceId: config?.serviceId ?? "STS",
|
|
941
|
+
signerConstructor: config?.signerConstructor ?? signature_v4_multi_region_1.SignatureV4MultiRegion,
|
|
942
|
+
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
943
|
+
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
|
944
|
+
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
|
|
945
|
+
};
|
|
946
|
+
};
|
|
947
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
/***/ }),
|
|
951
|
+
|
|
952
|
+
/***/ 37742:
|
|
953
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
433
954
|
|
|
955
|
+
|
|
956
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
957
|
+
exports.resolveRuntimeExtensions = void 0;
|
|
958
|
+
const region_config_resolver_1 = __webpack_require__(36463);
|
|
959
|
+
const protocol_http_1 = __webpack_require__(72356);
|
|
960
|
+
const smithy_client_1 = __webpack_require__(61411);
|
|
961
|
+
const httpAuthExtensionConfiguration_1 = __webpack_require__(34532);
|
|
962
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
963
|
+
const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));
|
|
964
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
965
|
+
return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));
|
|
966
|
+
};
|
|
967
|
+
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
|
968
|
+
|
|
969
|
+
|
|
970
|
+
/***/ }),
|
|
971
|
+
|
|
972
|
+
/***/ 1684:
|
|
973
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
977
|
+
exports.AssumeRoleWithWebIdentity$ = exports.AssumeRole$ = exports.Tag$ = exports.ProvidedContext$ = exports.PolicyDescriptorType$ = exports.Credentials$ = exports.AssumeRoleWithWebIdentityResponse$ = exports.AssumeRoleWithWebIdentityRequest$ = exports.AssumeRoleResponse$ = exports.AssumeRoleRequest$ = exports.AssumedRoleUser$ = exports.errorTypeRegistries = exports.RegionDisabledException$ = exports.PackedPolicyTooLargeException$ = exports.MalformedPolicyDocumentException$ = exports.InvalidIdentityTokenException$ = exports.IDPRejectedClaimException$ = exports.IDPCommunicationErrorException$ = exports.ExpiredTokenException$ = exports.STSServiceException$ = void 0;
|
|
434
978
|
const _A = "Arn";
|
|
435
979
|
const _AKI = "AccessKeyId";
|
|
436
980
|
const _AR = "AssumeRole";
|
|
@@ -490,11 +1034,14 @@ const _pDLT = "policyDescriptorListType";
|
|
|
490
1034
|
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
|
|
491
1035
|
const _tLT = "tagListType";
|
|
492
1036
|
const n0 = "com.amazonaws.sts";
|
|
493
|
-
const
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
const
|
|
497
|
-
|
|
1037
|
+
const schema_1 = __webpack_require__(26890);
|
|
1038
|
+
const errors_1 = __webpack_require__(41688);
|
|
1039
|
+
const STSServiceException_1 = __webpack_require__(17171);
|
|
1040
|
+
const _s_registry = schema_1.TypeRegistry.for(_s);
|
|
1041
|
+
exports.STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []];
|
|
1042
|
+
_s_registry.registerError(exports.STSServiceException$, STSServiceException_1.STSServiceException);
|
|
1043
|
+
const n0_registry = schema_1.TypeRegistry.for(n0);
|
|
1044
|
+
exports.ExpiredTokenException$ = [
|
|
498
1045
|
-3,
|
|
499
1046
|
n0,
|
|
500
1047
|
_ETE,
|
|
@@ -502,8 +1049,8 @@ var ExpiredTokenException$ = [
|
|
|
502
1049
|
[_m],
|
|
503
1050
|
[0],
|
|
504
1051
|
];
|
|
505
|
-
n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);
|
|
506
|
-
|
|
1052
|
+
n0_registry.registerError(exports.ExpiredTokenException$, errors_1.ExpiredTokenException);
|
|
1053
|
+
exports.IDPCommunicationErrorException$ = [
|
|
507
1054
|
-3,
|
|
508
1055
|
n0,
|
|
509
1056
|
_IDPCEE,
|
|
@@ -511,8 +1058,8 @@ var IDPCommunicationErrorException$ = [
|
|
|
511
1058
|
[_m],
|
|
512
1059
|
[0],
|
|
513
1060
|
];
|
|
514
|
-
n0_registry.registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
|
|
515
|
-
|
|
1061
|
+
n0_registry.registerError(exports.IDPCommunicationErrorException$, errors_1.IDPCommunicationErrorException);
|
|
1062
|
+
exports.IDPRejectedClaimException$ = [
|
|
516
1063
|
-3,
|
|
517
1064
|
n0,
|
|
518
1065
|
_IDPRCE,
|
|
@@ -520,8 +1067,8 @@ var IDPRejectedClaimException$ = [
|
|
|
520
1067
|
[_m],
|
|
521
1068
|
[0],
|
|
522
1069
|
];
|
|
523
|
-
n0_registry.registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
|
|
524
|
-
|
|
1070
|
+
n0_registry.registerError(exports.IDPRejectedClaimException$, errors_1.IDPRejectedClaimException);
|
|
1071
|
+
exports.InvalidIdentityTokenException$ = [
|
|
525
1072
|
-3,
|
|
526
1073
|
n0,
|
|
527
1074
|
_IITE,
|
|
@@ -529,8 +1076,8 @@ var InvalidIdentityTokenException$ = [
|
|
|
529
1076
|
[_m],
|
|
530
1077
|
[0],
|
|
531
1078
|
];
|
|
532
|
-
n0_registry.registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
|
|
533
|
-
|
|
1079
|
+
n0_registry.registerError(exports.InvalidIdentityTokenException$, errors_1.InvalidIdentityTokenException);
|
|
1080
|
+
exports.MalformedPolicyDocumentException$ = [
|
|
534
1081
|
-3,
|
|
535
1082
|
n0,
|
|
536
1083
|
_MPDE,
|
|
@@ -538,8 +1085,8 @@ var MalformedPolicyDocumentException$ = [
|
|
|
538
1085
|
[_m],
|
|
539
1086
|
[0],
|
|
540
1087
|
];
|
|
541
|
-
n0_registry.registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
|
|
542
|
-
|
|
1088
|
+
n0_registry.registerError(exports.MalformedPolicyDocumentException$, errors_1.MalformedPolicyDocumentException);
|
|
1089
|
+
exports.PackedPolicyTooLargeException$ = [
|
|
543
1090
|
-3,
|
|
544
1091
|
n0,
|
|
545
1092
|
_PPTLE,
|
|
@@ -547,8 +1094,8 @@ var PackedPolicyTooLargeException$ = [
|
|
|
547
1094
|
[_m],
|
|
548
1095
|
[0],
|
|
549
1096
|
];
|
|
550
|
-
n0_registry.registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
|
|
551
|
-
|
|
1097
|
+
n0_registry.registerError(exports.PackedPolicyTooLargeException$, errors_1.PackedPolicyTooLargeException);
|
|
1098
|
+
exports.RegionDisabledException$ = [
|
|
552
1099
|
-3,
|
|
553
1100
|
n0,
|
|
554
1101
|
_RDE,
|
|
@@ -556,12 +1103,12 @@ var RegionDisabledException$ = [
|
|
|
556
1103
|
[_m],
|
|
557
1104
|
[0],
|
|
558
1105
|
];
|
|
559
|
-
n0_registry.registerError(RegionDisabledException$, RegionDisabledException);
|
|
560
|
-
|
|
1106
|
+
n0_registry.registerError(exports.RegionDisabledException$, errors_1.RegionDisabledException);
|
|
1107
|
+
exports.errorTypeRegistries = [_s_registry, n0_registry];
|
|
561
1108
|
var accessKeySecretType = [0, n0, _aKST, 8, 0];
|
|
562
1109
|
var clientTokenType = [0, n0, _cTT, 8, 0];
|
|
563
|
-
|
|
564
|
-
|
|
1110
|
+
exports.AssumedRoleUser$ = [3, n0, _ARU, 0, [_ARI, _A], [0, 0], 2];
|
|
1111
|
+
exports.AssumeRoleRequest$ = [
|
|
565
1112
|
3,
|
|
566
1113
|
n0,
|
|
567
1114
|
_ARR,
|
|
@@ -570,15 +1117,15 @@ var AssumeRoleRequest$ = [
|
|
|
570
1117
|
[0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
|
|
571
1118
|
2,
|
|
572
1119
|
];
|
|
573
|
-
|
|
1120
|
+
exports.AssumeRoleResponse$ = [
|
|
574
1121
|
3,
|
|
575
1122
|
n0,
|
|
576
1123
|
_ARRs,
|
|
577
1124
|
0,
|
|
578
1125
|
[_C, _ARU, _PPS, _SI],
|
|
579
|
-
[[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0],
|
|
1126
|
+
[[() => exports.Credentials$, 0], () => exports.AssumedRoleUser$, 1, 0],
|
|
580
1127
|
];
|
|
581
|
-
|
|
1128
|
+
exports.AssumeRoleWithWebIdentityRequest$ = [
|
|
582
1129
|
3,
|
|
583
1130
|
n0,
|
|
584
1131
|
_ARWWIR,
|
|
@@ -587,15 +1134,15 @@ var AssumeRoleWithWebIdentityRequest$ = [
|
|
|
587
1134
|
[0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
|
|
588
1135
|
3,
|
|
589
1136
|
];
|
|
590
|
-
|
|
1137
|
+
exports.AssumeRoleWithWebIdentityResponse$ = [
|
|
591
1138
|
3,
|
|
592
1139
|
n0,
|
|
593
1140
|
_ARWWIRs,
|
|
594
1141
|
0,
|
|
595
1142
|
[_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
|
|
596
|
-
[[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0],
|
|
1143
|
+
[[() => exports.Credentials$, 0], 0, () => exports.AssumedRoleUser$, 1, 0, 0, 0],
|
|
597
1144
|
];
|
|
598
|
-
|
|
1145
|
+
exports.Credentials$ = [
|
|
599
1146
|
3,
|
|
600
1147
|
n0,
|
|
601
1148
|
_C,
|
|
@@ -604,391 +1151,30 @@ var Credentials$ = [
|
|
|
604
1151
|
[0, [() => accessKeySecretType, 0], 0, 4],
|
|
605
1152
|
4,
|
|
606
1153
|
];
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType$];
|
|
611
|
-
var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext$];
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
|
|
1154
|
+
exports.PolicyDescriptorType$ = [3, n0, _PDT, 0, [_a], [0]];
|
|
1155
|
+
exports.ProvidedContext$ = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
|
|
1156
|
+
exports.Tag$ = [3, n0, _Ta, 0, [_K, _V], [0, 0], 2];
|
|
1157
|
+
var policyDescriptorListType = [1, n0, _pDLT, 0, () => exports.PolicyDescriptorType$];
|
|
1158
|
+
var ProvidedContextsListType = [1, n0, _PCLT, 0, () => exports.ProvidedContext$];
|
|
1159
|
+
var tagKeyListType = (/* unused pure expression or super */ null && (64 | 0));
|
|
1160
|
+
var tagListType = [1, n0, _tLT, 0, () => exports.Tag$];
|
|
1161
|
+
exports.AssumeRole$ = [9, n0, _AR, 0, () => exports.AssumeRoleRequest$, () => exports.AssumeRoleResponse$];
|
|
1162
|
+
exports.AssumeRoleWithWebIdentity$ = [
|
|
615
1163
|
9,
|
|
616
1164
|
n0,
|
|
617
1165
|
_ARWWI,
|
|
618
1166
|
0,
|
|
619
|
-
() => AssumeRoleWithWebIdentityRequest$,
|
|
620
|
-
() => AssumeRoleWithWebIdentityResponse$,
|
|
1167
|
+
() => exports.AssumeRoleWithWebIdentityRequest$,
|
|
1168
|
+
() => exports.AssumeRoleWithWebIdentityResponse$,
|
|
621
1169
|
];
|
|
622
1170
|
|
|
623
|
-
const getRuntimeConfig$1 = (config) => {
|
|
624
|
-
return {
|
|
625
|
-
apiVersion: "2011-06-15",
|
|
626
|
-
base64Decoder: config?.base64Decoder ?? serde.fromBase64,
|
|
627
|
-
base64Encoder: config?.base64Encoder ?? serde.toBase64,
|
|
628
|
-
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
629
|
-
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
630
|
-
extensions: config?.extensions ?? [],
|
|
631
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider,
|
|
632
|
-
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
633
|
-
{
|
|
634
|
-
schemeId: "aws.auth#sigv4",
|
|
635
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
636
|
-
signer: new httpAuthSchemes.AwsSdkSigV4Signer(),
|
|
637
|
-
},
|
|
638
|
-
{
|
|
639
|
-
schemeId: "aws.auth#sigv4a",
|
|
640
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
|
|
641
|
-
signer: new httpAuthSchemes.AwsSdkSigV4ASigner(),
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
schemeId: "smithy.api#noAuth",
|
|
645
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
646
|
-
signer: new core.NoAuthSigner(),
|
|
647
|
-
},
|
|
648
|
-
],
|
|
649
|
-
logger: config?.logger ?? new client.NoOpLogger(),
|
|
650
|
-
protocol: config?.protocol ?? protocols$1.AwsQueryProtocol,
|
|
651
|
-
protocolSettings: config?.protocolSettings ?? {
|
|
652
|
-
defaultNamespace: "com.amazonaws.sts",
|
|
653
|
-
errorTypeRegistries,
|
|
654
|
-
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
|
655
|
-
version: "2011-06-15",
|
|
656
|
-
serviceTarget: "AWSSecurityTokenServiceV20110615",
|
|
657
|
-
},
|
|
658
|
-
serviceId: config?.serviceId ?? "STS",
|
|
659
|
-
signerConstructor: config?.signerConstructor ?? signatureV4MultiRegion.SignatureV4MultiRegion,
|
|
660
|
-
urlParser: config?.urlParser ?? protocols.parseUrl,
|
|
661
|
-
utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,
|
|
662
|
-
utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,
|
|
663
|
-
};
|
|
664
|
-
};
|
|
665
|
-
|
|
666
|
-
const getRuntimeConfig = (config$1) => {
|
|
667
|
-
client.emitWarningIfUnsupportedVersion(process.version);
|
|
668
|
-
const defaultsMode = config.resolveDefaultsModeConfig(config$1);
|
|
669
|
-
const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);
|
|
670
|
-
const clientSharedValues = getRuntimeConfig$1(config$1);
|
|
671
|
-
client$1.emitWarningIfUnsupportedVersion(process.version);
|
|
672
|
-
const loaderConfig = {
|
|
673
|
-
profile: config$1?.profile,
|
|
674
|
-
logger: clientSharedValues.logger,
|
|
675
|
-
};
|
|
676
|
-
return {
|
|
677
|
-
...clientSharedValues,
|
|
678
|
-
...config$1,
|
|
679
|
-
runtime: "node",
|
|
680
|
-
defaultsMode,
|
|
681
|
-
authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
682
|
-
bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,
|
|
683
|
-
defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??
|
|
684
|
-
utilUserAgentNode.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
685
|
-
httpAuthSchemes: config$1?.httpAuthSchemes ?? [
|
|
686
|
-
{
|
|
687
|
-
schemeId: "aws.auth#sigv4",
|
|
688
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") ||
|
|
689
|
-
(async (idProps) => await config$1.credentialDefaultProvider(idProps?.__config || {})()),
|
|
690
|
-
signer: new httpAuthSchemes.AwsSdkSigV4Signer(),
|
|
691
|
-
},
|
|
692
|
-
{
|
|
693
|
-
schemeId: "aws.auth#sigv4a",
|
|
694
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
|
|
695
|
-
signer: new httpAuthSchemes.AwsSdkSigV4ASigner(),
|
|
696
|
-
},
|
|
697
|
-
{
|
|
698
|
-
schemeId: "smithy.api#noAuth",
|
|
699
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
700
|
-
signer: new core.NoAuthSigner(),
|
|
701
|
-
},
|
|
702
|
-
],
|
|
703
|
-
maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),
|
|
704
|
-
region: config$1?.region ??
|
|
705
|
-
config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
706
|
-
requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),
|
|
707
|
-
retryMode: config$1?.retryMode ??
|
|
708
|
-
config.loadConfig({
|
|
709
|
-
...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
710
|
-
default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,
|
|
711
|
-
}, config$1),
|
|
712
|
-
sha256: config$1?.sha256 ?? serde.Hash.bind(null, "sha256"),
|
|
713
|
-
sigv4aSigningRegionSet: config$1?.sigv4aSigningRegionSet ?? config.loadConfig(httpAuthSchemes.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
|
|
714
|
-
streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,
|
|
715
|
-
useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
716
|
-
useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
717
|
-
userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(utilUserAgentNode.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
718
|
-
};
|
|
719
|
-
};
|
|
720
|
-
|
|
721
|
-
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
722
|
-
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
723
|
-
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
724
|
-
let _credentials = runtimeConfig.credentials;
|
|
725
|
-
return {
|
|
726
|
-
setHttpAuthScheme(httpAuthScheme) {
|
|
727
|
-
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
728
|
-
if (index === -1) {
|
|
729
|
-
_httpAuthSchemes.push(httpAuthScheme);
|
|
730
|
-
}
|
|
731
|
-
else {
|
|
732
|
-
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
733
|
-
}
|
|
734
|
-
},
|
|
735
|
-
httpAuthSchemes() {
|
|
736
|
-
return _httpAuthSchemes;
|
|
737
|
-
},
|
|
738
|
-
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
739
|
-
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
740
|
-
},
|
|
741
|
-
httpAuthSchemeProvider() {
|
|
742
|
-
return _httpAuthSchemeProvider;
|
|
743
|
-
},
|
|
744
|
-
setCredentials(credentials) {
|
|
745
|
-
_credentials = credentials;
|
|
746
|
-
},
|
|
747
|
-
credentials() {
|
|
748
|
-
return _credentials;
|
|
749
|
-
},
|
|
750
|
-
};
|
|
751
|
-
};
|
|
752
|
-
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
753
|
-
return {
|
|
754
|
-
httpAuthSchemes: config.httpAuthSchemes(),
|
|
755
|
-
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
756
|
-
credentials: config.credentials(),
|
|
757
|
-
};
|
|
758
|
-
};
|
|
759
|
-
|
|
760
|
-
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
761
|
-
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
762
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
763
|
-
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
764
|
-
};
|
|
765
|
-
|
|
766
|
-
class STSClient extends client.Client {
|
|
767
|
-
config;
|
|
768
|
-
constructor(...[configuration]) {
|
|
769
|
-
const _config_0 = getRuntimeConfig(configuration || {});
|
|
770
|
-
super(_config_0);
|
|
771
|
-
this.initConfig = _config_0;
|
|
772
|
-
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
773
|
-
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
|
774
|
-
const _config_3 = retry.resolveRetryConfig(_config_2);
|
|
775
|
-
const _config_4 = config.resolveRegionConfig(_config_3);
|
|
776
|
-
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
|
777
|
-
const _config_6 = endpoints.resolveEndpointConfig(_config_5);
|
|
778
|
-
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
779
|
-
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
780
|
-
this.config = _config_8;
|
|
781
|
-
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
782
|
-
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
783
|
-
this.middlewareStack.use(retry.getRetryPlugin(this.config));
|
|
784
|
-
this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));
|
|
785
|
-
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
|
786
|
-
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
|
787
|
-
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
|
788
|
-
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
789
|
-
httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
|
|
790
|
-
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
|
791
|
-
"aws.auth#sigv4": config.credentials,
|
|
792
|
-
"aws.auth#sigv4a": config.credentials,
|
|
793
|
-
}),
|
|
794
|
-
}));
|
|
795
|
-
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
|
796
|
-
}
|
|
797
|
-
destroy() {
|
|
798
|
-
super.destroy();
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
class AssumeRoleCommand extends client.Command
|
|
803
|
-
.classBuilder()
|
|
804
|
-
.ep(commonParams)
|
|
805
|
-
.m(function (Command, cs, config, o) {
|
|
806
|
-
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
807
|
-
})
|
|
808
|
-
.s("AWSSecurityTokenServiceV20110615", "AssumeRole", {})
|
|
809
|
-
.n("STSClient", "AssumeRoleCommand")
|
|
810
|
-
.sc(AssumeRole$)
|
|
811
|
-
.build() {
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
class AssumeRoleWithWebIdentityCommand extends client.Command
|
|
815
|
-
.classBuilder()
|
|
816
|
-
.ep(commonParams)
|
|
817
|
-
.m(function (Command, cs, config, o) {
|
|
818
|
-
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
819
|
-
})
|
|
820
|
-
.s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {})
|
|
821
|
-
.n("STSClient", "AssumeRoleWithWebIdentityCommand")
|
|
822
|
-
.sc(AssumeRoleWithWebIdentity$)
|
|
823
|
-
.build() {
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
const commands = {
|
|
827
|
-
AssumeRoleCommand,
|
|
828
|
-
AssumeRoleWithWebIdentityCommand,
|
|
829
|
-
};
|
|
830
|
-
class STS extends STSClient {
|
|
831
|
-
}
|
|
832
|
-
client.createAggregatedClient(commands, STS);
|
|
833
|
-
|
|
834
|
-
const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
|
835
|
-
if (typeof assumedRoleUser?.Arn === "string") {
|
|
836
|
-
const arnComponents = assumedRoleUser.Arn.split(":");
|
|
837
|
-
if (arnComponents.length > 4 && arnComponents[4] !== "") {
|
|
838
|
-
return arnComponents[4];
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
return undefined;
|
|
842
|
-
};
|
|
843
|
-
const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
|
|
844
|
-
const region = typeof _region === "function" ? await _region() : _region;
|
|
845
|
-
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
|
846
|
-
let stsDefaultRegion = "";
|
|
847
|
-
const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());
|
|
848
|
-
credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
|
|
849
|
-
return resolvedRegion;
|
|
850
|
-
};
|
|
851
|
-
const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
|
|
852
|
-
let stsClient;
|
|
853
|
-
let closureSourceCreds;
|
|
854
|
-
return async (sourceCreds, params) => {
|
|
855
|
-
closureSourceCreds = sourceCreds;
|
|
856
|
-
if (!stsClient) {
|
|
857
|
-
const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId, } = stsOptions;
|
|
858
|
-
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
|
|
859
|
-
logger,
|
|
860
|
-
profile,
|
|
861
|
-
});
|
|
862
|
-
const isCompatibleRequestHandler = !isH2(requestHandler);
|
|
863
|
-
stsClient = new STSClient({
|
|
864
|
-
...stsOptions,
|
|
865
|
-
userAgentAppId,
|
|
866
|
-
profile,
|
|
867
|
-
credentialDefaultProvider: () => async () => closureSourceCreds,
|
|
868
|
-
region: resolvedRegion,
|
|
869
|
-
requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
|
|
870
|
-
logger: logger,
|
|
871
|
-
});
|
|
872
|
-
}
|
|
873
|
-
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
|
|
874
|
-
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
|
|
875
|
-
throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
|
|
876
|
-
}
|
|
877
|
-
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
|
878
|
-
const credentials = {
|
|
879
|
-
accessKeyId: Credentials.AccessKeyId,
|
|
880
|
-
secretAccessKey: Credentials.SecretAccessKey,
|
|
881
|
-
sessionToken: Credentials.SessionToken,
|
|
882
|
-
expiration: Credentials.Expiration,
|
|
883
|
-
...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),
|
|
884
|
-
...(accountId && { accountId }),
|
|
885
|
-
};
|
|
886
|
-
client$1.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
|
|
887
|
-
return credentials;
|
|
888
|
-
};
|
|
889
|
-
};
|
|
890
|
-
const getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => {
|
|
891
|
-
let stsClient;
|
|
892
|
-
return async (params) => {
|
|
893
|
-
if (!stsClient) {
|
|
894
|
-
const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId, } = stsOptions;
|
|
895
|
-
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
|
|
896
|
-
logger,
|
|
897
|
-
profile,
|
|
898
|
-
});
|
|
899
|
-
const isCompatibleRequestHandler = !isH2(requestHandler);
|
|
900
|
-
stsClient = new STSClient({
|
|
901
|
-
...stsOptions,
|
|
902
|
-
userAgentAppId,
|
|
903
|
-
profile,
|
|
904
|
-
region: resolvedRegion,
|
|
905
|
-
requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
|
|
906
|
-
logger: logger,
|
|
907
|
-
});
|
|
908
|
-
}
|
|
909
|
-
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
|
|
910
|
-
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
|
|
911
|
-
throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
|
|
912
|
-
}
|
|
913
|
-
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
|
914
|
-
const credentials = {
|
|
915
|
-
accessKeyId: Credentials.AccessKeyId,
|
|
916
|
-
secretAccessKey: Credentials.SecretAccessKey,
|
|
917
|
-
sessionToken: Credentials.SessionToken,
|
|
918
|
-
expiration: Credentials.Expiration,
|
|
919
|
-
...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),
|
|
920
|
-
...(accountId && { accountId }),
|
|
921
|
-
};
|
|
922
|
-
if (accountId) {
|
|
923
|
-
client$1.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
|
|
924
|
-
}
|
|
925
|
-
client$1.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
|
|
926
|
-
return credentials;
|
|
927
|
-
};
|
|
928
|
-
};
|
|
929
|
-
const isH2 = (requestHandler) => {
|
|
930
|
-
return requestHandler?.metadata?.handlerProtocol === "h2";
|
|
931
|
-
};
|
|
932
1171
|
|
|
933
|
-
|
|
934
|
-
if (!customizations)
|
|
935
|
-
return baseCtor;
|
|
936
|
-
else
|
|
937
|
-
return class CustomizableSTSClient extends baseCtor {
|
|
938
|
-
constructor(config) {
|
|
939
|
-
super(config);
|
|
940
|
-
for (const customization of customizations) {
|
|
941
|
-
this.middlewareStack.use(customization);
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
};
|
|
945
|
-
};
|
|
946
|
-
const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
|
|
947
|
-
const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
|
|
948
|
-
const decorateDefaultCredentialProvider = (provider) => (input) => provider({
|
|
949
|
-
roleAssumer: getDefaultRoleAssumer(input),
|
|
950
|
-
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),
|
|
951
|
-
...input,
|
|
952
|
-
});
|
|
1172
|
+
/***/ }),
|
|
953
1173
|
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
__webpack_unused_export__ = AssumeRole$;
|
|
957
|
-
__webpack_unused_export__ = AssumeRoleCommand;
|
|
958
|
-
__webpack_unused_export__ = AssumeRoleRequest$;
|
|
959
|
-
__webpack_unused_export__ = AssumeRoleResponse$;
|
|
960
|
-
__webpack_unused_export__ = AssumeRoleWithWebIdentity$;
|
|
961
|
-
__webpack_unused_export__ = AssumeRoleWithWebIdentityCommand;
|
|
962
|
-
__webpack_unused_export__ = AssumeRoleWithWebIdentityRequest$;
|
|
963
|
-
__webpack_unused_export__ = AssumeRoleWithWebIdentityResponse$;
|
|
964
|
-
__webpack_unused_export__ = AssumedRoleUser$;
|
|
965
|
-
__webpack_unused_export__ = Credentials$;
|
|
966
|
-
__webpack_unused_export__ = ExpiredTokenException;
|
|
967
|
-
__webpack_unused_export__ = ExpiredTokenException$;
|
|
968
|
-
__webpack_unused_export__ = IDPCommunicationErrorException;
|
|
969
|
-
__webpack_unused_export__ = IDPCommunicationErrorException$;
|
|
970
|
-
__webpack_unused_export__ = IDPRejectedClaimException;
|
|
971
|
-
__webpack_unused_export__ = IDPRejectedClaimException$;
|
|
972
|
-
__webpack_unused_export__ = InvalidIdentityTokenException;
|
|
973
|
-
__webpack_unused_export__ = InvalidIdentityTokenException$;
|
|
974
|
-
__webpack_unused_export__ = MalformedPolicyDocumentException;
|
|
975
|
-
__webpack_unused_export__ = MalformedPolicyDocumentException$;
|
|
976
|
-
__webpack_unused_export__ = PackedPolicyTooLargeException;
|
|
977
|
-
__webpack_unused_export__ = PackedPolicyTooLargeException$;
|
|
978
|
-
__webpack_unused_export__ = PolicyDescriptorType$;
|
|
979
|
-
__webpack_unused_export__ = ProvidedContext$;
|
|
980
|
-
__webpack_unused_export__ = RegionDisabledException;
|
|
981
|
-
__webpack_unused_export__ = RegionDisabledException$;
|
|
982
|
-
__webpack_unused_export__ = STS;
|
|
983
|
-
__webpack_unused_export__ = STSClient;
|
|
984
|
-
__webpack_unused_export__ = STSServiceException;
|
|
985
|
-
__webpack_unused_export__ = STSServiceException$;
|
|
986
|
-
__webpack_unused_export__ = Tag$;
|
|
987
|
-
__webpack_unused_export__ = decorateDefaultCredentialProvider;
|
|
988
|
-
__webpack_unused_export__ = errorTypeRegistries;
|
|
989
|
-
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
|
990
|
-
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
|
1174
|
+
/***/ 39955:
|
|
1175
|
+
/***/ ((module) => {
|
|
991
1176
|
|
|
1177
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.997.2","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=20.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.974.4","@aws-sdk/middleware-host-header":"^3.972.10","@aws-sdk/middleware-logger":"^3.972.10","@aws-sdk/middleware-recursion-detection":"^3.972.11","@aws-sdk/middleware-user-agent":"^3.972.34","@aws-sdk/region-config-resolver":"^3.972.13","@aws-sdk/signature-v4-multi-region":"^3.996.21","@aws-sdk/types":"^3.973.8","@aws-sdk/util-endpoints":"^3.996.8","@aws-sdk/util-user-agent-browser":"^3.972.10","@aws-sdk/util-user-agent-node":"^3.973.20","@smithy/config-resolver":"^4.4.17","@smithy/core":"^3.23.16","@smithy/fetch-http-handler":"^5.3.17","@smithy/hash-node":"^4.2.14","@smithy/invalid-dependency":"^4.2.14","@smithy/middleware-content-length":"^4.2.14","@smithy/middleware-endpoint":"^4.4.31","@smithy/middleware-retry":"^4.5.4","@smithy/middleware-serde":"^4.2.19","@smithy/middleware-stack":"^4.2.14","@smithy/node-config-provider":"^4.3.14","@smithy/node-http-handler":"^4.6.0","@smithy/protocol-http":"^5.3.14","@smithy/smithy-client":"^4.12.12","@smithy/types":"^4.14.1","@smithy/url-parser":"^4.2.14","@smithy/util-base64":"^4.3.2","@smithy/util-body-length-browser":"^4.2.2","@smithy/util-body-length-node":"^4.2.3","@smithy/util-defaults-mode-browser":"^4.3.48","@smithy/util-defaults-mode-node":"^4.2.53","@smithy/util-endpoints":"^3.4.2","@smithy/util-middleware":"^4.2.14","@smithy/util-retry":"^4.3.3","@smithy/util-utf8":"^4.2.2","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"typesVersions":{"<4.5":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./cognito-identity.d.ts","./cognito-identity.js","./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sso.d.ts","./sso.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/cognito-identity/runtimeConfig":"./dist-es/submodules/cognito-identity/runtimeConfig.browser","./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sso/runtimeConfig":"./dist-es/submodules/sso/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./package.json":"./package.json","./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"},"./signin":{"types":"./dist-types/submodules/signin/index.d.ts","module":"./dist-es/submodules/signin/index.js","node":"./dist-cjs/submodules/signin/index.js","import":"./dist-es/submodules/signin/index.js","require":"./dist-cjs/submodules/signin/index.js"},"./cognito-identity":{"types":"./dist-types/submodules/cognito-identity/index.d.ts","module":"./dist-es/submodules/cognito-identity/index.js","node":"./dist-cjs/submodules/cognito-identity/index.js","import":"./dist-es/submodules/cognito-identity/index.js","require":"./dist-cjs/submodules/cognito-identity/index.js"},"./sso":{"types":"./dist-types/submodules/sso/index.d.ts","module":"./dist-es/submodules/sso/index.js","node":"./dist-cjs/submodules/sso/index.js","import":"./dist-es/submodules/sso/index.js","require":"./dist-cjs/submodules/sso/index.js"}}}');
|
|
992
1178
|
|
|
993
1179
|
/***/ })
|
|
994
1180
|
|