cdk-cost-analyzer 0.1.38 → 0.1.39

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.
@@ -3,1242 +3,1194 @@ exports.id = 998;
3
3
  exports.ids = [998];
4
4
  exports.modules = {
5
5
 
6
- /***/ 2041:
6
+ /***/ 7523:
7
7
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8
8
 
9
9
 
10
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11
- exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0;
12
- const core_1 = __webpack_require__(8704);
13
- const util_middleware_1 = __webpack_require__(6324);
14
- const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
15
- return {
16
- operation: (0, util_middleware_1.getSmithyContext)(context).operation,
17
- region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
18
- throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
19
- })(),
20
- };
10
+
11
+ var protocolHttp = __webpack_require__(2356);
12
+ var core = __webpack_require__(402);
13
+ var propertyProvider = __webpack_require__(1238);
14
+ var client = __webpack_require__(5152);
15
+ var signatureV4 = __webpack_require__(5118);
16
+
17
+ const getDateHeader = (response) => protocolHttp.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;
18
+
19
+ const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
20
+
21
+ const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;
22
+
23
+ const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {
24
+ const clockTimeInMs = Date.parse(clockTime);
25
+ if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
26
+ return clockTimeInMs - Date.now();
27
+ }
28
+ return currentSystemClockOffset;
21
29
  };
22
- exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;
23
- function createAwsAuthSigv4HttpAuthOption(authParameters) {
24
- return {
25
- schemeId: "aws.auth#sigv4",
26
- signingProperties: {
27
- name: "awsssoportal",
28
- region: authParameters.region,
29
- },
30
- propertiesExtractor: (config, context) => ({
31
- signingProperties: {
32
- config,
33
- context,
34
- },
35
- }),
36
- };
37
- }
38
- function createSmithyApiNoAuthHttpAuthOption(authParameters) {
30
+
31
+ const throwSigningPropertyError = (name, property) => {
32
+ if (!property) {
33
+ throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
34
+ }
35
+ return property;
36
+ };
37
+ const validateSigningProperties = async (signingProperties) => {
38
+ const context = throwSigningPropertyError("context", signingProperties.context);
39
+ const config = throwSigningPropertyError("config", signingProperties.config);
40
+ const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
41
+ const signerFunction = throwSigningPropertyError("signer", config.signer);
42
+ const signer = await signerFunction(authScheme);
43
+ const signingRegion = signingProperties?.signingRegion;
44
+ const signingRegionSet = signingProperties?.signingRegionSet;
45
+ const signingName = signingProperties?.signingName;
39
46
  return {
40
- schemeId: "smithy.api#noAuth",
47
+ config,
48
+ signer,
49
+ signingRegion,
50
+ signingRegionSet,
51
+ signingName,
41
52
  };
42
- }
43
- const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
44
- const options = [];
45
- switch (authParameters.operation) {
46
- case "GetRoleCredentials":
47
- {
48
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
49
- break;
50
- }
51
- ;
52
- case "ListAccountRoles":
53
- {
54
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
55
- break;
56
- }
57
- ;
58
- case "ListAccounts":
59
- {
60
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
61
- break;
53
+ };
54
+ class AwsSdkSigV4Signer {
55
+ async sign(httpRequest, identity, signingProperties) {
56
+ if (!protocolHttp.HttpRequest.isInstance(httpRequest)) {
57
+ throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
58
+ }
59
+ const validatedProps = await validateSigningProperties(signingProperties);
60
+ const { config, signer } = validatedProps;
61
+ let { signingRegion, signingName } = validatedProps;
62
+ const handlerExecutionContext = signingProperties.context;
63
+ if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {
64
+ const [first, second] = handlerExecutionContext.authSchemes;
65
+ if (first?.name === "sigv4a" && second?.name === "sigv4") {
66
+ signingRegion = second?.signingRegion ?? signingRegion;
67
+ signingName = second?.signingName ?? signingName;
62
68
  }
63
- ;
64
- case "Logout":
65
- {
66
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
67
- break;
69
+ }
70
+ const signedRequest = await signer.sign(httpRequest, {
71
+ signingDate: getSkewCorrectedDate(config.systemClockOffset),
72
+ signingRegion: signingRegion,
73
+ signingService: signingName,
74
+ });
75
+ return signedRequest;
76
+ }
77
+ errorHandler(signingProperties) {
78
+ return (error) => {
79
+ const serverTime = error.ServerTime ?? getDateHeader(error.$response);
80
+ if (serverTime) {
81
+ const config = throwSigningPropertyError("config", signingProperties.config);
82
+ const initialSystemClockOffset = config.systemClockOffset;
83
+ config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
84
+ const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;
85
+ if (clockSkewCorrected && error.$metadata) {
86
+ error.$metadata.clockSkewCorrected = true;
87
+ }
68
88
  }
69
- ;
70
- default: {
71
- options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
89
+ throw error;
90
+ };
91
+ }
92
+ successHandler(httpResponse, signingProperties) {
93
+ const dateHeader = getDateHeader(httpResponse);
94
+ if (dateHeader) {
95
+ const config = throwSigningPropertyError("config", signingProperties.config);
96
+ config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
72
97
  }
73
98
  }
74
- return options;
75
- };
76
- exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;
77
- const resolveHttpAuthSchemeConfig = (config) => {
78
- const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
79
- return Object.assign(config_0, {
80
- authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
81
- });
82
- };
83
- exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
84
-
99
+ }
100
+ const AWSSDKSigV4Signer = AwsSdkSigV4Signer;
85
101
 
86
- /***/ }),
102
+ class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {
103
+ async sign(httpRequest, identity, signingProperties) {
104
+ if (!protocolHttp.HttpRequest.isInstance(httpRequest)) {
105
+ throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
106
+ }
107
+ const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);
108
+ const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();
109
+ const multiRegionOverride = (configResolvedSigningRegionSet ??
110
+ signingRegionSet ?? [signingRegion]).join(",");
111
+ const signedRequest = await signer.sign(httpRequest, {
112
+ signingDate: getSkewCorrectedDate(config.systemClockOffset),
113
+ signingRegion: multiRegionOverride,
114
+ signingService: signingName,
115
+ });
116
+ return signedRequest;
117
+ }
118
+ }
87
119
 
88
- /***/ 3903:
89
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
120
+ const getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : [];
90
121
 
