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.
- package/.cdk-cost-analyzer-cache/metadata.json +8 -8
- package/dist/action/136.index.js +164 -20
- package/dist/action/360.index.js +3 -3
- package/dist/action/443.index.js +118 -27
- package/dist/action/579.index.js +4 -1
- package/dist/action/605.index.js +1 -1
- package/dist/action/762.index.js +146 -21
- package/dist/action/869.index.js +1 -1
- package/dist/action/956.index.js +16 -937
- package/dist/action/998.index.js +1074 -1122
- package/dist/action/index.js +3 -3
- package/dist/releasetag.txt +1 -1
- package/package.json +2 -2
package/dist/action/998.index.js
CHANGED
|
@@ -3,1242 +3,1194 @@ exports.id = 998;
|
|
|
3
3
|
exports.ids = [998];
|
|
4
4
|
exports.modules = {
|
|
5
5
|
|
|
6
|
-
/***/
|
|
6
|
+
/***/ 7523:
|
|
7
7
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
47
|
+
config,
|
|
48
|
+
signer,
|
|
49
|
+
signingRegion,
|
|
50
|
+
signingRegionSet,
|
|
51
|
+
signingName,
|
|
41
52
|
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
71
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
|
|
114
|
-
|
|
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
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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
|
|
166
|
-
|
|
167
|
-
let
|
|
168
|
-
let
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
-
|
|
199
|
+
resolvedCredentials = boundProvider;
|
|
177
200
|
}
|
|
178
201
|
},
|
|
179
|
-
|
|
180
|
-
return
|
|
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
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
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
|
-
|
|
241
|
-
|
|
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
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
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
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
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
|
-
|
|
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
|
-
|
|
320
|
+
/***/ 998:
|
|
321
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
294
322
|
|
|
295
|
-
|
|
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
|
-
|
|
348
|
-
|
|
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
|
-
|
|
352
|
-
|
|
353
|
-
const
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
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
|
-
|
|
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
|
-
/***/
|
|
520
|
+
/***/ 1853:
|
|
367
521
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
368
522
|
|
|
369
523
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
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
|
-
/***/
|
|
535
|
+
/***/ 7452:
|
|
430
536
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
431
537
|
|
|
432
538
|
|
|
433
539
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
434
|
-
exports.
|
|
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
|
|
439
|
-
const
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
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
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
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.
|
|
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
|
-
/***/
|
|
598
|
+
/***/ 5074:
|
|
488
599
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
489
600
|
|
|
490
601
|
|
|
491
602
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
492
|
-
exports.
|
|
493
|
-
const
|
|
494
|
-
const
|
|
495
|
-
const
|
|
496
|
-
const
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
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.
|
|
617
|
+
exports.defaultEndpointResolver = defaultEndpointResolver;
|
|
618
|
+
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
|
|
539
619
|
|
|
540
620
|
|
|
541
621
|
/***/ }),
|
|
542
622
|
|
|
543
|
-
/***/
|
|
544
|
-
/***/ ((__unused_webpack_module, exports
|
|
623
|
+
/***/ 203:
|
|
624
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
545
625
|
|
|
546
626
|
|
|
547
627
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
548
|
-
exports.
|
|
549
|
-
const
|
|
550
|
-
const
|
|
551
|
-
const
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
]
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
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
|
-
/***/
|
|
736
|
+
/***/ 2579:
|
|
712
737
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
713
738
|
|
|
714
739
|
|
|
715
740
|
|
|
716
|
-
var
|
|
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
|
|
719
|
-
var
|
|
720
|
-
var
|
|
721
|
-
|
|
722
|
-
|
|
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
|
|
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
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
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
|
|
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
|
-
|
|
754
|
-
|
|
755
|
-
signingRegionSet,
|
|
756
|
-
signingName,
|
|
807
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
808
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
809
|
+
credentials: config.credentials(),
|
|
757
810
|
};
|
|
758
811
|
};
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
const
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
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
|
-
|
|
798
|
-
|
|
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
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
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
|
|
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
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
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
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
Object.
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
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
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
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
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
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
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
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
|
-
/***/
|
|
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
|
-
|
|
1099
|
+
/***/ }),
|
|
1231
1100
|
|
|
1101
|
+
/***/ 2167:
|
|
1102
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1232
1103
|
|
|
1233
1104
|
|
|
1234
|
-
Object.defineProperty(exports, "
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
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
|
|
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 } =
|
|
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
|
-
/***/
|
|
1362
|
+
/***/ 9955:
|
|
1411
1363
|
/***/ ((module) => {
|
|
1412
1364
|
|
|
1413
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/
|
|
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
|
|