@alienplatform/sdk 1.10.7 → 1.11.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/.turbo/turbo-build.log +37 -8
- package/dist/bearerTokenAuthenticationPolicy.js +3028 -0
- package/dist/bindings/index.d.ts +1 -0
- package/dist/bindings/index.d.ts.map +1 -1
- package/dist/bindings/postgres.d.ts +90 -0
- package/dist/bindings/postgres.d.ts.map +1 -0
- package/dist/bindings/postgres.test.d.ts +2 -0
- package/dist/bindings/postgres.test.d.ts.map +1 -0
- package/dist/client.js +2376 -0
- package/dist/commands/index.js +1 -1
- package/dist/dist-cjs.js +3 -0
- package/dist/dist-cjs2.js +718 -0
- package/dist/dist-cjs3.js +2486 -0
- package/dist/dist-cjs4.js +171 -0
- package/dist/dist-cjs5.js +429 -0
- package/dist/dist-cjs6.js +60 -0
- package/dist/dist-cjs7.js +978 -0
- package/dist/dist-cjs8.js +86 -0
- package/dist/dist-cjs9.js +319 -0
- package/dist/dist.js +498 -36
- package/dist/dist2.js +1239 -0
- package/dist/errors.d.ts +25 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/es5.js +1624 -0
- package/dist/esm.js +18211 -0
- package/dist/esm2.js +3104 -0
- package/dist/event-streams.js +203 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +336 -24996
- package/dist/jws.js +611 -0
- package/dist/open.js +460 -0
- package/dist/package.js +4 -0
- package/dist/protocols.js +954 -0
- package/dist/protocols2.js +5565 -0
- package/dist/rolldown-runtime.js +37 -0
- package/dist/serde.js +5542 -0
- package/dist/signin.js +723 -0
- package/dist/src.js +24900 -0
- package/dist/src2.js +114030 -0
- package/dist/sso-oidc.js +940 -0
- package/dist/sts.js +1329 -0
- package/dist/tslib.es6.js +543 -0
- package/package.json +26 -2
- package/src/bindings/index.ts +1 -0
- package/src/bindings/postgres.test.ts +17 -0
- package/src/bindings/postgres.ts +446 -0
- package/src/errors.ts +21 -0
- package/src/index.ts +5 -0
package/dist/sts.js
ADDED
|
@@ -0,0 +1,1329 @@
|
|
|
1
|
+
import { n as __esmMin, t as __commonJSMin } from "./rolldown-runtime.js";
|
|
2
|
+
import { A as getHttpSigningPlugin, B as resolveHostHeaderConfig, E as DefaultIdentityProviderConfig, G as NODE_RETRY_MODE_CONFIG_OPTIONS, H as init_retry, I as getLoggerPlugin, J as DEFAULT_RETRY_MODE, M as getHttpAuthSchemeEndpointRuleSetPlugin, P as getRecursionDetectionPlugin, Q as emitWarningIfUnsupportedVersion, R as getHostHeaderPlugin, V as getRetryPlugin, W as NODE_MAX_ATTEMPT_CONFIG_OPTIONS, Z as setCredentialFeature, _ as resolveUserAgentConfig, a as resolveAwsRegionExtensionConfiguration, c as awsEndpointFunctions, f as createDefaultUserAgentProvider, m as getUserAgentPlugin, n as init_client, q as resolveRetryConfig, r as getAwsRegionExtensionConfiguration, s as stsRegionDefaultResolver, u as NODE_APP_ID_CONFIG_OPTIONS, w as NoAuthSigner, y as init_dist_es } from "./client.js";
|
|
3
|
+
import { $ as calculateBodyLength, $t as TypeRegistry, Bt as emitWarningIfUnsupportedVersion$1, Dt as fromUtf8, E as BinaryDecisionDiagram, En as getSmithyContext, Et as toBase64, F as resolveRegionConfig, I as NODE_REGION_CONFIG_FILE_OPTIONS, K as loadConfig, L as NODE_REGION_CONFIG_OPTIONS, Lt as getDefaultExtensionConfiguration, Mt as init_client$1, N as resolveDefaultsModeConfig, Nt as NoOpLogger, U as NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, Ut as loadConfigsForDefaultMode, V as NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, Wt as ServiceException, Yt as Command, Zt as init_schema, _n as normalizeProvider, an as getSchemaSerdePlugin, b as customEndpointFunctions, c as Hash, d as getEndpointPlugin, f as init_endpoints, g as decideEndpoint, j as init_config$1, k as resolveParams, kt as fromBase64, ln as Client, p as resolveEndpointConfig, pn as parseUrl, qt as createAggregatedClient, r as init_serde, w as EndpointCache, wt as toUtf8, zt as resolveDefaultRuntimeConfig } from "./serde.js";
|
|
4
|
+
import { a as getHttpHandlerExtensionConfiguration, r as getContentLengthPlugin, s as resolveHttpHandlerRuntimeConfig, t as init_protocols } from "./protocols.js";
|
|
5
|
+
import { _ as AwsSdkSigV4ASigner, c as init_httpAuthSchemes, d as require_dist_cjs$1, f as NODE_SIGV4A_CONFIG_OPTIONS, h as NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, m as resolveAwsSdkSigV4AConfig, r as AwsQueryProtocol, t as init_protocols$1, u as resolveAwsSdkSigV4Config, y as AwsSdkSigV4Signer } from "./protocols2.js";
|
|
6
|
+
import { t as require_dist_cjs$2 } from "./dist-cjs2.js";
|
|
7
|
+
import { t as version } from "./package.js";
|
|
8
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+signature-v4-multi-region@3.996.34/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js
|
|
9
|
+
var require_dist_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10
|
+
var signatureV4 = require_dist_cjs$1();
|
|
11
|
+
const signatureV4CrtContainer = { CrtSignerV4: null };
|
|
12
|
+
const SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token";
|
|
13
|
+
const SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();
|
|
14
|
+
var SignatureV4SignWithCredentials = class extends signatureV4.SignatureV4 {
|
|
15
|
+
async signWithCredentials(requestToSign, credentials, options) {
|
|
16
|
+
const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
|
|
17
|
+
requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;
|
|
18
|
+
const privateAccess = this;
|
|
19
|
+
setSingleOverride(privateAccess, credentialsWithoutSessionToken);
|
|
20
|
+
return privateAccess.signRequest(requestToSign, options ?? {});
|
|
21
|
+
}
|
|
22
|
+
async presignWithCredentials(requestToSign, credentials, options) {
|
|
23
|
+
const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
|
|
24
|
+
delete requestToSign.headers[SESSION_TOKEN_HEADER];
|
|
25
|
+
requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
|
|
26
|
+
requestToSign.query = requestToSign.query ?? {};
|
|
27
|
+
requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
|
|
28
|
+
setSingleOverride(this, credentialsWithoutSessionToken);
|
|
29
|
+
return this.presign(requestToSign, options);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
function getCredentialsWithoutSessionToken(credentials) {
|
|
33
|
+
return {
|
|
34
|
+
accessKeyId: credentials.accessKeyId,
|
|
35
|
+
secretAccessKey: credentials.secretAccessKey,
|
|
36
|
+
expiration: credentials.expiration
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function setSingleOverride(privateAccess, credentialsWithoutSessionToken) {
|
|
40
|
+
const currentCredentialProvider = privateAccess.credentialProvider;
|
|
41
|
+
privateAccess.credentialProvider = () => {
|
|
42
|
+
privateAccess.credentialProvider = currentCredentialProvider;
|
|
43
|
+
return Promise.resolve(credentialsWithoutSessionToken);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
var SignatureV4MultiRegion = class {
|
|
47
|
+
sigv4aSigner;
|
|
48
|
+
sigv4Signer;
|
|
49
|
+
signerOptions;
|
|
50
|
+
static sigv4aDependency() {
|
|
51
|
+
if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") return "crt";
|
|
52
|
+
else if (typeof signatureV4.signatureV4aContainer.SignatureV4a === "function") return "js";
|
|
53
|
+
return "none";
|
|
54
|
+
}
|
|
55
|
+
constructor(options) {
|
|
56
|
+
this.sigv4Signer = new SignatureV4SignWithCredentials(options);
|
|
57
|
+
this.signerOptions = options;
|
|
58
|
+
}
|
|
59
|
+
async sign(requestToSign, options = {}) {
|
|
60
|
+
if (options.signingRegion === "*") return this.getSigv4aSigner().sign(requestToSign, options);
|
|
61
|
+
return this.sigv4Signer.sign(requestToSign, options);
|
|
62
|
+
}
|
|
63
|
+
async signWithCredentials(requestToSign, credentials, options = {}) {
|
|
64
|
+
if (options.signingRegion === "*") {
|
|
65
|
+
const signer = this.getSigv4aSigner();
|
|
66
|
+
const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
|
|
67
|
+
if (CrtSignerV4 && signer instanceof CrtSignerV4) return signer.signWithCredentials(requestToSign, credentials, options);
|
|
68
|
+
else throw new Error("signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the \"@aws-sdk/signature-v4-crt\" package explicitly. You must also register the package by calling [require(\"@aws-sdk/signature-v4-crt\");] or an ESM equivalent such as [import \"@aws-sdk/signature-v4-crt\";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
|
|
69
|
+
}
|
|
70
|
+
return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);
|
|
71
|
+
}
|
|
72
|
+
async presign(originalRequest, options = {}) {
|
|
73
|
+
if (options.signingRegion === "*") {
|
|
74
|
+
const signer = this.getSigv4aSigner();
|
|
75
|
+
const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
|
|
76
|
+
if (CrtSignerV4 && signer instanceof CrtSignerV4) return signer.presign(originalRequest, options);
|
|
77
|
+
else throw new Error("presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the \"@aws-sdk/signature-v4-crt\" package explicitly. You must also register the package by calling [require(\"@aws-sdk/signature-v4-crt\");] or an ESM equivalent such as [import \"@aws-sdk/signature-v4-crt\";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
|
|
78
|
+
}
|
|
79
|
+
return this.sigv4Signer.presign(originalRequest, options);
|
|
80
|
+
}
|
|
81
|
+
async presignWithCredentials(originalRequest, credentials, options = {}) {
|
|
82
|
+
if (options.signingRegion === "*") throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");
|
|
83
|
+
return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);
|
|
84
|
+
}
|
|
85
|
+
getSigv4aSigner() {
|
|
86
|
+
if (!this.sigv4aSigner) {
|
|
87
|
+
const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
|
|
88
|
+
const JsSigV4aSigner = signatureV4.signatureV4aContainer.SignatureV4a;
|
|
89
|
+
if (this.signerOptions.runtime === "node") {
|
|
90
|
+
if (!CrtSignerV4 && !JsSigV4aSigner) throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
|
|
91
|
+
if (CrtSignerV4 && typeof CrtSignerV4 === "function") this.sigv4aSigner = new CrtSignerV4({
|
|
92
|
+
...this.signerOptions,
|
|
93
|
+
signingAlgorithm: 1
|
|
94
|
+
});
|
|
95
|
+
else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") this.sigv4aSigner = new JsSigV4aSigner({ ...this.signerOptions });
|
|
96
|
+
else throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
|
|
97
|
+
} else {
|
|
98
|
+
if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");
|
|
99
|
+
this.sigv4aSigner = new JsSigV4aSigner({ ...this.signerOptions });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return this.sigv4aSigner;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
exports.SignatureV4MultiRegion = SignatureV4MultiRegion;
|
|
106
|
+
}));
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js
|
|
109
|
+
var q, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, _data, root, nodes, bdd;
|
|
110
|
+
var init_bdd = __esmMin((() => {
|
|
111
|
+
init_endpoints();
|
|
112
|
+
q = "ref";
|
|
113
|
+
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];
|
|
114
|
+
_data = {
|
|
115
|
+
conditions: [
|
|
116
|
+
[c, [l]],
|
|
117
|
+
[c, p],
|
|
118
|
+
[
|
|
119
|
+
"aws.partition",
|
|
120
|
+
p,
|
|
121
|
+
d
|
|
122
|
+
],
|
|
123
|
+
[e, [{ [q]: "UseFIPS" }, b]],
|
|
124
|
+
[e, [{ [q]: "UseDualStack" }, b]],
|
|
125
|
+
[f, [m, "aws-global"]],
|
|
126
|
+
[e, [{ [q]: "UseGlobalEndpoint" }, b]],
|
|
127
|
+
[f, [m, "eu-central-1"]],
|
|
128
|
+
[e, [{
|
|
129
|
+
fn: g,
|
|
130
|
+
argv: [n, "supportsDualStack"]
|
|
131
|
+
}, b]],
|
|
132
|
+
[e, [{
|
|
133
|
+
fn: g,
|
|
134
|
+
argv: [n, "supportsFIPS"]
|
|
135
|
+
}, b]],
|
|
136
|
+
[f, [m, "ap-south-1"]],
|
|
137
|
+
[f, [m, "eu-north-1"]],
|
|
138
|
+
[f, [m, "eu-west-1"]],
|
|
139
|
+
[f, [m, "eu-west-2"]],
|
|
140
|
+
[f, [m, "eu-west-3"]],
|
|
141
|
+
[f, [m, "sa-east-1"]],
|
|
142
|
+
[f, [m, h]],
|
|
143
|
+
[f, [m, "us-east-2"]],
|
|
144
|
+
[f, [m, "us-west-2"]],
|
|
145
|
+
[f, [m, "us-west-1"]],
|
|
146
|
+
[f, [m, "ca-central-1"]],
|
|
147
|
+
[f, [m, "ap-southeast-1"]],
|
|
148
|
+
[f, [m, "ap-northeast-1"]],
|
|
149
|
+
[f, [m, "ap-southeast-2"]],
|
|
150
|
+
[f, [{
|
|
151
|
+
fn: g,
|
|
152
|
+
argv: [n, "name"]
|
|
153
|
+
}, "aws-us-gov"]]
|
|
154
|
+
],
|
|
155
|
+
results: [
|
|
156
|
+
[a],
|
|
157
|
+
["https://sts.amazonaws.com", { authSchemes: [{
|
|
158
|
+
name: i,
|
|
159
|
+
signingName: j,
|
|
160
|
+
signingRegion: h
|
|
161
|
+
}] }],
|
|
162
|
+
[k, { authSchemes: [{
|
|
163
|
+
name: i,
|
|
164
|
+
signingName: j,
|
|
165
|
+
signingRegion: "{Region}"
|
|
166
|
+
}] }],
|
|
167
|
+
[a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
168
|
+
[a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
|
|
169
|
+
[l, o],
|
|
170
|
+
["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", o],
|
|
171
|
+
[a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
|
|
172
|
+
["https://sts.{Region}.amazonaws.com", o],
|
|
173
|
+
["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", o],
|
|
174
|
+
[a, "FIPS is enabled but this partition does not support FIPS"],
|
|
175
|
+
["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", o],
|
|
176
|
+
[a, "DualStack is enabled but this partition does not support DualStack"],
|
|
177
|
+
[k, o],
|
|
178
|
+
[a, "Invalid Configuration: Missing Region"]
|
|
179
|
+
]
|
|
180
|
+
};
|
|
181
|
+
root = 2;
|
|
182
|
+
nodes = new Int32Array([
|
|
183
|
+
-1,
|
|
184
|
+
1,
|
|
185
|
+
-1,
|
|
186
|
+
0,
|
|
187
|
+
30,
|
|
188
|
+
3,
|
|
189
|
+
1,
|
|
190
|
+
4,
|
|
191
|
+
100000014,
|
|
192
|
+
2,
|
|
193
|
+
5,
|
|
194
|
+
100000014,
|
|
195
|
+
3,
|
|
196
|
+
25,
|
|
197
|
+
6,
|
|
198
|
+
4,
|
|
199
|
+
24,
|
|
200
|
+
7,
|
|
201
|
+
5,
|
|
202
|
+
100000001,
|
|
203
|
+
8,
|
|
204
|
+
6,
|
|
205
|
+
9,
|
|
206
|
+
100000013,
|
|
207
|
+
7,
|
|
208
|
+
100000001,
|
|
209
|
+
10,
|
|
210
|
+
10,
|
|
211
|
+
100000001,
|
|
212
|
+
11,
|
|
213
|
+
11,
|
|
214
|
+
100000001,
|
|
215
|
+
12,
|
|
216
|
+
12,
|
|
217
|
+
100000001,
|
|
218
|
+
13,
|
|
219
|
+
13,
|
|
220
|
+
100000001,
|
|
221
|
+
14,
|
|
222
|
+
14,
|
|
223
|
+
100000001,
|
|
224
|
+
15,
|
|
225
|
+
15,
|
|
226
|
+
100000001,
|
|
227
|
+
16,
|
|
228
|
+
16,
|
|
229
|
+
100000001,
|
|
230
|
+
17,
|
|
231
|
+
17,
|
|
232
|
+
100000001,
|
|
233
|
+
18,
|
|
234
|
+
18,
|
|
235
|
+
100000001,
|
|
236
|
+
19,
|
|
237
|
+
19,
|
|
238
|
+
100000001,
|
|
239
|
+
20,
|
|
240
|
+
20,
|
|
241
|
+
100000001,
|
|
242
|
+
21,
|
|
243
|
+
21,
|
|
244
|
+
100000001,
|
|
245
|
+
22,
|
|
246
|
+
22,
|
|
247
|
+
100000001,
|
|
248
|
+
23,
|
|
249
|
+
23,
|
|
250
|
+
100000001,
|
|
251
|
+
100000002,
|
|
252
|
+
8,
|
|
253
|
+
100000011,
|
|
254
|
+
100000012,
|
|
255
|
+
4,
|
|
256
|
+
28,
|
|
257
|
+
26,
|
|
258
|
+
9,
|
|
259
|
+
27,
|
|
260
|
+
100000010,
|
|
261
|
+
24,
|
|
262
|
+
100000008,
|
|
263
|
+
100000009,
|
|
264
|
+
8,
|
|
265
|
+
29,
|
|
266
|
+
100000007,
|
|
267
|
+
9,
|
|
268
|
+
100000006,
|
|
269
|
+
100000007,
|
|
270
|
+
3,
|
|
271
|
+
100000003,
|
|
272
|
+
31,
|
|
273
|
+
4,
|
|
274
|
+
100000004,
|
|
275
|
+
100000005
|
|
276
|
+
]);
|
|
277
|
+
bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
278
|
+
}));
|
|
279
|
+
//#endregion
|
|
280
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js
|
|
281
|
+
var cache, defaultEndpointResolver;
|
|
282
|
+
var init_endpointResolver = __esmMin((() => {
|
|
283
|
+
init_client();
|
|
284
|
+
init_endpoints();
|
|
285
|
+
init_bdd();
|
|
286
|
+
cache = new EndpointCache({
|
|
287
|
+
size: 50,
|
|
288
|
+
params: [
|
|
289
|
+
"Endpoint",
|
|
290
|
+
"Region",
|
|
291
|
+
"UseDualStack",
|
|
292
|
+
"UseFIPS",
|
|
293
|
+
"UseGlobalEndpoint"
|
|
294
|
+
]
|
|
295
|
+
});
|
|
296
|
+
defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
297
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
298
|
+
endpointParams,
|
|
299
|
+
logger: context.logger
|
|
300
|
+
}));
|
|
301
|
+
};
|
|
302
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
303
|
+
}));
|
|
304
|
+
//#endregion
|
|
305
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js
|
|
306
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
307
|
+
return {
|
|
308
|
+
schemeId: "aws.auth#sigv4",
|
|
309
|
+
signingProperties: {
|
|
310
|
+
name: "sts",
|
|
311
|
+
region: authParameters.region
|
|
312
|
+
},
|
|
313
|
+
propertiesExtractor: (config, context) => ({ signingProperties: {
|
|
314
|
+
config,
|
|
315
|
+
context
|
|
316
|
+
} })
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
function createAwsAuthSigv4aHttpAuthOption(authParameters) {
|
|
320
|
+
return {
|
|
321
|
+
schemeId: "aws.auth#sigv4a",
|
|
322
|
+
signingProperties: {
|
|
323
|
+
name: "sts",
|
|
324
|
+
region: authParameters.region
|
|
325
|
+
},
|
|
326
|
+
propertiesExtractor: (config, context) => ({ signingProperties: {
|
|
327
|
+
config,
|
|
328
|
+
context
|
|
329
|
+
} })
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
|
333
|
+
return { schemeId: "smithy.api#noAuth" };
|
|
334
|
+
}
|
|
335
|
+
var import_dist_cjs$2, createEndpointRuleSetHttpAuthSchemeParametersProvider, _defaultSTSHttpAuthSchemeParametersProvider, defaultSTSHttpAuthSchemeParametersProvider, createEndpointRuleSetHttpAuthSchemeProvider, _defaultSTSHttpAuthSchemeProvider, defaultSTSHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig;
|
|
336
|
+
var init_httpAuthSchemeProvider = __esmMin((() => {
|
|
337
|
+
init_httpAuthSchemes();
|
|
338
|
+
import_dist_cjs$2 = require_dist_cjs();
|
|
339
|
+
init_client$1();
|
|
340
|
+
init_endpoints();
|
|
341
|
+
init_endpointResolver();
|
|
342
|
+
createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
|
|
343
|
+
if (!input) throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
|
|
344
|
+
const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
|
|
345
|
+
const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor?.getEndpointParameterInstructions;
|
|
346
|
+
if (!instructionsFn) throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
|
|
347
|
+
const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
|
|
348
|
+
return Object.assign(defaultParameters, endpointParameters);
|
|
349
|
+
};
|
|
350
|
+
_defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
351
|
+
return {
|
|
352
|
+
operation: getSmithyContext(context).operation,
|
|
353
|
+
region: await normalizeProvider(config.region)() || (() => {
|
|
354
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
355
|
+
})()
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
defaultSTSHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultSTSHttpAuthSchemeParametersProvider);
|
|
359
|
+
createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
|
|
360
|
+
const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
|
|
361
|
+
const authSchemes = defaultEndpointResolver(authParameters).properties?.authSchemes;
|
|
362
|
+
if (!authSchemes) return defaultHttpAuthSchemeResolver(authParameters);
|
|
363
|
+
const options = [];
|
|
364
|
+
for (const scheme of authSchemes) {
|
|
365
|
+
const { name: resolvedName, properties = {}, ...rest } = scheme;
|
|
366
|
+
const name = resolvedName.toLowerCase();
|
|
367
|
+
if (resolvedName !== name) console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
|
|
368
|
+
let schemeId;
|
|
369
|
+
if (name === "sigv4a") {
|
|
370
|
+
schemeId = "aws.auth#sigv4a";
|
|
371
|
+
const sigv4Present = authSchemes.find((s) => {
|
|
372
|
+
const name = s.name.toLowerCase();
|
|
373
|
+
return name !== "sigv4a" && name.startsWith("sigv4");
|
|
374
|
+
});
|
|
375
|
+
if (import_dist_cjs$2.SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) continue;
|
|
376
|
+
} else if (name.startsWith("sigv4")) schemeId = "aws.auth#sigv4";
|
|
377
|
+
else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);
|
|
378
|
+
const createOption = createHttpAuthOptionFunctions[schemeId];
|
|
379
|
+
if (!createOption) throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
|
|
380
|
+
const option = createOption(authParameters);
|
|
381
|
+
option.schemeId = schemeId;
|
|
382
|
+
option.signingProperties = {
|
|
383
|
+
...option.signingProperties || {},
|
|
384
|
+
...rest,
|
|
385
|
+
...properties
|
|
386
|
+
};
|
|
387
|
+
options.push(option);
|
|
388
|
+
}
|
|
389
|
+
return options;
|
|
390
|
+
};
|
|
391
|
+
return endpointRuleSetHttpAuthSchemeProvider;
|
|
392
|
+
};
|
|
393
|
+
_defaultSTSHttpAuthSchemeProvider = (authParameters) => {
|
|
394
|
+
const options = [];
|
|
395
|
+
switch (authParameters.operation) {
|
|
396
|
+
case "AssumeRoleWithWebIdentity":
|
|
397
|
+
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
|
398
|
+
options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
|
|
399
|
+
break;
|
|
400
|
+
default:
|
|
401
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
402
|
+
options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
|
|
403
|
+
}
|
|
404
|
+
return options;
|
|
405
|
+
};
|
|
406
|
+
defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSTSHttpAuthSchemeProvider, {
|
|
407
|
+
"aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
|
|
408
|
+
"aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
|
|
409
|
+
"smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption
|
|
410
|
+
});
|
|
411
|
+
resolveHttpAuthSchemeConfig = (config) => {
|
|
412
|
+
const config_1 = resolveAwsSdkSigV4AConfig(resolveAwsSdkSigV4Config(config));
|
|
413
|
+
return Object.assign(config_1, { authSchemePreference: normalizeProvider(config.authSchemePreference ?? []) });
|
|
414
|
+
};
|
|
415
|
+
}));
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/EndpointParameters.js
|
|
418
|
+
var resolveClientEndpointParameters, commonParams;
|
|
419
|
+
var init_EndpointParameters = __esmMin((() => {
|
|
420
|
+
resolveClientEndpointParameters = (options) => {
|
|
421
|
+
return Object.assign(options, {
|
|
422
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
423
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
424
|
+
useGlobalEndpoint: options.useGlobalEndpoint ?? false,
|
|
425
|
+
defaultSigningName: "sts"
|
|
426
|
+
});
|
|
427
|
+
};
|
|
428
|
+
commonParams = {
|
|
429
|
+
UseGlobalEndpoint: {
|
|
430
|
+
type: "builtInParams",
|
|
431
|
+
name: "useGlobalEndpoint"
|
|
432
|
+
},
|
|
433
|
+
UseFIPS: {
|
|
434
|
+
type: "builtInParams",
|
|
435
|
+
name: "useFipsEndpoint"
|
|
436
|
+
},
|
|
437
|
+
Endpoint: {
|
|
438
|
+
type: "builtInParams",
|
|
439
|
+
name: "endpoint"
|
|
440
|
+
},
|
|
441
|
+
Region: {
|
|
442
|
+
type: "builtInParams",
|
|
443
|
+
name: "region"
|
|
444
|
+
},
|
|
445
|
+
UseDualStack: {
|
|
446
|
+
type: "builtInParams",
|
|
447
|
+
name: "useDualstackEndpoint"
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
}));
|
|
451
|
+
//#endregion
|
|
452
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js
|
|
453
|
+
var STSServiceException;
|
|
454
|
+
var init_STSServiceException = __esmMin((() => {
|
|
455
|
+
init_client$1();
|
|
456
|
+
STSServiceException = class STSServiceException extends ServiceException {
|
|
457
|
+
constructor(options) {
|
|
458
|
+
super(options);
|
|
459
|
+
Object.setPrototypeOf(this, STSServiceException.prototype);
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
}));
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js
|
|
465
|
+
var ExpiredTokenException, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, IDPRejectedClaimException, InvalidIdentityTokenException, IDPCommunicationErrorException;
|
|
466
|
+
var init_errors = __esmMin((() => {
|
|
467
|
+
init_STSServiceException();
|
|
468
|
+
ExpiredTokenException = class ExpiredTokenException extends STSServiceException {
|
|
469
|
+
name = "ExpiredTokenException";
|
|
470
|
+
$fault = "client";
|
|
471
|
+
constructor(opts) {
|
|
472
|
+
super({
|
|
473
|
+
name: "ExpiredTokenException",
|
|
474
|
+
$fault: "client",
|
|
475
|
+
...opts
|
|
476
|
+
});
|
|
477
|
+
Object.setPrototypeOf(this, ExpiredTokenException.prototype);
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
MalformedPolicyDocumentException = class MalformedPolicyDocumentException extends STSServiceException {
|
|
481
|
+
name = "MalformedPolicyDocumentException";
|
|
482
|
+
$fault = "client";
|
|
483
|
+
constructor(opts) {
|
|
484
|
+
super({
|
|
485
|
+
name: "MalformedPolicyDocumentException",
|
|
486
|
+
$fault: "client",
|
|
487
|
+
...opts
|
|
488
|
+
});
|
|
489
|
+
Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
PackedPolicyTooLargeException = class PackedPolicyTooLargeException extends STSServiceException {
|
|
493
|
+
name = "PackedPolicyTooLargeException";
|
|
494
|
+
$fault = "client";
|
|
495
|
+
constructor(opts) {
|
|
496
|
+
super({
|
|
497
|
+
name: "PackedPolicyTooLargeException",
|
|
498
|
+
$fault: "client",
|
|
499
|
+
...opts
|
|
500
|
+
});
|
|
501
|
+
Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
RegionDisabledException = class RegionDisabledException extends STSServiceException {
|
|
505
|
+
name = "RegionDisabledException";
|
|
506
|
+
$fault = "client";
|
|
507
|
+
constructor(opts) {
|
|
508
|
+
super({
|
|
509
|
+
name: "RegionDisabledException",
|
|
510
|
+
$fault: "client",
|
|
511
|
+
...opts
|
|
512
|
+
});
|
|
513
|
+
Object.setPrototypeOf(this, RegionDisabledException.prototype);
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
IDPRejectedClaimException = class IDPRejectedClaimException extends STSServiceException {
|
|
517
|
+
name = "IDPRejectedClaimException";
|
|
518
|
+
$fault = "client";
|
|
519
|
+
constructor(opts) {
|
|
520
|
+
super({
|
|
521
|
+
name: "IDPRejectedClaimException",
|
|
522
|
+
$fault: "client",
|
|
523
|
+
...opts
|
|
524
|
+
});
|
|
525
|
+
Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
InvalidIdentityTokenException = class InvalidIdentityTokenException extends STSServiceException {
|
|
529
|
+
name = "InvalidIdentityTokenException";
|
|
530
|
+
$fault = "client";
|
|
531
|
+
constructor(opts) {
|
|
532
|
+
super({
|
|
533
|
+
name: "InvalidIdentityTokenException",
|
|
534
|
+
$fault: "client",
|
|
535
|
+
...opts
|
|
536
|
+
});
|
|
537
|
+
Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
IDPCommunicationErrorException = class IDPCommunicationErrorException extends STSServiceException {
|
|
541
|
+
name = "IDPCommunicationErrorException";
|
|
542
|
+
$fault = "client";
|
|
543
|
+
$retryable = {};
|
|
544
|
+
constructor(opts) {
|
|
545
|
+
super({
|
|
546
|
+
name: "IDPCommunicationErrorException",
|
|
547
|
+
$fault: "client",
|
|
548
|
+
...opts
|
|
549
|
+
});
|
|
550
|
+
Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
}));
|
|
554
|
+
//#endregion
|
|
555
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js
|
|
556
|
+
var _A, _AKI, _AR, _ARI, _ARR, _ARRs, _ARU, _ARWWI, _ARWWIR, _ARWWIRs, _Au, _C, _CA, _DS, _E, _EI, _ETE, _IDPCEE, _IDPRCE, _IITE, _K, _MPDE, _P, _PA, _PAr, _PC, _PCLT, _PCr, _PDT, _PI, _PPS, _PPTLE, _Pr, _RA, _RDE, _RSN, _SAK, _SFWIT, _SI, _SN, _ST, _T, _TC, _TTK, _Ta, _V, _WIT, _a, _aKST, _aQE, _c, _cTT, _e, _hE, _m, _pDLT, _s, _tLT, n0, _s_registry, STSServiceException$, n0_registry, ExpiredTokenException$, IDPCommunicationErrorException$, IDPRejectedClaimException$, InvalidIdentityTokenException$, MalformedPolicyDocumentException$, PackedPolicyTooLargeException$, RegionDisabledException$, errorTypeRegistries, accessKeySecretType, clientTokenType, AssumedRoleUser$, AssumeRoleRequest$, AssumeRoleResponse$, AssumeRoleWithWebIdentityRequest$, AssumeRoleWithWebIdentityResponse$, Credentials$, PolicyDescriptorType$, ProvidedContext$, Tag$, policyDescriptorListType, ProvidedContextsListType, tagListType, AssumeRole$, AssumeRoleWithWebIdentity$;
|
|
557
|
+
var init_schemas_0 = __esmMin((() => {
|
|
558
|
+
init_schema();
|
|
559
|
+
init_errors();
|
|
560
|
+
init_STSServiceException();
|
|
561
|
+
_A = "Arn";
|
|
562
|
+
_AKI = "AccessKeyId";
|
|
563
|
+
_AR = "AssumeRole";
|
|
564
|
+
_ARI = "AssumedRoleId";
|
|
565
|
+
_ARR = "AssumeRoleRequest";
|
|
566
|
+
_ARRs = "AssumeRoleResponse";
|
|
567
|
+
_ARU = "AssumedRoleUser";
|
|
568
|
+
_ARWWI = "AssumeRoleWithWebIdentity";
|
|
569
|
+
_ARWWIR = "AssumeRoleWithWebIdentityRequest";
|
|
570
|
+
_ARWWIRs = "AssumeRoleWithWebIdentityResponse";
|
|
571
|
+
_Au = "Audience";
|
|
572
|
+
_C = "Credentials";
|
|
573
|
+
_CA = "ContextAssertion";
|
|
574
|
+
_DS = "DurationSeconds";
|
|
575
|
+
_E = "Expiration";
|
|
576
|
+
_EI = "ExternalId";
|
|
577
|
+
_ETE = "ExpiredTokenException";
|
|
578
|
+
_IDPCEE = "IDPCommunicationErrorException";
|
|
579
|
+
_IDPRCE = "IDPRejectedClaimException";
|
|
580
|
+
_IITE = "InvalidIdentityTokenException";
|
|
581
|
+
_K = "Key";
|
|
582
|
+
_MPDE = "MalformedPolicyDocumentException";
|
|
583
|
+
_P = "Policy";
|
|
584
|
+
_PA = "PolicyArns";
|
|
585
|
+
_PAr = "ProviderArn";
|
|
586
|
+
_PC = "ProvidedContexts";
|
|
587
|
+
_PCLT = "ProvidedContextsListType";
|
|
588
|
+
_PCr = "ProvidedContext";
|
|
589
|
+
_PDT = "PolicyDescriptorType";
|
|
590
|
+
_PI = "ProviderId";
|
|
591
|
+
_PPS = "PackedPolicySize";
|
|
592
|
+
_PPTLE = "PackedPolicyTooLargeException";
|
|
593
|
+
_Pr = "Provider";
|
|
594
|
+
_RA = "RoleArn";
|
|
595
|
+
_RDE = "RegionDisabledException";
|
|
596
|
+
_RSN = "RoleSessionName";
|
|
597
|
+
_SAK = "SecretAccessKey";
|
|
598
|
+
_SFWIT = "SubjectFromWebIdentityToken";
|
|
599
|
+
_SI = "SourceIdentity";
|
|
600
|
+
_SN = "SerialNumber";
|
|
601
|
+
_ST = "SessionToken";
|
|
602
|
+
_T = "Tags";
|
|
603
|
+
_TC = "TokenCode";
|
|
604
|
+
_TTK = "TransitiveTagKeys";
|
|
605
|
+
_Ta = "Tag";
|
|
606
|
+
_V = "Value";
|
|
607
|
+
_WIT = "WebIdentityToken";
|
|
608
|
+
_a = "arn";
|
|
609
|
+
_aKST = "accessKeySecretType";
|
|
610
|
+
_aQE = "awsQueryError";
|
|
611
|
+
_c = "client";
|
|
612
|
+
_cTT = "clientTokenType";
|
|
613
|
+
_e = "error";
|
|
614
|
+
_hE = "httpError";
|
|
615
|
+
_m = "message";
|
|
616
|
+
_pDLT = "policyDescriptorListType";
|
|
617
|
+
_s = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
|
|
618
|
+
_tLT = "tagListType";
|
|
619
|
+
n0 = "com.amazonaws.sts";
|
|
620
|
+
_s_registry = TypeRegistry.for(_s);
|
|
621
|
+
STSServiceException$ = [
|
|
622
|
+
-3,
|
|
623
|
+
_s,
|
|
624
|
+
"STSServiceException",
|
|
625
|
+
0,
|
|
626
|
+
[],
|
|
627
|
+
[]
|
|
628
|
+
];
|
|
629
|
+
_s_registry.registerError(STSServiceException$, STSServiceException);
|
|
630
|
+
n0_registry = TypeRegistry.for(n0);
|
|
631
|
+
ExpiredTokenException$ = [
|
|
632
|
+
-3,
|
|
633
|
+
n0,
|
|
634
|
+
_ETE,
|
|
635
|
+
{
|
|
636
|
+
[_aQE]: [`ExpiredTokenException`, 400],
|
|
637
|
+
[_e]: _c,
|
|
638
|
+
[_hE]: 400
|
|
639
|
+
},
|
|
640
|
+
[_m],
|
|
641
|
+
[0]
|
|
642
|
+
];
|
|
643
|
+
n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);
|
|
644
|
+
IDPCommunicationErrorException$ = [
|
|
645
|
+
-3,
|
|
646
|
+
n0,
|
|
647
|
+
_IDPCEE,
|
|
648
|
+
{
|
|
649
|
+
[_aQE]: [`IDPCommunicationError`, 400],
|
|
650
|
+
[_e]: _c,
|
|
651
|
+
[_hE]: 400
|
|
652
|
+
},
|
|
653
|
+
[_m],
|
|
654
|
+
[0]
|
|
655
|
+
];
|
|
656
|
+
n0_registry.registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
|
|
657
|
+
IDPRejectedClaimException$ = [
|
|
658
|
+
-3,
|
|
659
|
+
n0,
|
|
660
|
+
_IDPRCE,
|
|
661
|
+
{
|
|
662
|
+
[_aQE]: [`IDPRejectedClaim`, 403],
|
|
663
|
+
[_e]: _c,
|
|
664
|
+
[_hE]: 403
|
|
665
|
+
},
|
|
666
|
+
[_m],
|
|
667
|
+
[0]
|
|
668
|
+
];
|
|
669
|
+
n0_registry.registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
|
|
670
|
+
InvalidIdentityTokenException$ = [
|
|
671
|
+
-3,
|
|
672
|
+
n0,
|
|
673
|
+
_IITE,
|
|
674
|
+
{
|
|
675
|
+
[_aQE]: [`InvalidIdentityToken`, 400],
|
|
676
|
+
[_e]: _c,
|
|
677
|
+
[_hE]: 400
|
|
678
|
+
},
|
|
679
|
+
[_m],
|
|
680
|
+
[0]
|
|
681
|
+
];
|
|
682
|
+
n0_registry.registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
|
|
683
|
+
MalformedPolicyDocumentException$ = [
|
|
684
|
+
-3,
|
|
685
|
+
n0,
|
|
686
|
+
_MPDE,
|
|
687
|
+
{
|
|
688
|
+
[_aQE]: [`MalformedPolicyDocument`, 400],
|
|
689
|
+
[_e]: _c,
|
|
690
|
+
[_hE]: 400
|
|
691
|
+
},
|
|
692
|
+
[_m],
|
|
693
|
+
[0]
|
|
694
|
+
];
|
|
695
|
+
n0_registry.registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
|
|
696
|
+
PackedPolicyTooLargeException$ = [
|
|
697
|
+
-3,
|
|
698
|
+
n0,
|
|
699
|
+
_PPTLE,
|
|
700
|
+
{
|
|
701
|
+
[_aQE]: [`PackedPolicyTooLarge`, 400],
|
|
702
|
+
[_e]: _c,
|
|
703
|
+
[_hE]: 400
|
|
704
|
+
},
|
|
705
|
+
[_m],
|
|
706
|
+
[0]
|
|
707
|
+
];
|
|
708
|
+
n0_registry.registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
|
|
709
|
+
RegionDisabledException$ = [
|
|
710
|
+
-3,
|
|
711
|
+
n0,
|
|
712
|
+
_RDE,
|
|
713
|
+
{
|
|
714
|
+
[_aQE]: [`RegionDisabledException`, 403],
|
|
715
|
+
[_e]: _c,
|
|
716
|
+
[_hE]: 403
|
|
717
|
+
},
|
|
718
|
+
[_m],
|
|
719
|
+
[0]
|
|
720
|
+
];
|
|
721
|
+
n0_registry.registerError(RegionDisabledException$, RegionDisabledException);
|
|
722
|
+
errorTypeRegistries = [_s_registry, n0_registry];
|
|
723
|
+
accessKeySecretType = [
|
|
724
|
+
0,
|
|
725
|
+
n0,
|
|
726
|
+
_aKST,
|
|
727
|
+
8,
|
|
728
|
+
0
|
|
729
|
+
];
|
|
730
|
+
clientTokenType = [
|
|
731
|
+
0,
|
|
732
|
+
n0,
|
|
733
|
+
_cTT,
|
|
734
|
+
8,
|
|
735
|
+
0
|
|
736
|
+
];
|
|
737
|
+
AssumedRoleUser$ = [
|
|
738
|
+
3,
|
|
739
|
+
n0,
|
|
740
|
+
_ARU,
|
|
741
|
+
0,
|
|
742
|
+
[_ARI, _A],
|
|
743
|
+
[0, 0],
|
|
744
|
+
2
|
|
745
|
+
];
|
|
746
|
+
AssumeRoleRequest$ = [
|
|
747
|
+
3,
|
|
748
|
+
n0,
|
|
749
|
+
_ARR,
|
|
750
|
+
0,
|
|
751
|
+
[
|
|
752
|
+
_RA,
|
|
753
|
+
_RSN,
|
|
754
|
+
_PA,
|
|
755
|
+
_P,
|
|
756
|
+
_DS,
|
|
757
|
+
_T,
|
|
758
|
+
_TTK,
|
|
759
|
+
_EI,
|
|
760
|
+
_SN,
|
|
761
|
+
_TC,
|
|
762
|
+
_SI,
|
|
763
|
+
_PC
|
|
764
|
+
],
|
|
765
|
+
[
|
|
766
|
+
0,
|
|
767
|
+
0,
|
|
768
|
+
() => policyDescriptorListType,
|
|
769
|
+
0,
|
|
770
|
+
1,
|
|
771
|
+
() => tagListType,
|
|
772
|
+
64,
|
|
773
|
+
0,
|
|
774
|
+
0,
|
|
775
|
+
0,
|
|
776
|
+
0,
|
|
777
|
+
() => ProvidedContextsListType
|
|
778
|
+
],
|
|
779
|
+
2
|
|
780
|
+
];
|
|
781
|
+
AssumeRoleResponse$ = [
|
|
782
|
+
3,
|
|
783
|
+
n0,
|
|
784
|
+
_ARRs,
|
|
785
|
+
0,
|
|
786
|
+
[
|
|
787
|
+
_C,
|
|
788
|
+
_ARU,
|
|
789
|
+
_PPS,
|
|
790
|
+
_SI
|
|
791
|
+
],
|
|
792
|
+
[
|
|
793
|
+
[() => Credentials$, 0],
|
|
794
|
+
() => AssumedRoleUser$,
|
|
795
|
+
1,
|
|
796
|
+
0
|
|
797
|
+
]
|
|
798
|
+
];
|
|
799
|
+
AssumeRoleWithWebIdentityRequest$ = [
|
|
800
|
+
3,
|
|
801
|
+
n0,
|
|
802
|
+
_ARWWIR,
|
|
803
|
+
0,
|
|
804
|
+
[
|
|
805
|
+
_RA,
|
|
806
|
+
_RSN,
|
|
807
|
+
_WIT,
|
|
808
|
+
_PI,
|
|
809
|
+
_PA,
|
|
810
|
+
_P,
|
|
811
|
+
_DS
|
|
812
|
+
],
|
|
813
|
+
[
|
|
814
|
+
0,
|
|
815
|
+
0,
|
|
816
|
+
[() => clientTokenType, 0],
|
|
817
|
+
0,
|
|
818
|
+
() => policyDescriptorListType,
|
|
819
|
+
0,
|
|
820
|
+
1
|
|
821
|
+
],
|
|
822
|
+
3
|
|
823
|
+
];
|
|
824
|
+
AssumeRoleWithWebIdentityResponse$ = [
|
|
825
|
+
3,
|
|
826
|
+
n0,
|
|
827
|
+
_ARWWIRs,
|
|
828
|
+
0,
|
|
829
|
+
[
|
|
830
|
+
_C,
|
|
831
|
+
_SFWIT,
|
|
832
|
+
_ARU,
|
|
833
|
+
_PPS,
|
|
834
|
+
_Pr,
|
|
835
|
+
_Au,
|
|
836
|
+
_SI
|
|
837
|
+
],
|
|
838
|
+
[
|
|
839
|
+
[() => Credentials$, 0],
|
|
840
|
+
0,
|
|
841
|
+
() => AssumedRoleUser$,
|
|
842
|
+
1,
|
|
843
|
+
0,
|
|
844
|
+
0,
|
|
845
|
+
0
|
|
846
|
+
]
|
|
847
|
+
];
|
|
848
|
+
Credentials$ = [
|
|
849
|
+
3,
|
|
850
|
+
n0,
|
|
851
|
+
_C,
|
|
852
|
+
0,
|
|
853
|
+
[
|
|
854
|
+
_AKI,
|
|
855
|
+
_SAK,
|
|
856
|
+
_ST,
|
|
857
|
+
_E
|
|
858
|
+
],
|
|
859
|
+
[
|
|
860
|
+
0,
|
|
861
|
+
[() => accessKeySecretType, 0],
|
|
862
|
+
0,
|
|
863
|
+
4
|
|
864
|
+
],
|
|
865
|
+
4
|
|
866
|
+
];
|
|
867
|
+
PolicyDescriptorType$ = [
|
|
868
|
+
3,
|
|
869
|
+
n0,
|
|
870
|
+
_PDT,
|
|
871
|
+
0,
|
|
872
|
+
[_a],
|
|
873
|
+
[0]
|
|
874
|
+
];
|
|
875
|
+
ProvidedContext$ = [
|
|
876
|
+
3,
|
|
877
|
+
n0,
|
|
878
|
+
_PCr,
|
|
879
|
+
0,
|
|
880
|
+
[_PAr, _CA],
|
|
881
|
+
[0, 0]
|
|
882
|
+
];
|
|
883
|
+
Tag$ = [
|
|
884
|
+
3,
|
|
885
|
+
n0,
|
|
886
|
+
_Ta,
|
|
887
|
+
0,
|
|
888
|
+
[_K, _V],
|
|
889
|
+
[0, 0],
|
|
890
|
+
2
|
|
891
|
+
];
|
|
892
|
+
policyDescriptorListType = [
|
|
893
|
+
1,
|
|
894
|
+
n0,
|
|
895
|
+
_pDLT,
|
|
896
|
+
0,
|
|
897
|
+
() => PolicyDescriptorType$
|
|
898
|
+
];
|
|
899
|
+
ProvidedContextsListType = [
|
|
900
|
+
1,
|
|
901
|
+
n0,
|
|
902
|
+
_PCLT,
|
|
903
|
+
0,
|
|
904
|
+
() => ProvidedContext$
|
|
905
|
+
];
|
|
906
|
+
tagListType = [
|
|
907
|
+
1,
|
|
908
|
+
n0,
|
|
909
|
+
_tLT,
|
|
910
|
+
0,
|
|
911
|
+
() => Tag$
|
|
912
|
+
];
|
|
913
|
+
AssumeRole$ = [
|
|
914
|
+
9,
|
|
915
|
+
n0,
|
|
916
|
+
_AR,
|
|
917
|
+
0,
|
|
918
|
+
() => AssumeRoleRequest$,
|
|
919
|
+
() => AssumeRoleResponse$
|
|
920
|
+
];
|
|
921
|
+
AssumeRoleWithWebIdentity$ = [
|
|
922
|
+
9,
|
|
923
|
+
n0,
|
|
924
|
+
_ARWWI,
|
|
925
|
+
0,
|
|
926
|
+
() => AssumeRoleWithWebIdentityRequest$,
|
|
927
|
+
() => AssumeRoleWithWebIdentityResponse$
|
|
928
|
+
];
|
|
929
|
+
}));
|
|
930
|
+
//#endregion
|
|
931
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js
|
|
932
|
+
var import_dist_cjs$1, getRuntimeConfig$1;
|
|
933
|
+
var init_runtimeConfig_shared = __esmMin((() => {
|
|
934
|
+
init_httpAuthSchemes();
|
|
935
|
+
init_protocols$1();
|
|
936
|
+
import_dist_cjs$1 = require_dist_cjs();
|
|
937
|
+
init_dist_es();
|
|
938
|
+
init_client$1();
|
|
939
|
+
init_protocols();
|
|
940
|
+
init_serde();
|
|
941
|
+
init_httpAuthSchemeProvider();
|
|
942
|
+
init_endpointResolver();
|
|
943
|
+
init_schemas_0();
|
|
944
|
+
getRuntimeConfig$1 = (config) => {
|
|
945
|
+
return {
|
|
946
|
+
apiVersion: "2011-06-15",
|
|
947
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
948
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
949
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
950
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
951
|
+
extensions: config?.extensions ?? [],
|
|
952
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider,
|
|
953
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
954
|
+
{
|
|
955
|
+
schemeId: "aws.auth#sigv4",
|
|
956
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
957
|
+
signer: new AwsSdkSigV4Signer()
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
schemeId: "aws.auth#sigv4a",
|
|
961
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
|
|
962
|
+
signer: new AwsSdkSigV4ASigner()
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
schemeId: "smithy.api#noAuth",
|
|
966
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
967
|
+
signer: new NoAuthSigner()
|
|
968
|
+
}
|
|
969
|
+
],
|
|
970
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
971
|
+
protocol: config?.protocol ?? AwsQueryProtocol,
|
|
972
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
973
|
+
defaultNamespace: "com.amazonaws.sts",
|
|
974
|
+
errorTypeRegistries,
|
|
975
|
+
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
|
976
|
+
version: "2011-06-15",
|
|
977
|
+
serviceTarget: "AWSSecurityTokenServiceV20110615"
|
|
978
|
+
},
|
|
979
|
+
serviceId: config?.serviceId ?? "STS",
|
|
980
|
+
signerConstructor: config?.signerConstructor ?? import_dist_cjs$1.SignatureV4MultiRegion,
|
|
981
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
982
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
983
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
}));
|
|
987
|
+
//#endregion
|
|
988
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js
|
|
989
|
+
var import_dist_cjs, getRuntimeConfig;
|
|
990
|
+
var init_runtimeConfig = __esmMin((() => {
|
|
991
|
+
init_client();
|
|
992
|
+
init_httpAuthSchemes();
|
|
993
|
+
init_dist_es();
|
|
994
|
+
init_client$1();
|
|
995
|
+
init_config$1();
|
|
996
|
+
init_retry();
|
|
997
|
+
init_serde();
|
|
998
|
+
import_dist_cjs = require_dist_cjs$2();
|
|
999
|
+
init_runtimeConfig_shared();
|
|
1000
|
+
getRuntimeConfig = (config) => {
|
|
1001
|
+
emitWarningIfUnsupportedVersion$1(process.version);
|
|
1002
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
1003
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
1004
|
+
const clientSharedValues = getRuntimeConfig$1(config);
|
|
1005
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
1006
|
+
const loaderConfig = {
|
|
1007
|
+
profile: config?.profile,
|
|
1008
|
+
logger: clientSharedValues.logger
|
|
1009
|
+
};
|
|
1010
|
+
return {
|
|
1011
|
+
...clientSharedValues,
|
|
1012
|
+
...config,
|
|
1013
|
+
runtime: "node",
|
|
1014
|
+
defaultsMode,
|
|
1015
|
+
authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
1016
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
1017
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({
|
|
1018
|
+
serviceId: clientSharedValues.serviceId,
|
|
1019
|
+
clientVersion: version
|
|
1020
|
+
}),
|
|
1021
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
1022
|
+
{
|
|
1023
|
+
schemeId: "aws.auth#sigv4",
|
|
1024
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
|
|
1025
|
+
signer: new AwsSdkSigV4Signer()
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
schemeId: "aws.auth#sigv4a",
|
|
1029
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
|
|
1030
|
+
signer: new AwsSdkSigV4ASigner()
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
schemeId: "smithy.api#noAuth",
|
|
1034
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
1035
|
+
signer: new NoAuthSigner()
|
|
1036
|
+
}
|
|
1037
|
+
],
|
|
1038
|
+
maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
1039
|
+
region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, {
|
|
1040
|
+
...NODE_REGION_CONFIG_FILE_OPTIONS,
|
|
1041
|
+
...loaderConfig
|
|
1042
|
+
}),
|
|
1043
|
+
requestHandler: import_dist_cjs.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
1044
|
+
retryMode: config?.retryMode ?? loadConfig({
|
|
1045
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
1046
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
|
|
1047
|
+
}, config),
|
|
1048
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
1049
|
+
sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
|
|
1050
|
+
streamCollector: config?.streamCollector ?? import_dist_cjs.streamCollector,
|
|
1051
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
1052
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
1053
|
+
userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
|
|
1054
|
+
};
|
|
1055
|
+
};
|
|
1056
|
+
}));
|
|
1057
|
+
//#endregion
|
|
1058
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js
|
|
1059
|
+
var getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig;
|
|
1060
|
+
var init_httpAuthExtensionConfiguration = __esmMin((() => {
|
|
1061
|
+
getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
1062
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
1063
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
1064
|
+
let _credentials = runtimeConfig.credentials;
|
|
1065
|
+
return {
|
|
1066
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
1067
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
1068
|
+
if (index === -1) _httpAuthSchemes.push(httpAuthScheme);
|
|
1069
|
+
else _httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
1070
|
+
},
|
|
1071
|
+
httpAuthSchemes() {
|
|
1072
|
+
return _httpAuthSchemes;
|
|
1073
|
+
},
|
|
1074
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
1075
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
1076
|
+
},
|
|
1077
|
+
httpAuthSchemeProvider() {
|
|
1078
|
+
return _httpAuthSchemeProvider;
|
|
1079
|
+
},
|
|
1080
|
+
setCredentials(credentials) {
|
|
1081
|
+
_credentials = credentials;
|
|
1082
|
+
},
|
|
1083
|
+
credentials() {
|
|
1084
|
+
return _credentials;
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
resolveHttpAuthRuntimeConfig = (config) => {
|
|
1089
|
+
return {
|
|
1090
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
1091
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
1092
|
+
credentials: config.credentials()
|
|
1093
|
+
};
|
|
1094
|
+
};
|
|
1095
|
+
}));
|
|
1096
|
+
//#endregion
|
|
1097
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js
|
|
1098
|
+
var resolveRuntimeExtensions;
|
|
1099
|
+
var init_runtimeExtensions = __esmMin((() => {
|
|
1100
|
+
init_client();
|
|
1101
|
+
init_client$1();
|
|
1102
|
+
init_protocols();
|
|
1103
|
+
init_httpAuthExtensionConfiguration();
|
|
1104
|
+
resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
1105
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
1106
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
1107
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
1108
|
+
};
|
|
1109
|
+
}));
|
|
1110
|
+
//#endregion
|
|
1111
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js
|
|
1112
|
+
var STSClient;
|
|
1113
|
+
var init_STSClient = __esmMin((() => {
|
|
1114
|
+
init_client();
|
|
1115
|
+
init_dist_es();
|
|
1116
|
+
init_client$1();
|
|
1117
|
+
init_config$1();
|
|
1118
|
+
init_endpoints();
|
|
1119
|
+
init_protocols();
|
|
1120
|
+
init_retry();
|
|
1121
|
+
init_schema();
|
|
1122
|
+
init_httpAuthSchemeProvider();
|
|
1123
|
+
init_EndpointParameters();
|
|
1124
|
+
init_runtimeConfig();
|
|
1125
|
+
init_runtimeExtensions();
|
|
1126
|
+
STSClient = class extends Client {
|
|
1127
|
+
config;
|
|
1128
|
+
constructor(...[configuration]) {
|
|
1129
|
+
const _config_0 = getRuntimeConfig(configuration || {});
|
|
1130
|
+
super(_config_0);
|
|
1131
|
+
this.initConfig = _config_0;
|
|
1132
|
+
const _config_8 = resolveRuntimeExtensions(resolveHttpAuthSchemeConfig(resolveEndpointConfig(resolveHostHeaderConfig(resolveRegionConfig(resolveRetryConfig(resolveUserAgentConfig(resolveClientEndpointParameters(_config_0))))))), configuration?.extensions || []);
|
|
1133
|
+
this.config = _config_8;
|
|
1134
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
1135
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
1136
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
1137
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
1138
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
1139
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
1140
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
1141
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
1142
|
+
httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
|
|
1143
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
1144
|
+
"aws.auth#sigv4": config.credentials,
|
|
1145
|
+
"aws.auth#sigv4a": config.credentials
|
|
1146
|
+
})
|
|
1147
|
+
}));
|
|
1148
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
1149
|
+
}
|
|
1150
|
+
destroy() {
|
|
1151
|
+
super.destroy();
|
|
1152
|
+
}
|
|
1153
|
+
};
|
|
1154
|
+
}));
|
|
1155
|
+
//#endregion
|
|
1156
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js
|
|
1157
|
+
var AssumeRoleCommand;
|
|
1158
|
+
var init_AssumeRoleCommand = __esmMin((() => {
|
|
1159
|
+
init_client$1();
|
|
1160
|
+
init_endpoints();
|
|
1161
|
+
init_EndpointParameters();
|
|
1162
|
+
init_schemas_0();
|
|
1163
|
+
AssumeRoleCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
1164
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
1165
|
+
}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(AssumeRole$).build() {};
|
|
1166
|
+
}));
|
|
1167
|
+
//#endregion
|
|
1168
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js
|
|
1169
|
+
var AssumeRoleWithWebIdentityCommand;
|
|
1170
|
+
var init_AssumeRoleWithWebIdentityCommand = __esmMin((() => {
|
|
1171
|
+
init_client$1();
|
|
1172
|
+
init_endpoints();
|
|
1173
|
+
init_EndpointParameters();
|
|
1174
|
+
init_schemas_0();
|
|
1175
|
+
AssumeRoleWithWebIdentityCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
1176
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
1177
|
+
}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(AssumeRoleWithWebIdentity$).build() {};
|
|
1178
|
+
}));
|
|
1179
|
+
//#endregion
|
|
1180
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js
|
|
1181
|
+
var commands, STS;
|
|
1182
|
+
var init_STS = __esmMin((() => {
|
|
1183
|
+
init_client$1();
|
|
1184
|
+
init_AssumeRoleCommand();
|
|
1185
|
+
init_AssumeRoleWithWebIdentityCommand();
|
|
1186
|
+
init_STSClient();
|
|
1187
|
+
commands = {
|
|
1188
|
+
AssumeRoleCommand,
|
|
1189
|
+
AssumeRoleWithWebIdentityCommand
|
|
1190
|
+
};
|
|
1191
|
+
STS = class extends STSClient {};
|
|
1192
|
+
createAggregatedClient(commands, STS);
|
|
1193
|
+
}));
|
|
1194
|
+
//#endregion
|
|
1195
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/index.js
|
|
1196
|
+
var init_commands = __esmMin((() => {
|
|
1197
|
+
init_AssumeRoleCommand();
|
|
1198
|
+
init_AssumeRoleWithWebIdentityCommand();
|
|
1199
|
+
}));
|
|
1200
|
+
//#endregion
|
|
1201
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/models_0.js
|
|
1202
|
+
var init_models_0 = __esmMin((() => {}));
|
|
1203
|
+
//#endregion
|
|
1204
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js
|
|
1205
|
+
var getAccountIdFromAssumedRoleUser, resolveRegion, getDefaultRoleAssumer$1, getDefaultRoleAssumerWithWebIdentity$1, isH2;
|
|
1206
|
+
var init_defaultStsRoleAssumers = __esmMin((() => {
|
|
1207
|
+
init_client();
|
|
1208
|
+
init_AssumeRoleCommand();
|
|
1209
|
+
init_AssumeRoleWithWebIdentityCommand();
|
|
1210
|
+
getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
|
1211
|
+
if (typeof assumedRoleUser?.Arn === "string") {
|
|
1212
|
+
const arnComponents = assumedRoleUser.Arn.split(":");
|
|
1213
|
+
if (arnComponents.length > 4 && arnComponents[4] !== "") return arnComponents[4];
|
|
1214
|
+
}
|
|
1215
|
+
};
|
|
1216
|
+
resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
|
|
1217
|
+
const region = typeof _region === "function" ? await _region() : _region;
|
|
1218
|
+
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
|
1219
|
+
let stsDefaultRegion = "";
|
|
1220
|
+
const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)());
|
|
1221
|
+
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)`);
|
|
1222
|
+
return resolvedRegion;
|
|
1223
|
+
};
|
|
1224
|
+
getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
|
|
1225
|
+
let stsClient;
|
|
1226
|
+
let closureSourceCreds;
|
|
1227
|
+
return async (sourceCreds, params) => {
|
|
1228
|
+
closureSourceCreds = sourceCreds;
|
|
1229
|
+
if (!stsClient) {
|
|
1230
|
+
const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
|
|
1231
|
+
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
|
|
1232
|
+
logger,
|
|
1233
|
+
profile
|
|
1234
|
+
});
|
|
1235
|
+
const isCompatibleRequestHandler = !isH2(requestHandler);
|
|
1236
|
+
stsClient = new STSClient({
|
|
1237
|
+
...stsOptions,
|
|
1238
|
+
userAgentAppId,
|
|
1239
|
+
profile,
|
|
1240
|
+
credentialDefaultProvider: () => async () => closureSourceCreds,
|
|
1241
|
+
region: resolvedRegion,
|
|
1242
|
+
requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
|
|
1243
|
+
logger
|
|
1244
|
+
});
|
|
1245
|
+
}
|
|
1246
|
+
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
|
|
1247
|
+
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
|
|
1248
|
+
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
|
1249
|
+
const credentials = {
|
|
1250
|
+
accessKeyId: Credentials.AccessKeyId,
|
|
1251
|
+
secretAccessKey: Credentials.SecretAccessKey,
|
|
1252
|
+
sessionToken: Credentials.SessionToken,
|
|
1253
|
+
expiration: Credentials.Expiration,
|
|
1254
|
+
...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
|
|
1255
|
+
...accountId && { accountId }
|
|
1256
|
+
};
|
|
1257
|
+
setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
|
|
1258
|
+
return credentials;
|
|
1259
|
+
};
|
|
1260
|
+
};
|
|
1261
|
+
getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => {
|
|
1262
|
+
let stsClient;
|
|
1263
|
+
return async (params) => {
|
|
1264
|
+
if (!stsClient) {
|
|
1265
|
+
const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
|
|
1266
|
+
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
|
|
1267
|
+
logger,
|
|
1268
|
+
profile
|
|
1269
|
+
});
|
|
1270
|
+
const isCompatibleRequestHandler = !isH2(requestHandler);
|
|
1271
|
+
stsClient = new STSClient({
|
|
1272
|
+
...stsOptions,
|
|
1273
|
+
userAgentAppId,
|
|
1274
|
+
profile,
|
|
1275
|
+
region: resolvedRegion,
|
|
1276
|
+
requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
|
|
1277
|
+
logger
|
|
1278
|
+
});
|
|
1279
|
+
}
|
|
1280
|
+
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
|
|
1281
|
+
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
|
|
1282
|
+
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
|
1283
|
+
const credentials = {
|
|
1284
|
+
accessKeyId: Credentials.AccessKeyId,
|
|
1285
|
+
secretAccessKey: Credentials.SecretAccessKey,
|
|
1286
|
+
sessionToken: Credentials.SessionToken,
|
|
1287
|
+
expiration: Credentials.Expiration,
|
|
1288
|
+
...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
|
|
1289
|
+
...accountId && { accountId }
|
|
1290
|
+
};
|
|
1291
|
+
if (accountId) setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
|
|
1292
|
+
setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
|
|
1293
|
+
return credentials;
|
|
1294
|
+
};
|
|
1295
|
+
};
|
|
1296
|
+
isH2 = (requestHandler) => {
|
|
1297
|
+
return requestHandler?.metadata?.handlerProtocol === "h2";
|
|
1298
|
+
};
|
|
1299
|
+
}));
|
|
1300
|
+
//#endregion
|
|
1301
|
+
//#region ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.997.20/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js
|
|
1302
|
+
var getCustomizableStsClientCtor, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity;
|
|
1303
|
+
var init_defaultRoleAssumers = __esmMin((() => {
|
|
1304
|
+
init_defaultStsRoleAssumers();
|
|
1305
|
+
init_STSClient();
|
|
1306
|
+
getCustomizableStsClientCtor = (baseCtor, customizations) => {
|
|
1307
|
+
if (!customizations) return baseCtor;
|
|
1308
|
+
else return class CustomizableSTSClient extends baseCtor {
|
|
1309
|
+
constructor(config) {
|
|
1310
|
+
super(config);
|
|
1311
|
+
for (const customization of customizations) this.middlewareStack.use(customization);
|
|
1312
|
+
}
|
|
1313
|
+
};
|
|
1314
|
+
};
|
|
1315
|
+
getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
|
|
1316
|
+
getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
|
|
1317
|
+
}));
|
|
1318
|
+
//#endregion
|
|
1319
|
+
__esmMin((() => {
|
|
1320
|
+
init_STSClient();
|
|
1321
|
+
init_STS();
|
|
1322
|
+
init_commands();
|
|
1323
|
+
init_schemas_0();
|
|
1324
|
+
init_errors();
|
|
1325
|
+
init_models_0();
|
|
1326
|
+
init_defaultRoleAssumers();
|
|
1327
|
+
init_STSServiceException();
|
|
1328
|
+
}))();
|
|
1329
|
+
export { getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity };
|