122
+ const getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`;
91
123
 
92
- Object.defineProperty(exports, "__esModule", ({ value: true }));
93
- exports.defaultEndpointResolver = void 0;
94
- const util_endpoints_1 = __webpack_require__(3068);
95
- const util_endpoints_2 = __webpack_require__(9674);
96
- const ruleset_1 = __webpack_require__(1308);
97
- const cache = new util_endpoints_2.EndpointCache({
98
- size: 50,
99
- params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
100
- });
101
- const defaultEndpointResolver = (endpointParams, context = {}) => {
102
- return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
103
- endpointParams: endpointParams,
104
- logger: context.logger,
105
- }));
124
+ const NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE";
125
+ const NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference";
126
+ const NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {
127
+ environmentVariableSelector: (env, options) => {
128
+ if (options?.signingName) {
129
+ const bearerTokenKey = getBearerTokenEnvKey(options.signingName);
130
+ if (bearerTokenKey in env)
131
+ return ["httpBearerAuth"];
132
+ }
133
+ if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env))
134
+ return undefined;
135
+ return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
136
+ },
137
+ configFileSelector: (profile) => {
138
+ if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))
139
+ return undefined;
140
+ return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);
141
+ },
142
+ default: [],
106
143
  };
107
- exports.defaultEndpointResolver = defaultEndpointResolver;
108
- util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
109
-
110
-
111
- /***/ }),
112
144
 
113
- /***/ 1308:
114
- /***/ ((__unused_webpack_module, exports) => {
115
-
116
-
117
- Object.defineProperty(exports, "__esModule", ({ value: true }));
118
- exports.ruleSet = void 0;
119
- const u = "required", v = "fn", w = "argv", x = "ref";
120
- const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "string" }, j = { [u]: true, "default": false, "type": "boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
121
- const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
122
- exports.ruleSet = _data;
123
-
124
-
125
- /***/ }),
126
-
127
- /***/ 2054:
128
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
129
-
130
-
131
-
132
- var middlewareHostHeader = __webpack_require__(2590);
133
- var middlewareLogger = __webpack_require__(5242);
134
- var middlewareRecursionDetection = __webpack_require__(1568);
135
- var middlewareUserAgent = __webpack_require__(2959);
136
- var configResolver = __webpack_require__(9316);
137
- var core = __webpack_require__(402);
138
- var schema = __webpack_require__(6890);
139
- var middlewareContentLength = __webpack_require__(7212);
140
- var middlewareEndpoint = __webpack_require__(99);
141
- var middlewareRetry = __webpack_require__(9618);
142
- var smithyClient = __webpack_require__(1411);
143
- var httpAuthSchemeProvider = __webpack_require__(2041);
144
- var runtimeConfig = __webpack_require__(2696);
145
- var regionConfigResolver = __webpack_require__(6463);
146
- var protocolHttp = __webpack_require__(2356);
147
- var schemas_0 = __webpack_require__(1382);
148
- var errors = __webpack_require__(2378);
149
- var SSOServiceException = __webpack_require__(7330);
150
-
151
- const resolveClientEndpointParameters = (options) => {
152
- return Object.assign(options, {
153
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
154
- useFipsEndpoint: options.useFipsEndpoint ?? false,
155
- defaultSigningName: "awsssoportal",
156
- });
145
+ const resolveAwsSdkSigV4AConfig = (config) => {
146
+ config.sigv4aSigningRegionSet = core.normalizeProvider(config.sigv4aSigningRegionSet);
147
+ return config;
157
148
  };
158
- const commonParams = {
159
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
160
- Endpoint: { type: "builtInParams", name: "endpoint" },
161
- Region: { type: "builtInParams", name: "region" },
162
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
149
+ const NODE_SIGV4A_CONFIG_OPTIONS = {
150
+ environmentVariableSelector(env) {
151
+ if (env.AWS_SIGV4A_SIGNING_REGION_SET) {
152
+ return env.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim());
153
+ }
154
+ throw new propertyProvider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", {
155
+ tryNextLink: true,
156
+ });
157
+ },
158
+ configFileSelector(profile) {
159
+ if (profile.sigv4a_signing_region_set) {
160
+ return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim());
161
+ }
162
+ throw new propertyProvider.ProviderError("sigv4a_signing_region_set not set in profile.", {
163
+ tryNextLink: true,
164
+ });
165
+ },
166
+ default: undefined,
163
167
  };
164
168
 
165
- const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
166
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
167
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
168
- let _credentials = runtimeConfig.credentials;
169
- return {
170
- setHttpAuthScheme(httpAuthScheme) {
171
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
172
- if (index === -1) {
173
- _httpAuthSchemes.push(httpAuthScheme);
169
+ const resolveAwsSdkSigV4Config = (config) => {
170
+ let inputCredentials = config.credentials;
171
+ let isUserSupplied = !!config.credentials;
172
+ let resolvedCredentials = undefined;
173
+ Object.defineProperty(config, "credentials", {
174
+ set(credentials) {
175
+ if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {
176
+ isUserSupplied = true;
177
+ }
178
+ inputCredentials = credentials;
179
+ const memoizedProvider = normalizeCredentialProvider(config, {
180
+ credentials: inputCredentials,
181
+ credentialDefaultProvider: config.credentialDefaultProvider,
182
+ });
183
+ const boundProvider = bindCallerConfig(config, memoizedProvider);
184
+ if (isUserSupplied && !boundProvider.attributed) {
185
+ const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null;
186
+ resolvedCredentials = async (options) => {
187
+ const creds = await boundProvider(options);
188
+ const attributedCreds = creds;
189
+ if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {
190
+ return client.setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e");
191
+ }
192
+ return attributedCreds;
193
+ };
194
+ resolvedCredentials.memoized = boundProvider.memoized;
195
+ resolvedCredentials.configBound = boundProvider.configBound;
196
+ resolvedCredentials.attributed = true;
174
197
  }
175
198
  else {
176
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
199
+ resolvedCredentials = boundProvider;
177
200
  }
178
201
  },
179
- httpAuthSchemes() {
180
- return _httpAuthSchemes;
181
- },
182
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
183
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
184
- },
185
- httpAuthSchemeProvider() {
186
- return _httpAuthSchemeProvider;
187
- },
188
- setCredentials(credentials) {
189
- _credentials = credentials;
190
- },
191
- credentials() {
192
- return _credentials;
202
+ get() {
203
+ return resolvedCredentials;
193
204
  },
194
- };
195
- };
196
- const resolveHttpAuthRuntimeConfig = (config) => {
197
- return {
198
- httpAuthSchemes: config.httpAuthSchemes(),
199
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
200
- credentials: config.credentials(),
201
- };
202
- };
203
-
204
- const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
205
- const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
206
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
207
- return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
205
+ enumerable: true,
206
+ configurable: true,
207
+ });
208
+ config.credentials = inputCredentials;
209
+ const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config;
210
+ let signer;
211
+ if (config.signer) {
212
+ signer = core.normalizeProvider(config.signer);
213
+ }
214
+ else if (config.regionInfoProvider) {
215
+ signer = () => core.normalizeProvider(config.region)()
216
+ .then(async (region) => [
217
+ (await config.regionInfoProvider(region, {
218
+ useFipsEndpoint: await config.useFipsEndpoint(),
219
+ useDualstackEndpoint: await config.useDualstackEndpoint(),
220
+ })) || {},
221
+ region,
222
+ ])
223
+ .then(([regionInfo, region]) => {
224
+ const { signingRegion, signingService } = regionInfo;
225
+ config.signingRegion = config.signingRegion || signingRegion || region;
226
+ config.signingName = config.signingName || signingService || config.serviceId;
227
+ const params = {
228
+ ...config,
229
+ credentials: config.credentials,
230
+ region: config.signingRegion,
231
+ service: config.signingName,
232
+ sha256,
233
+ uriEscapePath: signingEscapePath,
234
+ };
235
+ const SignerCtor = config.signerConstructor || signatureV4.SignatureV4;
236
+ return new SignerCtor(params);
237
+ });
238
+ }
239
+ else {
240
+ signer = async (authScheme) => {
241
+ authScheme = Object.assign({}, {
242
+ name: "sigv4",
243
+ signingName: config.signingName || config.defaultSigningName,
244
+ signingRegion: await core.normalizeProvider(config.region)(),
245
+ properties: {},
246
+ }, authScheme);
247
+ const signingRegion = authScheme.signingRegion;
248
+ const signingService = authScheme.signingName;
249
+ config.signingRegion = config.signingRegion || signingRegion;
250
+ config.signingName = config.signingName || signingService || config.serviceId;
251
+ const params = {
252
+ ...config,
253
+ credentials: config.credentials,
254
+ region: config.signingRegion,
255
+ service: config.signingName,
256
+ sha256,
257
+ uriEscapePath: signingEscapePath,
258
+ };
259
+ const SignerCtor = config.signerConstructor || signatureV4.SignatureV4;
260
+ return new SignerCtor(params);
261
+ };
262
+ }
263
+ const resolvedConfig = Object.assign(config, {
264
+ systemClockOffset,
265
+ signingEscapePath,
266
+ signer,
267
+ });
268
+ return resolvedConfig;
208
269
  };
209
-
210
- class SSOClient extends smithyClient.Client {
211
- config;
212
- constructor(...[configuration]) {
213
- const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
214
- super(_config_0);
215
- this.initConfig = _config_0;
216
- const _config_1 = resolveClientEndpointParameters(_config_0);
217
- const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
218
- const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
219
- const _config_4 = configResolver.resolveRegionConfig(_config_3);
220
- const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
221
- const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
222
- const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
223
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
224
- this.config = _config_8;
225
- this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
226
- this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
227
- this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
228
- this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
229
- this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
230
- this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
231
- this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
232
- this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
233
- httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider,
234
- identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
235
- "aws.auth#sigv4": config.credentials,
236
- }),
237
- }));
238
- this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
270
+ const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;
271
+ function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider, }) {
272
+ let credentialsProvider;
273
+ if (credentials) {
274
+ if (!credentials?.memoized) {
275
+ credentialsProvider = core.memoizeIdentityProvider(credentials, core.isIdentityExpired, core.doesIdentityRequireRefresh);
276
+ }
277
+ else {
278
+ credentialsProvider = credentials;
279
+ }
239
280
  }
240
- destroy() {
241
- super.destroy();
281
+ else {
282
+ if (credentialDefaultProvider) {
283
+ credentialsProvider = core.normalizeProvider(credentialDefaultProvider(Object.assign({}, config, {
284
+ parentClientConfig: config,
285
+ })));
286
+ }
287
+ else {
288
+ credentialsProvider = async () => {
289
+ throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.");
290
+ };
291
+ }
242
292
  }
293
+ credentialsProvider.memoized = true;
294
+ return credentialsProvider;
243
295
  }
244
-
245
- class GetRoleCredentialsCommand extends smithyClient.Command
246
- .classBuilder()
247
- .ep(commonParams)
248
- .m(function (Command, cs, config, o) {
249
- return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
250
- })
251
- .s("SWBPortalService", "GetRoleCredentials", {})
252
- .n("SSOClient", "GetRoleCredentialsCommand")
253
- .sc(schemas_0.GetRoleCredentials$)
254
- .build() {
296
+ function bindCallerConfig(config, credentialsProvider) {
297
+ if (credentialsProvider.configBound) {
298
+ return credentialsProvider;
299
+ }
300
+ const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });
301
+ fn.memoized = credentialsProvider.memoized;
302
+ fn.configBound = true;
303
+ return fn;
255
304
  }
256
305
 
257
- class ListAccountRolesCommand extends smithyClient.Command
258
- .classBuilder()
259
- .ep(commonParams)
260
- .m(function (Command, cs, config, o) {
261
- return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
262
- })
263
- .s("SWBPortalService", "ListAccountRoles", {})
264
- .n("SSOClient", "ListAccountRolesCommand")
265
- .sc(schemas_0.ListAccountRoles$)
266
- .build() {
267
- }
306
+ exports.AWSSDKSigV4Signer = AWSSDKSigV4Signer;
307
+ exports.AwsSdkSigV4ASigner = AwsSdkSigV4ASigner;
308
+ exports.AwsSdkSigV4Signer = AwsSdkSigV4Signer;
309
+ exports.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = NODE_AUTH_SCHEME_PREFERENCE_OPTIONS;
310
+ exports.NODE_SIGV4A_CONFIG_OPTIONS = NODE_SIGV4A_CONFIG_OPTIONS;
311
+ exports.getBearerTokenEnvKey = getBearerTokenEnvKey;
312
+ exports.resolveAWSSDKSigV4Config = resolveAWSSDKSigV4Config;
313
+ exports.resolveAwsSdkSigV4AConfig = resolveAwsSdkSigV4AConfig;
314
+ exports.resolveAwsSdkSigV4Config = resolveAwsSdkSigV4Config;
315
+ exports.validateSigningProperties = validateSigningProperties;
268
316
 
269
- class ListAccountsCommand extends smithyClient.Command
270
- .classBuilder()
271
- .ep(commonParams)
272
- .m(function (Command, cs, config, o) {
273
- return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
274
- })
275
- .s("SWBPortalService", "ListAccounts", {})
276
- .n("SSOClient", "ListAccountsCommand")
277
- .sc(schemas_0.ListAccounts$)
278
- .build() {
279
- }
280
317
 
281
- class LogoutCommand extends smithyClient.Command
282
- .classBuilder()
283
- .ep(commonParams)
284
- .m(function (Command, cs, config, o) {
285
- return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
286
- })
287
- .s("SWBPortalService", "Logout", {})
288
- .n("SSOClient", "LogoutCommand")
289
- .sc(schemas_0.Logout$)
290
- .build() {
291
- }
318
+ /***/ }),
292
319
 
293
- const paginateListAccountRoles = core.createPaginator(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults");
320
+ /***/ 998:
321
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
294
322
 
295
- const paginateListAccounts = core.createPaginator(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults");
323
+ var __webpack_unused_export__;
296
324
 
297
- const commands = {
298
- GetRoleCredentialsCommand,
299
- ListAccountRolesCommand,
300
- ListAccountsCommand,
301
- LogoutCommand,
302
- };
303
- const paginators = {
304
- paginateListAccountRoles,
305
- paginateListAccounts,
306
- };
307
- class SSO extends SSOClient {
308
- }
309
- smithyClient.createAggregatedClient(commands, SSO, { paginators });
310
-
311
- Object.defineProperty(exports, "$Command", ({
312
- enumerable: true,
313
- get: function () { return smithyClient.Command; }
314
- }));
315
- Object.defineProperty(exports, "__Client", ({
316
- enumerable: true,
317
- get: function () { return smithyClient.Client; }
318
- }));
319
- Object.defineProperty(exports, "SSOServiceException", ({
320
- enumerable: true,
321
- get: function () { return SSOServiceException.SSOServiceException; }
322
- }));
323
- exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
324
- exports.ListAccountRolesCommand = ListAccountRolesCommand;
325
- exports.ListAccountsCommand = ListAccountsCommand;
326
- exports.LogoutCommand = LogoutCommand;
327
- exports.SSO = SSO;
328
- exports.SSOClient = SSOClient;
329
- exports.paginateListAccountRoles = paginateListAccountRoles;
330
- exports.paginateListAccounts = paginateListAccounts;
331
- Object.keys(schemas_0).forEach(function (k) {
332
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
333
- enumerable: true,
334
- get: function () { return schemas_0[k]; }
335
- });
336
- });
337
- Object.keys(errors).forEach(function (k) {
338
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
339
- enumerable: true,
340
- get: function () { return errors[k]; }
341
- });
342
- });
343
325
 
326
+ var propertyProvider = __webpack_require__(1238);
327
+ var sharedIniFileLoader = __webpack_require__(4964);
328
+ var client = __webpack_require__(5152);
329
+ var tokenProviders = __webpack_require__(5433);
344
330
 
345
- /***/ }),
331
+ const isSsoProfile = (arg) => arg &&
332
+ (typeof arg.sso_start_url === "string" ||
333
+ typeof arg.sso_account_id === "string" ||
334
+ typeof arg.sso_session === "string" ||
335
+ typeof arg.sso_region === "string" ||
336
+ typeof arg.sso_role_name === "string");
346
337
 
347
- /***/ 7330:
348
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
338
+ const SHOULD_FAIL_CREDENTIAL_CHAIN = false;
339
+ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {
340
+ let token;
341
+ const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
342
+ if (ssoSession) {
343
+ try {
344
+ const _token = await tokenProviders.fromSso({
345
+ profile,
346
+ filepath,
347
+ configFilepath,
348
+ ignoreCache,
349
+ })();
350
+ token = {
351
+ accessToken: _token.token,
352
+ expiresAt: new Date(_token.expiration).toISOString(),
353
+ };
354
+ }
355
+ catch (e) {
356
+ throw new propertyProvider.CredentialsProviderError(e.message, {
357
+ tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
358
+ logger,
359
+ });
360
+ }
361
+ }
362
+ else {
363
+ try {
364
+ token = await sharedIniFileLoader.getSSOTokenFromFile(ssoStartUrl);
365
+ }
366
+ catch (e) {
367
+ throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
368
+ tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
369
+ logger,
370
+ });
371
+ }
372
+ }
373
+ if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
374
+ throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
375
+ tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
376
+ logger,
377
+ });
378
+ }
379
+ const { accessToken } = token;
380
+ const { SSOClient, GetRoleCredentialsCommand } = await Promise.resolve().then(function () { return __webpack_require__(1853); });
381
+ const sso = ssoClient ||
382
+ new SSOClient(Object.assign({}, clientConfig ?? {}, {
383
+ logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,
384
+ region: clientConfig?.region ?? ssoRegion,
385
+ userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,
386
+ }));
387
+ let ssoResp;
388
+ try {
389
+ ssoResp = await sso.send(new GetRoleCredentialsCommand({
390
+ accountId: ssoAccountId,
391
+ roleName: ssoRoleName,
392
+ accessToken,
393
+ }));
394
+ }
395
+ catch (e) {
396
+ throw new propertyProvider.CredentialsProviderError(e, {
397
+ tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
398
+ logger,
399
+ });
400
+ }
401
+ const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;
402
+ if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
403
+ throw new propertyProvider.CredentialsProviderError("SSO returns an invalid temporary credential.", {
404
+ tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
405
+ logger,
406
+ });
407
+ }
408
+ const credentials = {
409
+ accessKeyId,
410
+ secretAccessKey,
411
+ sessionToken,
412
+ expiration: new Date(expiration),
413
+ ...(credentialScope && { credentialScope }),
414
+ ...(accountId && { accountId }),
415
+ };
416
+ if (ssoSession) {
417
+ client.setCredentialFeature(credentials, "CREDENTIALS_SSO", "s");
418
+ }
419
+ else {
420
+ client.setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u");
421
+ }
422
+ return credentials;
423
+ };
349
424
 
425
+ const validateSsoProfile = (profile, logger) => {
426
+ const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
427
+ if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
428
+ throw new propertyProvider.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` +
429
+ `"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });
430
+ }
431
+ return profile;
432
+ };
350
433
 
351
- Object.defineProperty(exports, "__esModule", ({ value: true }));
352
- exports.SSOServiceException = exports.__ServiceException = void 0;
353
- const smithy_client_1 = __webpack_require__(1411);
354
- Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } }));
355
- class SSOServiceException extends smithy_client_1.ServiceException {
356
- constructor(options) {
357
- super(options);
358
- Object.setPrototypeOf(this, SSOServiceException.prototype);
434
+ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
435
+ init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
436
+ const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
437
+ const { ssoClient } = init;
438
+ const profileName = sharedIniFileLoader.getProfileName({
439
+ profile: init.profile ?? callerClientConfig?.profile,
440
+ });
441
+ if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
442
+ const profiles = await sharedIniFileLoader.parseKnownFiles(init);
443
+ const profile = profiles[profileName];
444
+ if (!profile) {
445
+ throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
446
+ }
447
+ if (!isSsoProfile(profile)) {
448
+ throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
449
+ logger: init.logger,
450
+ });
451
+ }
452
+ if (profile?.sso_session) {
453
+ const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);
454
+ const session = ssoSessions[profile.sso_session];
455
+ const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
456
+ if (ssoRegion && ssoRegion !== session.sso_region) {
457
+ throw new propertyProvider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
458
+ tryNextLink: false,
459
+ logger: init.logger,
460
+ });
461
+ }
462
+ if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
463
+ throw new propertyProvider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
464
+ tryNextLink: false,
465
+ logger: init.logger,
466
+ });
467
+ }
468
+ profile.sso_region = session.sso_region;
469
+ profile.sso_start_url = session.sso_start_url;
470
+ }
471
+ const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);
472
+ return resolveSSOCredentials({
473
+ ssoStartUrl: sso_start_url,
474
+ ssoSession: sso_session,
475
+ ssoAccountId: sso_account_id,
476
+ ssoRegion: sso_region,
477
+ ssoRoleName: sso_role_name,
478
+ ssoClient: ssoClient,
479
+ clientConfig: init.clientConfig,
480
+ parentClientConfig: init.parentClientConfig,
481
+ callerClientConfig: init.callerClientConfig,
482
+ profile: profileName,
483
+ filepath: init.filepath,
484
+ configFilepath: init.configFilepath,
485
+ ignoreCache: init.ignoreCache,
486
+ logger: init.logger,
487
+ });
359
488
  }
360
- }
361
- exports.SSOServiceException = SSOServiceException;
489
+ else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
490
+ throw new propertyProvider.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " +
491
+ '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
492
+ }
493
+ else {
494
+ return resolveSSOCredentials({
495
+ ssoStartUrl,
496
+ ssoSession,
497
+ ssoAccountId,
498
+ ssoRegion,
499
+ ssoRoleName,
500
+ ssoClient,
501
+ clientConfig: init.clientConfig,
502
+ parentClientConfig: init.parentClientConfig,
503
+ callerClientConfig: init.callerClientConfig,
504
+ profile: profileName,
505
+ filepath: init.filepath,
506
+ configFilepath: init.configFilepath,
507
+ ignoreCache: init.ignoreCache,
508
+ logger: init.logger,
509
+ });
510
+ }
511
+ };
512
+
513
+ exports.fromSSO = fromSSO;
514
+ __webpack_unused_export__ = isSsoProfile;
515
+ __webpack_unused_export__ = validateSsoProfile;
362
516
 
363
517
 
364
518
  /***/ }),
365
519
 
366
- /***/ 2378:
520
+ /***/ 1853:
367
521
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
368
522
 
369
523
 
370
- Object.defineProperty(exports, "__esModule", ({ value: true }));
371
- exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = void 0;
372
- const SSOServiceException_1 = __webpack_require__(7330);
373
- class InvalidRequestException extends SSOServiceException_1.SSOServiceException {
374
- name = "InvalidRequestException";
375
- $fault = "client";
376
- constructor(opts) {
377
- super({
378
- name: "InvalidRequestException",
379
- $fault: "client",
380
- ...opts,
381
- });
382
- Object.setPrototypeOf(this, InvalidRequestException.prototype);
383
- }
384
- }
385
- exports.InvalidRequestException = InvalidRequestException;
386
- class ResourceNotFoundException extends SSOServiceException_1.SSOServiceException {
387
- name = "ResourceNotFoundException";
388
- $fault = "client";
389
- constructor(opts) {
390
- super({
391
- name: "ResourceNotFoundException",
392
- $fault: "client",
393
- ...opts,
394
- });
395
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
396
- }
397
- }
398
- exports.ResourceNotFoundException = ResourceNotFoundException;
399
- class TooManyRequestsException extends SSOServiceException_1.SSOServiceException {
400
- name = "TooManyRequestsException";
401
- $fault = "client";
402
- constructor(opts) {
403
- super({
404
- name: "TooManyRequestsException",
405
- $fault: "client",
406
- ...opts,
407
- });
408
- Object.setPrototypeOf(this, TooManyRequestsException.prototype);
409
- }
410
- }
411
- exports.TooManyRequestsException = TooManyRequestsException;
412
- class UnauthorizedException extends SSOServiceException_1.SSOServiceException {
413
- name = "UnauthorizedException";
414
- $fault = "client";
415
- constructor(opts) {
416
- super({
417
- name: "UnauthorizedException",
418
- $fault: "client",
419
- ...opts,
420
- });
421
- Object.setPrototypeOf(this, UnauthorizedException.prototype);
422
- }
423
- }
424
- exports.UnauthorizedException = UnauthorizedException;
524
+
525
+ var sso = __webpack_require__(2579);
526
+
527
+
528
+
529
+ exports.GetRoleCredentialsCommand = sso.GetRoleCredentialsCommand;
530
+ exports.SSOClient = sso.SSOClient;
425
531
 
426
532
 
427
533
  /***/ }),
428
534
 
429
- /***/ 2696:
535
+ /***/ 7452:
430
536
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
431
537
 
432
538
 
433
539
  Object.defineProperty(exports, "__esModule", ({ value: true }));
434
- exports.getRuntimeConfig = void 0;
435
- const tslib_1 = __webpack_require__(1860);
436
- const package_json_1 = tslib_1.__importDefault(__webpack_require__(5188));
540
+ exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0;
437
541
  const core_1 = __webpack_require__(8704);
438
- const util_user_agent_node_1 = __webpack_require__(1656);
439
- const config_resolver_1 = __webpack_require__(9316);
440
- const hash_node_1 = __webpack_require__(5092);
441
- const middleware_retry_1 = __webpack_require__(9618);
442
- const node_config_provider_1 = __webpack_require__(5704);
443
- const node_http_handler_1 = __webpack_require__(1279);
444
- const smithy_client_1 = __webpack_require__(1411);
445
- const util_body_length_node_1 = __webpack_require__(3638);
446
- const util_defaults_mode_node_1 = __webpack_require__(5435);
447
- const util_retry_1 = __webpack_require__(5518);
448
- const runtimeConfig_shared_1 = __webpack_require__(8073);
449
- const getRuntimeConfig = (config) => {
450
- (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
451
- const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
452
- const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
453
- const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
454
- (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
455
- const loaderConfig = {
456
- profile: config?.profile,
457
- logger: clientSharedValues.logger,
542
+ const util_middleware_1 = __webpack_require__(6324);
543
+ const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
544
+ return {
545
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
546
+ region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
547
+ (() => {
548
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
549
+ })(),
458
550
  };
551
+ };
552
+ exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;
553
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
459
554
  return {
460
- ...clientSharedValues,
461
- ...config,
462
- runtime: "node",
463
- defaultsMode,
464
- authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
465
- bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
466
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
467
- maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
468
- region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
469
- requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
470
- retryMode: config?.retryMode ??
471
- (0, node_config_provider_1.loadConfig)({
472
- ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
473
- default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
474
- }, config),
475
- sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
476
- streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
477
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
478
- useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
479
- userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
555
+ schemeId: "aws.auth#sigv4",
556
+ signingProperties: {
557
+ name: "awsssoportal",
558
+ region: authParameters.region,
559
+ },
560
+ propertiesExtractor: (config, context) => ({
561
+ signingProperties: {
562
+ config,
563
+ context,
564
+ },
565
+ }),
480
566
  };
567
+ }
568
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
569
+ return {
570
+ schemeId: "smithy.api#noAuth",
571
+ };
572
+ }
573
+ const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
574
+ const options = [];
575
+ switch (authParameters.operation) {
576
+ case "GetRoleCredentials": {
577
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
578
+ break;
579
+ }
580
+ default: {
581
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
582
+ }
583
+ }
584
+ return options;
481
585
  };
482
- exports.getRuntimeConfig = getRuntimeConfig;
586
+ exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;
587
+ const resolveHttpAuthSchemeConfig = (config) => {
588
+ const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
589
+ return Object.assign(config_0, {
590
+ authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
591
+ });
592
+ };
593
+ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
483
594
 
484
595
 
485
596
  /***/ }),
486
597
 
487
- /***/ 8073:
598
+ /***/ 5074:
488
599
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
489
600
 
490
601
 
491
602
  Object.defineProperty(exports, "__esModule", ({ value: true }));
492
- exports.getRuntimeConfig = void 0;
493
- const core_1 = __webpack_require__(8704);
494
- const protocols_1 = __webpack_require__(7288);
495
- const core_2 = __webpack_require__(402);
496
- const smithy_client_1 = __webpack_require__(1411);
497
- const url_parser_1 = __webpack_require__(4494);
498
- const util_base64_1 = __webpack_require__(8385);
499
- const util_utf8_1 = __webpack_require__(1577);
500
- const httpAuthSchemeProvider_1 = __webpack_require__(2041);
501
- const endpointResolver_1 = __webpack_require__(3903);
502
- const schemas_0_1 = __webpack_require__(1382);
503
- const getRuntimeConfig = (config) => {
504
- return {
505
- apiVersion: "2019-06-10",
506
- base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
507
- base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
508
- disableHostPrefix: config?.disableHostPrefix ?? false,
509
- endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
510
- extensions: config?.extensions ?? [],
511
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,
512
- httpAuthSchemes: config?.httpAuthSchemes ?? [
513
- {
514
- schemeId: "aws.auth#sigv4",
515
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
516
- signer: new core_1.AwsSdkSigV4Signer(),
517
- },
518
- {
519
- schemeId: "smithy.api#noAuth",
520
- identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
521
- signer: new core_2.NoAuthSigner(),
522
- },
523
- ],
524
- logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
525
- protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
526
- protocolSettings: config?.protocolSettings ?? {
527
- defaultNamespace: "com.amazonaws.sso",
528
- errorTypeRegistries: schemas_0_1.errorTypeRegistries,
529
- version: "2019-06-10",
530
- serviceTarget: "SWBPortalService",
531
- },
532
- serviceId: config?.serviceId ?? "SSO",
533
- urlParser: config?.urlParser ?? url_parser_1.parseUrl,
534
- utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
535
- utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
536
- };
603
+ exports.defaultEndpointResolver = void 0;
604
+ const util_endpoints_1 = __webpack_require__(3068);
605
+ const util_endpoints_2 = __webpack_require__(9674);
606
+ const ruleset_1 = __webpack_require__(203);
607
+ const cache = new util_endpoints_2.EndpointCache({
608
+ size: 50,
609
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
610
+ });
611
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
612
+ return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
613
+ endpointParams: endpointParams,
614
+ logger: context.logger,
615
+ }));
537
616
  };
538
- exports.getRuntimeConfig = getRuntimeConfig;
617
+ exports.defaultEndpointResolver = defaultEndpointResolver;
618
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
539
619
 
540
620
 
541
621
  /***/ }),
542
622
 
543
- /***/ 1382:
544
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
623
+ /***/ 203:
624
+ /***/ ((__unused_webpack_module, exports) => {
545
625
 
546
626
 
547
627
  Object.defineProperty(exports, "__esModule", ({ value: true }));
548
- exports.Logout$ = exports.ListAccounts$ = exports.ListAccountRoles$ = exports.GetRoleCredentials$ = exports.RoleInfo$ = exports.RoleCredentials$ = exports.LogoutRequest$ = exports.ListAccountsResponse$ = exports.ListAccountsRequest$ = exports.ListAccountRolesResponse$ = exports.ListAccountRolesRequest$ = exports.GetRoleCredentialsResponse$ = exports.GetRoleCredentialsRequest$ = exports.AccountInfo$ = exports.errorTypeRegistries = exports.UnauthorizedException$ = exports.TooManyRequestsException$ = exports.ResourceNotFoundException$ = exports.InvalidRequestException$ = exports.SSOServiceException$ = void 0;
549
- const _AI = "AccountInfo";
550
- const _ALT = "AccountListType";
551
- const _ATT = "AccessTokenType";
552
- const _GRC = "GetRoleCredentials";
553
- const _GRCR = "GetRoleCredentialsRequest";
554
- const _GRCRe = "GetRoleCredentialsResponse";
555
- const _IRE = "InvalidRequestException";
556
- const _L = "Logout";
557
- const _LA = "ListAccounts";
558
- const _LAR = "ListAccountsRequest";
559
- const _LARR = "ListAccountRolesRequest";
560
- const _LARRi = "ListAccountRolesResponse";
561
- const _LARi = "ListAccountsResponse";
562
- const _LARis = "ListAccountRoles";
563
- const _LR = "LogoutRequest";
564
- const _RC = "RoleCredentials";
565
- const _RI = "RoleInfo";
566
- const _RLT = "RoleListType";
567
- const _RNFE = "ResourceNotFoundException";
568
- const _SAKT = "SecretAccessKeyType";
569
- const _STT = "SessionTokenType";
570
- const _TMRE = "TooManyRequestsException";
571
- const _UE = "UnauthorizedException";
572
- const _aI = "accountId";
573
- const _aKI = "accessKeyId";
574
- const _aL = "accountList";
575
- const _aN = "accountName";
576
- const _aT = "accessToken";
577
- const _ai = "account_id";
578
- const _c = "client";
579
- const _e = "error";
580
- const _eA = "emailAddress";
581
- const _ex = "expiration";
582
- const _h = "http";
583
- const _hE = "httpError";
584
- const _hH = "httpHeader";
585
- const _hQ = "httpQuery";
586
- const _m = "message";
587
- const _mR = "maxResults";
588
- const _mr = "max_result";
589
- const _nT = "nextToken";
590
- const _nt = "next_token";
591
- const _rC = "roleCredentials";
592
- const _rL = "roleList";
593
- const _rN = "roleName";
594
- const _rn = "role_name";
595
- const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
596
- const _sAK = "secretAccessKey";
597
- const _sT = "sessionToken";
598
- const _xasbt = "x-amz-sso_bearer_token";
599
- const n0 = "com.amazonaws.sso";
600
- const schema_1 = __webpack_require__(6890);
601
- const errors_1 = __webpack_require__(2378);
602
- const SSOServiceException_1 = __webpack_require__(7330);
603
- const _s_registry = schema_1.TypeRegistry.for(_s);
604
- exports.SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
605
- _s_registry.registerError(exports.SSOServiceException$, SSOServiceException_1.SSOServiceException);
606
- const n0_registry = schema_1.TypeRegistry.for(n0);
607
- exports.InvalidRequestException$ = [-3, n0, _IRE,
608
- { [_e]: _c, [_hE]: 400 },
609
- [_m],
610
- [0]
611
- ];
612
- n0_registry.registerError(exports.InvalidRequestException$, errors_1.InvalidRequestException);
613
- exports.ResourceNotFoundException$ = [-3, n0, _RNFE,
614
- { [_e]: _c, [_hE]: 404 },
615
- [_m],
616
- [0]
617
- ];
618
- n0_registry.registerError(exports.ResourceNotFoundException$, errors_1.ResourceNotFoundException);
619
- exports.TooManyRequestsException$ = [-3, n0, _TMRE,
620
- { [_e]: _c, [_hE]: 429 },
621
- [_m],
622
- [0]
623
- ];
624
- n0_registry.registerError(exports.TooManyRequestsException$, errors_1.TooManyRequestsException);
625
- exports.UnauthorizedException$ = [-3, n0, _UE,
626
- { [_e]: _c, [_hE]: 401 },
627
- [_m],
628
- [0]
629
- ];
630
- n0_registry.registerError(exports.UnauthorizedException$, errors_1.UnauthorizedException);
631
- exports.errorTypeRegistries = [
632
- _s_registry,
633
- n0_registry,
634
- ];
635
- var AccessTokenType = [0, n0, _ATT, 8, 0];
636
- var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
637
- var SessionTokenType = [0, n0, _STT, 8, 0];
638
- exports.AccountInfo$ = [3, n0, _AI,
639
- 0,
640
- [_aI, _aN, _eA],
641
- [0, 0, 0]
642
- ];
643
- exports.GetRoleCredentialsRequest$ = [3, n0, _GRCR,
644
- 0,
645
- [_rN, _aI, _aT],
646
- [[0, { [_hQ]: _rn }], [0, { [_hQ]: _ai }], [() => AccessTokenType, { [_hH]: _xasbt }]], 3
647
- ];
648
- exports.GetRoleCredentialsResponse$ = [3, n0, _GRCRe,
649
- 0,
650
- [_rC],
651
- [[() => exports.RoleCredentials$, 0]]
652
- ];
653
- exports.ListAccountRolesRequest$ = [3, n0, _LARR,
654
- 0,
655
- [_aT, _aI, _nT, _mR],
656
- [[() => AccessTokenType, { [_hH]: _xasbt }], [0, { [_hQ]: _ai }], [0, { [_hQ]: _nt }], [1, { [_hQ]: _mr }]], 2
657
- ];
658
- exports.ListAccountRolesResponse$ = [3, n0, _LARRi,
659
- 0,
660
- [_nT, _rL],
661
- [0, () => RoleListType]
662
- ];
663
- exports.ListAccountsRequest$ = [3, n0, _LAR,
664
- 0,
665
- [_aT, _nT, _mR],
666
- [[() => AccessTokenType, { [_hH]: _xasbt }], [0, { [_hQ]: _nt }], [1, { [_hQ]: _mr }]], 1
667
- ];
668
- exports.ListAccountsResponse$ = [3, n0, _LARi,
669
- 0,
670
- [_nT, _aL],
671
- [0, () => AccountListType]
672
- ];
673
- exports.LogoutRequest$ = [3, n0, _LR,
674
- 0,
675
- [_aT],
676
- [[() => AccessTokenType, { [_hH]: _xasbt }]], 1
677
- ];
678
- exports.RoleCredentials$ = [3, n0, _RC,
679
- 0,
680
- [_aKI, _sAK, _sT, _ex],
681
- [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1]
682
- ];
683
- exports.RoleInfo$ = [3, n0, _RI,
684
- 0,
685
- [_rN, _aI],
686
- [0, 0]
687
- ];
688
- var __Unit = "unit";
689
- var AccountListType = [1, n0, _ALT,
690
- 0, () => exports.AccountInfo$
691
- ];
692
- var RoleListType = [1, n0, _RLT,
693
- 0, () => exports.RoleInfo$
694
- ];
695
- exports.GetRoleCredentials$ = [9, n0, _GRC,
696
- { [_h]: ["GET", "/federation/credentials", 200] }, () => exports.GetRoleCredentialsRequest$, () => exports.GetRoleCredentialsResponse$
697
- ];
698
- exports.ListAccountRoles$ = [9, n0, _LARis,
699
- { [_h]: ["GET", "/assignment/roles", 200] }, () => exports.ListAccountRolesRequest$, () => exports.ListAccountRolesResponse$
700
- ];
701
- exports.ListAccounts$ = [9, n0, _LA,
702
- { [_h]: ["GET", "/assignment/accounts", 200] }, () => exports.ListAccountsRequest$, () => exports.ListAccountsResponse$
703
- ];
704
- exports.Logout$ = [9, n0, _L,
705
- { [_h]: ["POST", "/logout", 200] }, () => exports.LogoutRequest$, () => __Unit
706
- ];
628
+ exports.ruleSet = void 0;
629
+ const u = "required", v = "fn", w = "argv", x = "ref";
630
+ const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, type: "string" }, j = { [u]: true, default: false, type: "boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
631
+ const _data = {
632
+ version: "1.0",
633
+ parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i },
634
+ rules: [
635
+ {
636
+ conditions: [{ [v]: b, [w]: [k] }],
637
+ rules: [
638
+ { conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d },
639
+ { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d },
640
+ { endpoint: { url: k, properties: n, headers: n }, type: e },
641
+ ],
642
+ type: f,
643
+ },
644
+ {
645
+ conditions: [{ [v]: b, [w]: t }],
646
+ rules: [
647
+ {
648
+ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }],
649
+ rules: [
650
+ {
651
+ conditions: [l, m],
652
+ rules: [
653
+ {
654
+ conditions: [{ [v]: c, [w]: [a, o] }, q],
655
+ rules: [
656
+ {
657
+ endpoint: {
658
+ url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
659
+ properties: n,
660
+ headers: n,
661
+ },
662
+ type: e,
663
+ },
664
+ ],
665
+ type: f,
666
+ },
667
+ { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d },
668
+ ],
669
+ type: f,
670
+ },
671
+ {
672
+ conditions: r,
673
+ rules: [
674
+ {
675
+ conditions: [{ [v]: c, [w]: [o, a] }],
676
+ rules: [
677
+ {
678
+ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }],
679
+ endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n },
680
+ type: e,
681
+ },
682
+ {
683
+ endpoint: {
684
+ url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",
685
+ properties: n,
686
+ headers: n,
687
+ },
688
+ type: e,
689
+ },
690
+ ],
691
+ type: f,
692
+ },
693
+ { error: "FIPS is enabled but this partition does not support FIPS", type: d },
694
+ ],
695
+ type: f,
696
+ },
697
+ {
698
+ conditions: s,
699
+ rules: [
700
+ {
701
+ conditions: [q],
702
+ rules: [
703
+ {
704
+ endpoint: {
705
+ url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",
706
+ properties: n,
707
+ headers: n,
708
+ },
709
+ type: e,
710
+ },
711
+ ],
712
+ type: f,
713
+ },
714
+ { error: "DualStack is enabled but this partition does not support DualStack", type: d },
715
+ ],
716
+ type: f,
717
+ },
718
+ {
719
+ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n },
720
+ type: e,
721
+ },
722
+ ],
723
+ type: f,
724
+ },
725
+ ],
726
+ type: f,
727
+ },
728
+ { error: "Invalid Configuration: Missing Region", type: d },
729
+ ],
730
+ };
731
+ exports.ruleSet = _data;
707
732
 
708
733
 
709
734
  /***/ }),
710
735
 
711
- /***/ 7523:
736
+ /***/ 2579:
712
737
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
713
738
 
714
739
 
715
740
 
716
- var protocolHttp = __webpack_require__(2356);
741
+ var middlewareHostHeader = __webpack_require__(2590);
742
+ var middlewareLogger = __webpack_require__(5242);
743
+ var middlewareRecursionDetection = __webpack_require__(1568);
744
+ var middlewareUserAgent = __webpack_require__(2959);
745
+ var configResolver = __webpack_require__(9316);
717
746
  var core = __webpack_require__(402);
718
- var propertyProvider = __webpack_require__(1238);
719
- var client = __webpack_require__(5152);
720
- var signatureV4 = __webpack_require__(5118);
721
-
722
- const getDateHeader = (response) => protocolHttp.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;
747
+ var schema = __webpack_require__(6890);
748
+ var middlewareContentLength = __webpack_require__(7212);
749
+ var middlewareEndpoint = __webpack_require__(99);
750
+ var middlewareRetry = __webpack_require__(9618);
751
+ var smithyClient = __webpack_require__(1411);
752
+ var httpAuthSchemeProvider = __webpack_require__(7452);
753
+ var runtimeConfig = __webpack_require__(5541);
754
+ var regionConfigResolver = __webpack_require__(6463);
755
+ var protocolHttp = __webpack_require__(2356);
756
+ var schemas_0 = __webpack_require__(2167);
757
+ var errors = __webpack_require__(4483);
758
+ var SSOServiceException = __webpack_require__(9849);
723
759
 
724
- const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
760
+ const resolveClientEndpointParameters = (options) => {
761
+ return Object.assign(options, {
762
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
763
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
764
+ defaultSigningName: "awsssoportal",
765
+ });
766
+ };
767
+ const commonParams = {
768
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
769
+ Endpoint: { type: "builtInParams", name: "endpoint" },
770
+ Region: { type: "builtInParams", name: "region" },
771
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
772
+ };
725
773
 
726
- const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;
727
-
728
- const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {
729
- const clockTimeInMs = Date.parse(clockTime);
730
- if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
731
- return clockTimeInMs - Date.now();
732
- }
733
- return currentSystemClockOffset;
734
- };
735
-
736
- const throwSigningPropertyError = (name, property) => {
737
- if (!property) {
738
- throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
739
- }
740
- return property;
774
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
775
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
776
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
777
+ let _credentials = runtimeConfig.credentials;
778
+ return {
779
+ setHttpAuthScheme(httpAuthScheme) {
780
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
781
+ if (index === -1) {
782
+ _httpAuthSchemes.push(httpAuthScheme);
783
+ }
784
+ else {
785
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
786
+ }
787
+ },
788
+ httpAuthSchemes() {
789
+ return _httpAuthSchemes;
790
+ },
791
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
792
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
793
+ },
794
+ httpAuthSchemeProvider() {
795
+ return _httpAuthSchemeProvider;
796
+ },
797
+ setCredentials(credentials) {
798
+ _credentials = credentials;
799
+ },
800
+ credentials() {
801
+ return _credentials;
802
+ },
803
+ };
741
804
  };
742
- const validateSigningProperties = async (signingProperties) => {
743
- const context = throwSigningPropertyError("context", signingProperties.context);
744
- const config = throwSigningPropertyError("config", signingProperties.config);
745
- const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
746
- const signerFunction = throwSigningPropertyError("signer", config.signer);
747
- const signer = await signerFunction(authScheme);
748
- const signingRegion = signingProperties?.signingRegion;
749
- const signingRegionSet = signingProperties?.signingRegionSet;
750
- const signingName = signingProperties?.signingName;
805
+ const resolveHttpAuthRuntimeConfig = (config) => {
751
806
  return {
752
- config,
753
- signer,
754
- signingRegion,
755
- signingRegionSet,
756
- signingName,
807
+ httpAuthSchemes: config.httpAuthSchemes(),
808
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
809
+ credentials: config.credentials(),
757
810
  };
758
811
  };
759
- class AwsSdkSigV4Signer {
760
- async sign(httpRequest, identity, signingProperties) {
761
- if (!protocolHttp.HttpRequest.isInstance(httpRequest)) {
762
- throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
763
- }
764
- const validatedProps = await validateSigningProperties(signingProperties);
765
- const { config, signer } = validatedProps;
766
- let { signingRegion, signingName } = validatedProps;
767
- const handlerExecutionContext = signingProperties.context;
768
- if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {
769
- const [first, second] = handlerExecutionContext.authSchemes;
770
- if (first?.name === "sigv4a" && second?.name === "sigv4") {
771
- signingRegion = second?.signingRegion ?? signingRegion;
772
- signingName = second?.signingName ?? signingName;
773
- }
774
- }
775
- const signedRequest = await signer.sign(httpRequest, {
776
- signingDate: getSkewCorrectedDate(config.systemClockOffset),
777
- signingRegion: signingRegion,
778
- signingService: signingName,
779
- });
780
- return signedRequest;
781
- }
782
- errorHandler(signingProperties) {
783
- return (error) => {
784
- const serverTime = error.ServerTime ?? getDateHeader(error.$response);
785
- if (serverTime) {
786
- const config = throwSigningPropertyError("config", signingProperties.config);
787
- const initialSystemClockOffset = config.systemClockOffset;
788
- config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
789
- const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;
790
- if (clockSkewCorrected && error.$metadata) {
791
- error.$metadata.clockSkewCorrected = true;
792
- }
793
- }
794
- throw error;
795
- };
812
+
813
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
814
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
815
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
816
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
817
+ };
818
+
819
+ class SSOClient extends smithyClient.Client {
820
+ config;
821
+ constructor(...[configuration]) {
822
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
823
+ super(_config_0);
824
+ this.initConfig = _config_0;
825
+ const _config_1 = resolveClientEndpointParameters(_config_0);
826
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
827
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
828
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
829
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
830
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
831
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
832
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
833
+ this.config = _config_8;
834
+ this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
835
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
836
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
837
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
838
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
839
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
840
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
841
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
842
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider,
843
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
844
+ "aws.auth#sigv4": config.credentials,
845
+ }),
846
+ }));
847
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
796
848
  }
797
- successHandler(httpResponse, signingProperties) {
798
- const dateHeader = getDateHeader(httpResponse);
799
- if (dateHeader) {
800
- const config = throwSigningPropertyError("config", signingProperties.config);
801
- config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
802
- }
849
+ destroy() {
850
+ super.destroy();
803
851
  }
804
852
  }
805
- const AWSSDKSigV4Signer = AwsSdkSigV4Signer;
806
853
 
807
- class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {
808
- async sign(httpRequest, identity, signingProperties) {
809
- if (!protocolHttp.HttpRequest.isInstance(httpRequest)) {
810
- throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
811
- }
812
- const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);
813
- const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();
814
- const multiRegionOverride = (configResolvedSigningRegionSet ??
815
- signingRegionSet ?? [signingRegion]).join(",");
816
- const signedRequest = await signer.sign(httpRequest, {
817
- signingDate: getSkewCorrectedDate(config.systemClockOffset),
818
- signingRegion: multiRegionOverride,
819
- signingService: signingName,
820
- });
821
- return signedRequest;
822
- }
854
+ class GetRoleCredentialsCommand extends smithyClient.Command
855
+ .classBuilder()
856
+ .ep(commonParams)
857
+ .m(function (Command, cs, config, o) {
858
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
859
+ })
860
+ .s("SWBPortalService", "GetRoleCredentials", {})
861
+ .n("SSOClient", "GetRoleCredentialsCommand")
862
+ .sc(schemas_0.GetRoleCredentials$)
863
+ .build() {
823
864
  }
824
865
 
825
- const getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : [];
826
-
827
- const getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`;
828
-
829
- const NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE";
830
- const NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference";
831
- const NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {
832
- environmentVariableSelector: (env, options) => {
833
- if (options?.signingName) {
834
- const bearerTokenKey = getBearerTokenEnvKey(options.signingName);
835
- if (bearerTokenKey in env)
836
- return ["httpBearerAuth"];
837
- }
838
- if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env))
839
- return undefined;
840
- return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
841
- },
842
- configFileSelector: (profile) => {
843
- if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))
844
- return undefined;
845
- return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);
846
- },
847
- default: [],
866
+ const commands = {
867
+ GetRoleCredentialsCommand,
848
868
  };
869
+ class SSO extends SSOClient {
870
+ }
871
+ smithyClient.createAggregatedClient(commands, SSO);
849
872
 
850
- const resolveAwsSdkSigV4AConfig = (config) => {
851
- config.sigv4aSigningRegionSet = core.normalizeProvider(config.sigv4aSigningRegionSet);
852
- return config;
853
- };
854
- const NODE_SIGV4A_CONFIG_OPTIONS = {
855
- environmentVariableSelector(env) {
856
- if (env.AWS_SIGV4A_SIGNING_REGION_SET) {
857
- return env.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim());
858
- }
859
- throw new propertyProvider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", {
860
- tryNextLink: true,
861
- });
862
- },
863
- configFileSelector(profile) {
864
- if (profile.sigv4a_signing_region_set) {
865
- return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim());
866
- }
867
- throw new propertyProvider.ProviderError("sigv4a_signing_region_set not set in profile.", {
868
- tryNextLink: true,
869
- });
870
- },
871
- default: undefined,
872
- };
873
+ exports.$Command = smithyClient.Command;
874
+ exports.__Client = smithyClient.Client;
875
+ exports.SSOServiceException = SSOServiceException.SSOServiceException;
876
+ exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
877
+ exports.SSO = SSO;
878
+ exports.SSOClient = SSOClient;
879
+ Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
880
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
881
+ Object.defineProperty(exports, '__proto__', {
882
+ enumerable: true,
883
+ value: schemas_0['__proto__']
884
+ });
873
885
 
874
- const resolveAwsSdkSigV4Config = (config) => {
875
- let inputCredentials = config.credentials;
876
- let isUserSupplied = !!config.credentials;
877
- let resolvedCredentials = undefined;
878
- Object.defineProperty(config, "credentials", {
879
- set(credentials) {
880
- if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {
881
- isUserSupplied = true;
882
- }
883
- inputCredentials = credentials;
884
- const memoizedProvider = normalizeCredentialProvider(config, {
885
- credentials: inputCredentials,
886
- credentialDefaultProvider: config.credentialDefaultProvider,
887
- });
888
- const boundProvider = bindCallerConfig(config, memoizedProvider);
889
- if (isUserSupplied && !boundProvider.attributed) {
890
- const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null;
891
- resolvedCredentials = async (options) => {
892
- const creds = await boundProvider(options);
893
- const attributedCreds = creds;
894
- if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {
895
- return client.setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e");
896
- }
897
- return attributedCreds;
898
- };
899
- resolvedCredentials.memoized = boundProvider.memoized;
900
- resolvedCredentials.configBound = boundProvider.configBound;
901
- resolvedCredentials.attributed = true;
902
- }
903
- else {
904
- resolvedCredentials = boundProvider;
905
- }
906
- },
907
- get() {
908
- return resolvedCredentials;
909
- },
910
- enumerable: true,
911
- configurable: true,
912
- });
913
- config.credentials = inputCredentials;
914
- const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config;
915
- let signer;
916
- if (config.signer) {
917
- signer = core.normalizeProvider(config.signer);
918
- }
919
- else if (config.regionInfoProvider) {
920
- signer = () => core.normalizeProvider(config.region)()
921
- .then(async (region) => [
922
- (await config.regionInfoProvider(region, {
923
- useFipsEndpoint: await config.useFipsEndpoint(),
924
- useDualstackEndpoint: await config.useDualstackEndpoint(),
925
- })) || {},
926
- region,
927
- ])
928
- .then(([regionInfo, region]) => {
929
- const { signingRegion, signingService } = regionInfo;
930
- config.signingRegion = config.signingRegion || signingRegion || region;
931
- config.signingName = config.signingName || signingService || config.serviceId;
932
- const params = {
933
- ...config,
934
- credentials: config.credentials,
935
- region: config.signingRegion,
936
- service: config.signingName,
937
- sha256,
938
- uriEscapePath: signingEscapePath,
939
- };
940
- const SignerCtor = config.signerConstructor || signatureV4.SignatureV4;
941
- return new SignerCtor(params);
942
- });
943
- }
944
- else {
945
- signer = async (authScheme) => {
946
- authScheme = Object.assign({}, {
947
- name: "sigv4",
948
- signingName: config.signingName || config.defaultSigningName,
949
- signingRegion: await core.normalizeProvider(config.region)(),
950
- properties: {},
951
- }, authScheme);
952
- const signingRegion = authScheme.signingRegion;
953
- const signingService = authScheme.signingName;
954
- config.signingRegion = config.signingRegion || signingRegion;
955
- config.signingName = config.signingName || signingService || config.serviceId;
956
- const params = {
957
- ...config,
958
- credentials: config.credentials,
959
- region: config.signingRegion,
960
- service: config.signingName,
961
- sha256,
962
- uriEscapePath: signingEscapePath,
963
- };
964
- const SignerCtor = config.signerConstructor || signatureV4.SignatureV4;
965
- return new SignerCtor(params);
966
- };
967
- }
968
- const resolvedConfig = Object.assign(config, {
969
- systemClockOffset,
970
- signingEscapePath,
971
- signer,
972
- });
973
- return resolvedConfig;
974
- };
975
- const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;
976
- function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider, }) {
977
- let credentialsProvider;
978
- if (credentials) {
979
- if (!credentials?.memoized) {
980
- credentialsProvider = core.memoizeIdentityProvider(credentials, core.isIdentityExpired, core.doesIdentityRequireRefresh);
981
- }
982
- else {
983
- credentialsProvider = credentials;
984
- }
985
- }
986
- else {
987
- if (credentialDefaultProvider) {
988
- credentialsProvider = core.normalizeProvider(credentialDefaultProvider(Object.assign({}, config, {
989
- parentClientConfig: config,
990
- })));
991
- }
992
- else {
993
- credentialsProvider = async () => {
994
- throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.");
995
- };
996
- }
997
- }
998
- credentialsProvider.memoized = true;
999
- return credentialsProvider;
1000
- }
1001
- function bindCallerConfig(config, credentialsProvider) {
1002
- if (credentialsProvider.configBound) {
1003
- return credentialsProvider;
1004
- }
1005
- const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });
1006
- fn.memoized = credentialsProvider.memoized;
1007
- fn.configBound = true;
1008
- return fn;
1009
- }
1010
-
1011
- exports.AWSSDKSigV4Signer = AWSSDKSigV4Signer;
1012
- exports.AwsSdkSigV4ASigner = AwsSdkSigV4ASigner;
1013
- exports.AwsSdkSigV4Signer = AwsSdkSigV4Signer;
1014
- exports.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = NODE_AUTH_SCHEME_PREFERENCE_OPTIONS;
1015
- exports.NODE_SIGV4A_CONFIG_OPTIONS = NODE_SIGV4A_CONFIG_OPTIONS;
1016
- exports.getBearerTokenEnvKey = getBearerTokenEnvKey;
1017
- exports.resolveAWSSDKSigV4Config = resolveAWSSDKSigV4Config;
1018
- exports.resolveAwsSdkSigV4AConfig = resolveAwsSdkSigV4AConfig;
1019
- exports.resolveAwsSdkSigV4Config = resolveAwsSdkSigV4Config;
1020
- exports.validateSigningProperties = validateSigningProperties;
1021
-
1022
-
1023
- /***/ }),
1024
-
1025
- /***/ 998:
1026
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1027
-
1028
- var __webpack_unused_export__;
1029
-
1030
-
1031
- var propertyProvider = __webpack_require__(1238);
1032
- var sharedIniFileLoader = __webpack_require__(4964);
1033
- var client = __webpack_require__(5152);
1034
- var tokenProviders = __webpack_require__(5433);
1035
-
1036
- const isSsoProfile = (arg) => arg &&
1037
- (typeof arg.sso_start_url === "string" ||
1038
- typeof arg.sso_account_id === "string" ||
1039
- typeof arg.sso_session === "string" ||
1040
- typeof arg.sso_region === "string" ||
1041
- typeof arg.sso_role_name === "string");
1042
-
1043
- const SHOULD_FAIL_CREDENTIAL_CHAIN = false;
1044
- const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {
1045
- let token;
1046
- const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
1047
- if (ssoSession) {
1048
- try {
1049
- const _token = await tokenProviders.fromSso({
1050
- profile,
1051
- filepath,
1052
- configFilepath,
1053
- ignoreCache,
1054
- })();
1055
- token = {
1056
- accessToken: _token.token,
1057
- expiresAt: new Date(_token.expiration).toISOString(),
1058
- };
1059
- }
1060
- catch (e) {
1061
- throw new propertyProvider.CredentialsProviderError(e.message, {
1062
- tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
1063
- logger,
1064
- });
1065
- }
1066
- }
1067
- else {
1068
- try {
1069
- token = await sharedIniFileLoader.getSSOTokenFromFile(ssoStartUrl);
1070
- }
1071
- catch (e) {
1072
- throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
1073
- tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
1074
- logger,
1075
- });
1076
- }
1077
- }
1078
- if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
1079
- throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
1080
- tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
1081
- logger,
1082
- });
1083
- }
1084
- const { accessToken } = token;
1085
- const { SSOClient, GetRoleCredentialsCommand } = await Promise.resolve().then(function () { return __webpack_require__(6553); });
1086
- const sso = ssoClient ||
1087
- new SSOClient(Object.assign({}, clientConfig ?? {}, {
1088
- logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,
1089
- region: clientConfig?.region ?? ssoRegion,
1090
- userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,
1091
- }));
1092
- let ssoResp;
1093
- try {
1094
- ssoResp = await sso.send(new GetRoleCredentialsCommand({
1095
- accountId: ssoAccountId,
1096
- roleName: ssoRoleName,
1097
- accessToken,
1098
- }));
1099
- }
1100
- catch (e) {
1101
- throw new propertyProvider.CredentialsProviderError(e, {
1102
- tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
1103
- logger,
1104
- });
1105
- }
1106
- const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;
1107
- if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
1108
- throw new propertyProvider.CredentialsProviderError("SSO returns an invalid temporary credential.", {
1109
- tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
1110
- logger,
1111
- });
1112
- }
1113
- const credentials = {
1114
- accessKeyId,
1115
- secretAccessKey,
1116
- sessionToken,
1117
- expiration: new Date(expiration),
1118
- ...(credentialScope && { credentialScope }),
1119
- ...(accountId && { accountId }),
1120
- };
1121
- if (ssoSession) {
1122
- client.setCredentialFeature(credentials, "CREDENTIALS_SSO", "s");
1123
- }
1124
- else {
1125
- client.setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u");
1126
- }
1127
- return credentials;
1128
- };
1129
-
1130
- const validateSsoProfile = (profile, logger) => {
1131
- const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
1132
- if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
1133
- throw new propertyProvider.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` +
1134
- `"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });
1135
- }
1136
- return profile;
1137
- };
1138
-
1139
- const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
1140
- init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
1141
- const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
1142
- const { ssoClient } = init;
1143
- const profileName = sharedIniFileLoader.getProfileName({
1144
- profile: init.profile ?? callerClientConfig?.profile,
1145
- });
1146
- if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
1147
- const profiles = await sharedIniFileLoader.parseKnownFiles(init);
1148
- const profile = profiles[profileName];
1149
- if (!profile) {
1150
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
1151
- }
1152
- if (!isSsoProfile(profile)) {
1153
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
1154
- logger: init.logger,
1155
- });
1156
- }
1157
- if (profile?.sso_session) {
1158
- const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);
1159
- const session = ssoSessions[profile.sso_session];
1160
- const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
1161
- if (ssoRegion && ssoRegion !== session.sso_region) {
1162
- throw new propertyProvider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
1163
- tryNextLink: false,
1164
- logger: init.logger,
1165
- });
1166
- }
1167
- if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
1168
- throw new propertyProvider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
1169
- tryNextLink: false,
1170
- logger: init.logger,
1171
- });
1172
- }
1173
- profile.sso_region = session.sso_region;
1174
- profile.sso_start_url = session.sso_start_url;
1175
- }
1176
- const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);
1177
- return resolveSSOCredentials({
1178
- ssoStartUrl: sso_start_url,
1179
- ssoSession: sso_session,
1180
- ssoAccountId: sso_account_id,
1181
- ssoRegion: sso_region,
1182
- ssoRoleName: sso_role_name,
1183
- ssoClient: ssoClient,
1184
- clientConfig: init.clientConfig,
1185
- parentClientConfig: init.parentClientConfig,
1186
- callerClientConfig: init.callerClientConfig,
1187
- profile: profileName,
1188
- filepath: init.filepath,
1189
- configFilepath: init.configFilepath,
1190
- ignoreCache: init.ignoreCache,
1191
- logger: init.logger,
886
+ Object.keys(schemas_0).forEach(function (k) {
887
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
888
+ });
889
+ Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
890
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
891
+ Object.defineProperty(exports, '__proto__', {
892
+ enumerable: true,
893
+ value: errors['__proto__']
894
+ });
895
+
896
+ Object.keys(errors).forEach(function (k) {
897
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
898
+ });
899
+
900
+
901
+ /***/ }),
902
+
903
+ /***/ 9849:
904
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
905
+
906
+
907
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
908
+ exports.SSOServiceException = exports.__ServiceException = void 0;
909
+ const smithy_client_1 = __webpack_require__(1411);
910
+ Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } }));
911
+ class SSOServiceException extends smithy_client_1.ServiceException {
912
+ constructor(options) {
913
+ super(options);
914
+ Object.setPrototypeOf(this, SSOServiceException.prototype);
915
+ }
916
+ }
917
+ exports.SSOServiceException = SSOServiceException;
918
+
919
+
920
+ /***/ }),
921
+
922
+ /***/ 4483:
923
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
924
+
925
+
926
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
927
+ exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = void 0;
928
+ const SSOServiceException_1 = __webpack_require__(9849);
929
+ class InvalidRequestException extends SSOServiceException_1.SSOServiceException {
930
+ name = "InvalidRequestException";
931
+ $fault = "client";
932
+ constructor(opts) {
933
+ super({
934
+ name: "InvalidRequestException",
935
+ $fault: "client",
936
+ ...opts,
1192
937
  });
938
+ Object.setPrototypeOf(this, InvalidRequestException.prototype);
1193
939
  }
1194
- else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
1195
- throw new propertyProvider.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " +
1196
- '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
940
+ }
941
+ exports.InvalidRequestException = InvalidRequestException;
942
+ class ResourceNotFoundException extends SSOServiceException_1.SSOServiceException {
943
+ name = "ResourceNotFoundException";
944
+ $fault = "client";
945
+ constructor(opts) {
946
+ super({
947
+ name: "ResourceNotFoundException",
948
+ $fault: "client",
949
+ ...opts,
950
+ });
951
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
1197
952
  }
1198
- else {
1199
- return resolveSSOCredentials({
1200
- ssoStartUrl,
1201
- ssoSession,
1202
- ssoAccountId,
1203
- ssoRegion,
1204
- ssoRoleName,
1205
- ssoClient,
1206
- clientConfig: init.clientConfig,
1207
- parentClientConfig: init.parentClientConfig,
1208
- callerClientConfig: init.callerClientConfig,
1209
- profile: profileName,
1210
- filepath: init.filepath,
1211
- configFilepath: init.configFilepath,
1212
- ignoreCache: init.ignoreCache,
1213
- logger: init.logger,
953
+ }
954
+ exports.ResourceNotFoundException = ResourceNotFoundException;
955
+ class TooManyRequestsException extends SSOServiceException_1.SSOServiceException {
956
+ name = "TooManyRequestsException";
957
+ $fault = "client";
958
+ constructor(opts) {
959
+ super({
960
+ name: "TooManyRequestsException",
961
+ $fault: "client",
962
+ ...opts,
1214
963
  });
964
+ Object.setPrototypeOf(this, TooManyRequestsException.prototype);
1215
965
  }
1216
- };
966
+ }
967
+ exports.TooManyRequestsException = TooManyRequestsException;
968
+ class UnauthorizedException extends SSOServiceException_1.SSOServiceException {
969
+ name = "UnauthorizedException";
970
+ $fault = "client";
971
+ constructor(opts) {
972
+ super({
973
+ name: "UnauthorizedException",
974
+ $fault: "client",
975
+ ...opts,
976
+ });
977
+ Object.setPrototypeOf(this, UnauthorizedException.prototype);
978
+ }
979
+ }
980
+ exports.UnauthorizedException = UnauthorizedException;
1217
981
 
1218
- exports.fromSSO = fromSSO;
1219
- __webpack_unused_export__ = isSsoProfile;
1220
- __webpack_unused_export__ = validateSsoProfile;
982
+
983
+ /***/ }),
984
+
985
+ /***/ 5541:
986
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
987
+
988
+
989
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
990
+ exports.getRuntimeConfig = void 0;
991
+ const tslib_1 = __webpack_require__(1860);
992
+ const package_json_1 = tslib_1.__importDefault(__webpack_require__(9955));
993
+ const core_1 = __webpack_require__(8704);
994
+ const util_user_agent_node_1 = __webpack_require__(1656);
995
+ const config_resolver_1 = __webpack_require__(9316);
996
+ const hash_node_1 = __webpack_require__(5092);
997
+ const middleware_retry_1 = __webpack_require__(9618);
998
+ const node_config_provider_1 = __webpack_require__(5704);
999
+ const node_http_handler_1 = __webpack_require__(1279);
1000
+ const smithy_client_1 = __webpack_require__(1411);
1001
+ const util_body_length_node_1 = __webpack_require__(3638);
1002
+ const util_defaults_mode_node_1 = __webpack_require__(5435);
1003
+ const util_retry_1 = __webpack_require__(5518);
1004
+ const runtimeConfig_shared_1 = __webpack_require__(3082);
1005
+ const getRuntimeConfig = (config) => {
1006
+ (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
1007
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
1008
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
1009
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
1010
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
1011
+ const loaderConfig = {
1012
+ profile: config?.profile,
1013
+ logger: clientSharedValues.logger,
1014
+ };
1015
+ return {
1016
+ ...clientSharedValues,
1017
+ ...config,
1018
+ runtime: "node",
1019
+ defaultsMode,
1020
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
1021
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
1022
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
1023
+ (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
1024
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
1025
+ region: config?.region ??
1026
+ (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
1027
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
1028
+ retryMode: config?.retryMode ??
1029
+ (0, node_config_provider_1.loadConfig)({
1030
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
1031
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
1032
+ }, config),
1033
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
1034
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
1035
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
1036
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
1037
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
1038
+ };
1039
+ };
1040
+ exports.getRuntimeConfig = getRuntimeConfig;
1221
1041
 
1222
1042
 
1223
1043
  /***/ }),
1224
1044
 
1225
- /***/ 6553:
1045
+ /***/ 3082:
1226
1046
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1227
1047
 
1228
1048
 
1049
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
1050
+ exports.getRuntimeConfig = void 0;
1051
+ const core_1 = __webpack_require__(8704);
1052
+ const protocols_1 = __webpack_require__(7288);
1053
+ const core_2 = __webpack_require__(402);
1054
+ const smithy_client_1 = __webpack_require__(1411);
1055
+ const url_parser_1 = __webpack_require__(4494);
1056
+ const util_base64_1 = __webpack_require__(8385);
1057
+ const util_utf8_1 = __webpack_require__(1577);
1058
+ const httpAuthSchemeProvider_1 = __webpack_require__(7452);
1059
+ const endpointResolver_1 = __webpack_require__(5074);
1060
+ const schemas_0_1 = __webpack_require__(2167);
1061
+ const getRuntimeConfig = (config) => {
1062
+ return {
1063
+ apiVersion: "2019-06-10",
1064
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
1065
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
1066
+ disableHostPrefix: config?.disableHostPrefix ?? false,
1067
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
1068
+ extensions: config?.extensions ?? [],
1069
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,
1070
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
1071
+ {
1072
+ schemeId: "aws.auth#sigv4",
1073
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
1074
+ signer: new core_1.AwsSdkSigV4Signer(),
1075
+ },
1076
+ {
1077
+ schemeId: "smithy.api#noAuth",
1078
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
1079
+ signer: new core_2.NoAuthSigner(),
1080
+ },
1081
+ ],
1082
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
1083
+ protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
1084
+ protocolSettings: config?.protocolSettings ?? {
1085
+ defaultNamespace: "com.amazonaws.sso",
1086
+ errorTypeRegistries: schemas_0_1.errorTypeRegistries,
1087
+ version: "2019-06-10",
1088
+ serviceTarget: "SWBPortalService",
1089
+ },
1090
+ serviceId: config?.serviceId ?? "SSO",
1091
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
1092
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
1093
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
1094
+ };
1095
+ };
1096
+ exports.getRuntimeConfig = getRuntimeConfig;
1097
+
1229
1098
 
1230
- var clientSso = __webpack_require__(2054);
1099
+ /***/ }),
1231
1100
 
1101
+ /***/ 2167:
1102
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1232
1103
 
1233
1104
 
1234
- Object.defineProperty(exports, "GetRoleCredentialsCommand", ({
1235
- enumerable: true,
1236
- get: function () { return clientSso.GetRoleCredentialsCommand; }
1237
- }));
1238
- Object.defineProperty(exports, "SSOClient", ({
1239
- enumerable: true,
1240
- get: function () { return clientSso.SSOClient; }
1241
- }));
1105
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
1106
+ exports.GetRoleCredentials$ = exports.RoleCredentials$ = exports.GetRoleCredentialsResponse$ = exports.GetRoleCredentialsRequest$ = exports.errorTypeRegistries = exports.UnauthorizedException$ = exports.TooManyRequestsException$ = exports.ResourceNotFoundException$ = exports.InvalidRequestException$ = exports.SSOServiceException$ = void 0;
1107
+ const _ATT = "AccessTokenType";
1108
+ const _GRC = "GetRoleCredentials";
1109
+ const _GRCR = "GetRoleCredentialsRequest";
1110
+ const _GRCRe = "GetRoleCredentialsResponse";
1111
+ const _IRE = "InvalidRequestException";
1112
+ const _RC = "RoleCredentials";
1113
+ const _RNFE = "ResourceNotFoundException";
1114
+ const _SAKT = "SecretAccessKeyType";
1115
+ const _STT = "SessionTokenType";
1116
+ const _TMRE = "TooManyRequestsException";
1117
+ const _UE = "UnauthorizedException";
1118
+ const _aI = "accountId";
1119
+ const _aKI = "accessKeyId";
1120
+ const _aT = "accessToken";
1121
+ const _ai = "account_id";
1122
+ const _c = "client";
1123
+ const _e = "error";
1124
+ const _ex = "expiration";
1125
+ const _h = "http";
1126
+ const _hE = "httpError";
1127
+ const _hH = "httpHeader";
1128
+ const _hQ = "httpQuery";
1129
+ const _m = "message";
1130
+ const _rC = "roleCredentials";
1131
+ const _rN = "roleName";
1132
+ const _rn = "role_name";
1133
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
1134
+ const _sAK = "secretAccessKey";
1135
+ const _sT = "sessionToken";
1136
+ const _xasbt = "x-amz-sso_bearer_token";
1137
+ const n0 = "com.amazonaws.sso";
1138
+ const schema_1 = __webpack_require__(6890);
1139
+ const errors_1 = __webpack_require__(4483);
1140
+ const SSOServiceException_1 = __webpack_require__(9849);
1141
+ const _s_registry = schema_1.TypeRegistry.for(_s);
1142
+ exports.SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
1143
+ _s_registry.registerError(exports.SSOServiceException$, SSOServiceException_1.SSOServiceException);
1144
+ const n0_registry = schema_1.TypeRegistry.for(n0);
1145
+ exports.InvalidRequestException$ = [-3, n0, _IRE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];
1146
+ n0_registry.registerError(exports.InvalidRequestException$, errors_1.InvalidRequestException);
1147
+ exports.ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];
1148
+ n0_registry.registerError(exports.ResourceNotFoundException$, errors_1.ResourceNotFoundException);
1149
+ exports.TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];
1150
+ n0_registry.registerError(exports.TooManyRequestsException$, errors_1.TooManyRequestsException);
1151
+ exports.UnauthorizedException$ = [-3, n0, _UE, { [_e]: _c, [_hE]: 401 }, [_m], [0]];
1152
+ n0_registry.registerError(exports.UnauthorizedException$, errors_1.UnauthorizedException);
1153
+ exports.errorTypeRegistries = [_s_registry, n0_registry];
1154
+ var AccessTokenType = [0, n0, _ATT, 8, 0];
1155
+ var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
1156
+ var SessionTokenType = [0, n0, _STT, 8, 0];
1157
+ exports.GetRoleCredentialsRequest$ = [
1158
+ 3,
1159
+ n0,
1160
+ _GRCR,
1161
+ 0,
1162
+ [_rN, _aI, _aT],
1163
+ [
1164
+ [0, { [_hQ]: _rn }],
1165
+ [0, { [_hQ]: _ai }],
1166
+ [() => AccessTokenType, { [_hH]: _xasbt }],
1167
+ ],
1168
+ 3,
1169
+ ];
1170
+ exports.GetRoleCredentialsResponse$ = [
1171
+ 3,
1172
+ n0,
1173
+ _GRCRe,
1174
+ 0,
1175
+ [_rC],
1176
+ [[() => exports.RoleCredentials$, 0]],
1177
+ ];
1178
+ exports.RoleCredentials$ = [
1179
+ 3,
1180
+ n0,
1181
+ _RC,
1182
+ 0,
1183
+ [_aKI, _sAK, _sT, _ex],
1184
+ [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1],
1185
+ ];
1186
+ exports.GetRoleCredentials$ = [
1187
+ 9,
1188
+ n0,
1189
+ _GRC,
1190
+ { [_h]: ["GET", "/federation/credentials", 200] },
1191
+ () => exports.GetRoleCredentialsRequest$,
1192
+ () => exports.GetRoleCredentialsResponse$,
1193
+ ];
1242
1194
 
1243
1195
 
1244
1196
  /***/ }),
@@ -1252,7 +1204,7 @@ var client = __webpack_require__(5152);
1252
1204
  var httpAuthSchemes = __webpack_require__(7523);
1253
1205
  var propertyProvider = __webpack_require__(1238);
1254
1206
  var sharedIniFileLoader = __webpack_require__(4964);
1255
- var fs = __webpack_require__(9896);
1207
+ var node_fs = __webpack_require__(3024);
1256
1208
 
1257
1209
  const fromEnvSigningName = ({ logger, signingName } = {}) => async () => {
1258
1210
  logger?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
@@ -1305,7 +1257,7 @@ const validateTokenKey = (key, value, forRefresh = false) => {
1305
1257
  }
1306
1258
  };
1307
1259
 
1308
- const { writeFile } = fs.promises;
1260
+ const { writeFile } = node_fs.promises;
1309
1261
  const writeSSOTokenToFile = (id, ssoToken) => {
1310
1262
  const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id);
1311
1263
  const tokenString = JSON.stringify(ssoToken, null, 2);
@@ -1407,10 +1359,10 @@ exports.nodeProvider = nodeProvider;
1407
1359
 
1408
1360
  /***/ }),
1409
1361
 
1410
- /***/ 5188:
1362
+ /***/ 9955:
1411
1363
  /***/ ((module) => {
1412
1364
 
1413
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.990.0","scripts":{"build":"concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline client-sso","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","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso","test:index":"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.10","@aws-sdk/middleware-host-header":"^3.972.3","@aws-sdk/middleware-logger":"^3.972.3","@aws-sdk/middleware-recursion-detection":"^3.972.3","@aws-sdk/middleware-user-agent":"^3.972.10","@aws-sdk/region-config-resolver":"^3.972.3","@aws-sdk/types":"^3.973.1","@aws-sdk/util-endpoints":"3.990.0","@aws-sdk/util-user-agent-browser":"^3.972.3","@aws-sdk/util-user-agent-node":"^3.972.8","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.23.0","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.14","@smithy/middleware-retry":"^4.4.31","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.10","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.11.3","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.30","@smithy/util-defaults-mode-node":"^4.2.33","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node20":"20.1.8","@types/node":"^20.14.8","concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"engines":{"node":">=20.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}');
1365
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.996.7","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.973.18","@aws-sdk/middleware-host-header":"^3.972.7","@aws-sdk/middleware-logger":"^3.972.7","@aws-sdk/middleware-recursion-detection":"^3.972.7","@aws-sdk/middleware-user-agent":"^3.972.19","@aws-sdk/region-config-resolver":"^3.972.7","@aws-sdk/types":"^3.973.5","@aws-sdk/util-endpoints":"^3.996.4","@aws-sdk/util-user-agent-browser":"^3.972.7","@aws-sdk/util-user-agent-node":"^3.973.4","@smithy/config-resolver":"^4.4.10","@smithy/core":"^3.23.8","@smithy/fetch-http-handler":"^5.3.13","@smithy/hash-node":"^4.2.11","@smithy/invalid-dependency":"^4.2.11","@smithy/middleware-content-length":"^4.2.11","@smithy/middleware-endpoint":"^4.4.22","@smithy/middleware-retry":"^4.4.39","@smithy/middleware-serde":"^4.2.12","@smithy/middleware-stack":"^4.2.11","@smithy/node-config-provider":"^4.3.11","@smithy/node-http-handler":"^4.4.14","@smithy/protocol-http":"^5.3.11","@smithy/smithy-client":"^4.12.2","@smithy/types":"^4.13.0","@smithy/url-parser":"^4.2.11","@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.38","@smithy/util-defaults-mode-node":"^4.2.41","@smithy/util-endpoints":"^3.3.2","@smithy/util-middleware":"^4.2.11","@smithy/util-retry":"^4.2.11","@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"}}}');
1414
1366
 
1415
1367
  /***/ })
1416
1368