@aws-sdk/client-sts 3.1068.0 → 3.1069.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/auth/httpAuthSchemeProvider.js +15 -19
- package/dist-cjs/endpoint/bdd.js +2 -5
- package/dist-cjs/endpoint/endpointResolver.js +7 -11
- package/dist-cjs/index.js +77 -97
- package/dist-cjs/models/STSServiceException.js +4 -8
- package/dist-cjs/models/errors.js +25 -40
- package/dist-cjs/runtimeConfig.browser.js +22 -26
- package/dist-cjs/runtimeConfig.js +36 -40
- package/dist-cjs/runtimeConfig.native.js +4 -7
- package/dist-cjs/runtimeConfig.shared.js +25 -29
- package/dist-cjs/schemas/schemas_0.js +122 -85
- package/package.json +15 -15
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const client_1 = require("@smithy/core/client");
|
|
7
|
-
const endpoints_1 = require("@smithy/core/endpoints");
|
|
8
|
-
const endpointResolver_1 = require("../endpoint/endpointResolver");
|
|
1
|
+
const { resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
+
const { SignatureV4MultiRegion } = require("@aws-sdk/signature-v4-multi-region");
|
|
3
|
+
const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
|
|
4
|
+
const { resolveParams } = require("@smithy/core/endpoints");
|
|
5
|
+
const { defaultEndpointResolver } = require("../endpoint/endpointResolver");
|
|
9
6
|
const createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
|
|
10
7
|
if (!input) {
|
|
11
8
|
throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
|
|
12
9
|
}
|
|
13
10
|
const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
|
|
14
|
-
const instructionsFn =
|
|
11
|
+
const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor
|
|
15
12
|
?.getEndpointParameterInstructions;
|
|
16
13
|
if (!instructionsFn) {
|
|
17
14
|
throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
|
|
18
15
|
}
|
|
19
|
-
const endpointParameters = await
|
|
16
|
+
const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
|
|
20
17
|
return Object.assign(defaultParameters, endpointParameters);
|
|
21
18
|
};
|
|
22
19
|
const _defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
23
20
|
return {
|
|
24
|
-
operation:
|
|
25
|
-
region: await
|
|
21
|
+
operation: getSmithyContext(context).operation,
|
|
22
|
+
region: await normalizeProvider(config.region)() || (() => {
|
|
26
23
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
27
24
|
})(),
|
|
28
25
|
};
|
|
@@ -84,7 +81,7 @@ const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, de
|
|
|
84
81
|
const name = s.name.toLowerCase();
|
|
85
82
|
return name !== "sigv4a" && name.startsWith("sigv4");
|
|
86
83
|
});
|
|
87
|
-
if (
|
|
84
|
+
if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
|
|
88
85
|
continue;
|
|
89
86
|
}
|
|
90
87
|
}
|
|
@@ -127,16 +124,15 @@ const _defaultSTSHttpAuthSchemeProvider = (authParameters) => {
|
|
|
127
124
|
}
|
|
128
125
|
return options;
|
|
129
126
|
};
|
|
130
|
-
exports.defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(
|
|
127
|
+
exports.defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSTSHttpAuthSchemeProvider, {
|
|
131
128
|
"aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
|
|
132
129
|
"aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
|
|
133
130
|
"smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption,
|
|
134
131
|
});
|
|
135
|
-
|
|
136
|
-
const config_0 =
|
|
137
|
-
const config_1 =
|
|
132
|
+
exports.resolveHttpAuthSchemeConfig = (config) => {
|
|
133
|
+
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
134
|
+
const config_1 = resolveAwsSdkSigV4AConfig(config_0);
|
|
138
135
|
return Object.assign(config_1, {
|
|
139
|
-
authSchemePreference:
|
|
136
|
+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
140
137
|
});
|
|
141
138
|
};
|
|
142
|
-
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
package/dist-cjs/endpoint/bdd.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bdd = void 0;
|
|
4
|
-
const endpoints_1 = require("@smithy/core/endpoints");
|
|
1
|
+
const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
|
|
5
2
|
const q = "ref";
|
|
6
3
|
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "stringEquals", g = "getAttr", h = "us-east-1", i = "sigv4", j = "sts", k = "https://sts.{Region}.{PartitionResult#dnsSuffix}", l = { [q]: "Endpoint" }, m = { [q]: "Region" }, n = { [q]: d }, o = {}, p = [m];
|
|
7
4
|
const _data = {
|
|
@@ -85,4 +82,4 @@ const nodes = new Int32Array([
|
|
|
85
82
|
3, r + 3, 31,
|
|
86
83
|
4, r + 4, r + 5,
|
|
87
84
|
]);
|
|
88
|
-
exports.bdd =
|
|
85
|
+
exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const endpoints_1 = require("@smithy/core/endpoints");
|
|
6
|
-
const bdd_1 = require("./bdd");
|
|
7
|
-
const cache = new endpoints_1.EndpointCache({
|
|
1
|
+
const { awsEndpointFunctions } = require("@aws-sdk/core/client");
|
|
2
|
+
const { customEndpointFunctions, decideEndpoint, EndpointCache } = require("@smithy/core/endpoints");
|
|
3
|
+
const { bdd } = require("./bdd");
|
|
4
|
+
const cache = new EndpointCache({
|
|
8
5
|
size: 50,
|
|
9
6
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"],
|
|
10
7
|
});
|
|
11
|
-
|
|
12
|
-
return cache.get(endpointParams, () =>
|
|
8
|
+
exports.defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
13
10
|
endpointParams: endpointParams,
|
|
14
11
|
logger: context.logger,
|
|
15
12
|
}));
|
|
16
13
|
};
|
|
17
|
-
|
|
18
|
-
endpoints_1.customEndpointFunctions.aws = client_1.awsEndpointFunctions;
|
|
14
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
var __exportStar = (m, e) => { Object.assign(e, m); };
|
|
2
|
+
const { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, setCredentialFeature, stsRegionDefaultResolver } = require("@aws-sdk/core/client");
|
|
3
|
+
const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require("@smithy/core");
|
|
4
|
+
const { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
|
|
5
|
+
exports.$Command = Command;
|
|
6
|
+
exports.__Client = Client;
|
|
7
|
+
const { resolveRegionConfig } = require("@smithy/core/config");
|
|
8
|
+
const { resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
|
|
9
|
+
const { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
|
|
10
|
+
const { resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
|
|
11
|
+
const { getSchemaSerdePlugin } = require("@smithy/core/schema");
|
|
12
|
+
const { resolveHttpAuthSchemeConfig, defaultSTSHttpAuthSchemeParametersProvider } = require("./auth/httpAuthSchemeProvider");
|
|
13
|
+
const { getRuntimeConfig } = require("./runtimeConfig");
|
|
14
|
+
const { AssumeRole$, AssumeRoleWithSAML$, AssumeRoleWithWebIdentity$, AssumeRoot$, DecodeAuthorizationMessage$, GetAccessKeyInfo$, GetCallerIdentity$, GetDelegatedAccessToken$, GetFederationToken$, GetSessionToken$, GetWebIdentityToken$ } = require("./schemas/schemas_0");
|
|
15
|
+
__exportStar(require("./schemas/schemas_0"), exports);
|
|
16
|
+
__exportStar(require("./models/errors"), exports);
|
|
17
|
+
const { STSServiceException } = require("./models/STSServiceException");
|
|
18
|
+
exports.STSServiceException = STSServiceException;
|
|
16
19
|
|
|
17
20
|
const resolveClientEndpointParameters = (options) => {
|
|
18
21
|
return Object.assign(options, {
|
|
@@ -70,176 +73,176 @@ const resolveHttpAuthRuntimeConfig = (config) => {
|
|
|
70
73
|
};
|
|
71
74
|
|
|
72
75
|
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
73
|
-
const extensionConfiguration = Object.assign(
|
|
76
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
74
77
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
75
|
-
return Object.assign(runtimeConfig,
|
|
78
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
76
79
|
};
|
|
77
80
|
|
|
78
|
-
class STSClient extends
|
|
81
|
+
class STSClient extends Client {
|
|
79
82
|
config;
|
|
80
83
|
constructor(...[configuration]) {
|
|
81
|
-
const _config_0 =
|
|
84
|
+
const _config_0 = getRuntimeConfig(configuration || {});
|
|
82
85
|
super(_config_0);
|
|
83
86
|
this.initConfig = _config_0;
|
|
84
87
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
85
|
-
const _config_2 =
|
|
86
|
-
const _config_3 =
|
|
87
|
-
const _config_4 =
|
|
88
|
-
const _config_5 =
|
|
89
|
-
const _config_6 =
|
|
90
|
-
const _config_7 =
|
|
88
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
89
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
90
|
+
const _config_4 = resolveRegionConfig(_config_3);
|
|
91
|
+
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
92
|
+
const _config_6 = resolveEndpointConfig(_config_5);
|
|
93
|
+
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
91
94
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
92
95
|
this.config = _config_8;
|
|
93
|
-
this.middlewareStack.use(
|
|
94
|
-
this.middlewareStack.use(
|
|
95
|
-
this.middlewareStack.use(
|
|
96
|
-
this.middlewareStack.use(
|
|
97
|
-
this.middlewareStack.use(
|
|
98
|
-
this.middlewareStack.use(
|
|
99
|
-
this.middlewareStack.use(
|
|
100
|
-
this.middlewareStack.use(
|
|
101
|
-
httpAuthSchemeParametersProvider:
|
|
102
|
-
identityProviderConfigProvider: async (config) => new
|
|
96
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
97
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
98
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
99
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
100
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
101
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
102
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
103
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
104
|
+
httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
|
|
105
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
103
106
|
"aws.auth#sigv4": config.credentials,
|
|
104
107
|
"aws.auth#sigv4a": config.credentials,
|
|
105
108
|
}),
|
|
106
109
|
}));
|
|
107
|
-
this.middlewareStack.use(
|
|
110
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
108
111
|
}
|
|
109
112
|
destroy() {
|
|
110
113
|
super.destroy();
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
116
|
|
|
114
|
-
class AssumeRoleCommand extends
|
|
117
|
+
class AssumeRoleCommand extends Command
|
|
115
118
|
.classBuilder()
|
|
116
119
|
.ep(commonParams)
|
|
117
120
|
.m(function (Command, cs, config, o) {
|
|
118
|
-
return [
|
|
121
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
119
122
|
})
|
|
120
123
|
.s("AWSSecurityTokenServiceV20110615", "AssumeRole", {})
|
|
121
124
|
.n("STSClient", "AssumeRoleCommand")
|
|
122
|
-
.sc(
|
|
125
|
+
.sc(AssumeRole$)
|
|
123
126
|
.build() {
|
|
124
127
|
}
|
|
125
128
|
|
|
126
|
-
class AssumeRoleWithSAMLCommand extends
|
|
129
|
+
class AssumeRoleWithSAMLCommand extends Command
|
|
127
130
|
.classBuilder()
|
|
128
131
|
.ep(commonParams)
|
|
129
132
|
.m(function (Command, cs, config, o) {
|
|
130
|
-
return [
|
|
133
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
131
134
|
})
|
|
132
135
|
.s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {})
|
|
133
136
|
.n("STSClient", "AssumeRoleWithSAMLCommand")
|
|
134
|
-
.sc(
|
|
137
|
+
.sc(AssumeRoleWithSAML$)
|
|
135
138
|
.build() {
|
|
136
139
|
}
|
|
137
140
|
|
|
138
|
-
class AssumeRoleWithWebIdentityCommand extends
|
|
141
|
+
class AssumeRoleWithWebIdentityCommand extends Command
|
|
139
142
|
.classBuilder()
|
|
140
143
|
.ep(commonParams)
|
|
141
144
|
.m(function (Command, cs, config, o) {
|
|
142
|
-
return [
|
|
145
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
143
146
|
})
|
|
144
147
|
.s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {})
|
|
145
148
|
.n("STSClient", "AssumeRoleWithWebIdentityCommand")
|
|
146
|
-
.sc(
|
|
149
|
+
.sc(AssumeRoleWithWebIdentity$)
|
|
147
150
|
.build() {
|
|
148
151
|
}
|
|
149
152
|
|
|
150
|
-
class AssumeRootCommand extends
|
|
153
|
+
class AssumeRootCommand extends Command
|
|
151
154
|
.classBuilder()
|
|
152
155
|
.ep(commonParams)
|
|
153
156
|
.m(function (Command, cs, config, o) {
|
|
154
|
-
return [
|
|
157
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
155
158
|
})
|
|
156
159
|
.s("AWSSecurityTokenServiceV20110615", "AssumeRoot", {})
|
|
157
160
|
.n("STSClient", "AssumeRootCommand")
|
|
158
|
-
.sc(
|
|
161
|
+
.sc(AssumeRoot$)
|
|
159
162
|
.build() {
|
|
160
163
|
}
|
|
161
164
|
|
|
162
|
-
class DecodeAuthorizationMessageCommand extends
|
|
165
|
+
class DecodeAuthorizationMessageCommand extends Command
|
|
163
166
|
.classBuilder()
|
|
164
167
|
.ep(commonParams)
|
|
165
168
|
.m(function (Command, cs, config, o) {
|
|
166
|
-
return [
|
|
169
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
167
170
|
})
|
|
168
171
|
.s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {})
|
|
169
172
|
.n("STSClient", "DecodeAuthorizationMessageCommand")
|
|
170
|
-
.sc(
|
|
173
|
+
.sc(DecodeAuthorizationMessage$)
|
|
171
174
|
.build() {
|
|
172
175
|
}
|
|
173
176
|
|
|
174
|
-
class GetAccessKeyInfoCommand extends
|
|
177
|
+
class GetAccessKeyInfoCommand extends Command
|
|
175
178
|
.classBuilder()
|
|
176
179
|
.ep(commonParams)
|
|
177
180
|
.m(function (Command, cs, config, o) {
|
|
178
|
-
return [
|
|
181
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
179
182
|
})
|
|
180
183
|
.s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {})
|
|
181
184
|
.n("STSClient", "GetAccessKeyInfoCommand")
|
|
182
|
-
.sc(
|
|
185
|
+
.sc(GetAccessKeyInfo$)
|
|
183
186
|
.build() {
|
|
184
187
|
}
|
|
185
188
|
|
|
186
|
-
class GetCallerIdentityCommand extends
|
|
189
|
+
class GetCallerIdentityCommand extends Command
|
|
187
190
|
.classBuilder()
|
|
188
191
|
.ep(commonParams)
|
|
189
192
|
.m(function (Command, cs, config, o) {
|
|
190
|
-
return [
|
|
193
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
191
194
|
})
|
|
192
195
|
.s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {})
|
|
193
196
|
.n("STSClient", "GetCallerIdentityCommand")
|
|
194
|
-
.sc(
|
|
197
|
+
.sc(GetCallerIdentity$)
|
|
195
198
|
.build() {
|
|
196
199
|
}
|
|
197
200
|
|
|
198
|
-
class GetDelegatedAccessTokenCommand extends
|
|
201
|
+
class GetDelegatedAccessTokenCommand extends Command
|
|
199
202
|
.classBuilder()
|
|
200
203
|
.ep(commonParams)
|
|
201
204
|
.m(function (Command, cs, config, o) {
|
|
202
|
-
return [
|
|
205
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
203
206
|
})
|
|
204
207
|
.s("AWSSecurityTokenServiceV20110615", "GetDelegatedAccessToken", {})
|
|
205
208
|
.n("STSClient", "GetDelegatedAccessTokenCommand")
|
|
206
|
-
.sc(
|
|
209
|
+
.sc(GetDelegatedAccessToken$)
|
|
207
210
|
.build() {
|
|
208
211
|
}
|
|
209
212
|
|
|
210
|
-
class GetFederationTokenCommand extends
|
|
213
|
+
class GetFederationTokenCommand extends Command
|
|
211
214
|
.classBuilder()
|
|
212
215
|
.ep(commonParams)
|
|
213
216
|
.m(function (Command, cs, config, o) {
|
|
214
|
-
return [
|
|
217
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
215
218
|
})
|
|
216
219
|
.s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {})
|
|
217
220
|
.n("STSClient", "GetFederationTokenCommand")
|
|
218
|
-
.sc(
|
|
221
|
+
.sc(GetFederationToken$)
|
|
219
222
|
.build() {
|
|
220
223
|
}
|
|
221
224
|
|
|
222
|
-
class GetSessionTokenCommand extends
|
|
225
|
+
class GetSessionTokenCommand extends Command
|
|
223
226
|
.classBuilder()
|
|
224
227
|
.ep(commonParams)
|
|
225
228
|
.m(function (Command, cs, config, o) {
|
|
226
|
-
return [
|
|
229
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
227
230
|
})
|
|
228
231
|
.s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {})
|
|
229
232
|
.n("STSClient", "GetSessionTokenCommand")
|
|
230
|
-
.sc(
|
|
233
|
+
.sc(GetSessionToken$)
|
|
231
234
|
.build() {
|
|
232
235
|
}
|
|
233
236
|
|
|
234
|
-
class GetWebIdentityTokenCommand extends
|
|
237
|
+
class GetWebIdentityTokenCommand extends Command
|
|
235
238
|
.classBuilder()
|
|
236
239
|
.ep(commonParams)
|
|
237
240
|
.m(function (Command, cs, config, o) {
|
|
238
|
-
return [
|
|
241
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
239
242
|
})
|
|
240
243
|
.s("AWSSecurityTokenServiceV20110615", "GetWebIdentityToken", {})
|
|
241
244
|
.n("STSClient", "GetWebIdentityTokenCommand")
|
|
242
|
-
.sc(
|
|
245
|
+
.sc(GetWebIdentityToken$)
|
|
243
246
|
.build() {
|
|
244
247
|
}
|
|
245
248
|
|
|
@@ -258,7 +261,7 @@ const commands = {
|
|
|
258
261
|
};
|
|
259
262
|
class STS extends STSClient {
|
|
260
263
|
}
|
|
261
|
-
|
|
264
|
+
createAggregatedClient(commands, STS);
|
|
262
265
|
|
|
263
266
|
const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
|
264
267
|
if (typeof assumedRoleUser?.Arn === "string") {
|
|
@@ -273,7 +276,7 @@ const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, l
|
|
|
273
276
|
const region = typeof _region === "function" ? await _region() : _region;
|
|
274
277
|
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
|
275
278
|
let stsDefaultRegion = "";
|
|
276
|
-
const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await
|
|
279
|
+
const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)());
|
|
277
280
|
credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
|
|
278
281
|
return resolvedRegion;
|
|
279
282
|
};
|
|
@@ -312,7 +315,7 @@ const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
|
|
|
312
315
|
...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),
|
|
313
316
|
...(accountId && { accountId }),
|
|
314
317
|
};
|
|
315
|
-
|
|
318
|
+
setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
|
|
316
319
|
return credentials;
|
|
317
320
|
};
|
|
318
321
|
};
|
|
@@ -349,9 +352,9 @@ const getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => {
|
|
|
349
352
|
...(accountId && { accountId }),
|
|
350
353
|
};
|
|
351
354
|
if (accountId) {
|
|
352
|
-
|
|
355
|
+
setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
|
|
353
356
|
}
|
|
354
|
-
|
|
357
|
+
setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
|
|
355
358
|
return credentials;
|
|
356
359
|
};
|
|
357
360
|
};
|
|
@@ -380,9 +383,6 @@ const decorateDefaultCredentialProvider = (provider) => (input) => provider({
|
|
|
380
383
|
...input,
|
|
381
384
|
});
|
|
382
385
|
|
|
383
|
-
exports.$Command = client.Command;
|
|
384
|
-
exports.__Client = client.Client;
|
|
385
|
-
exports.STSServiceException = STSServiceException.STSServiceException;
|
|
386
386
|
exports.AssumeRoleCommand = AssumeRoleCommand;
|
|
387
387
|
exports.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand;
|
|
388
388
|
exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
|
|
@@ -399,23 +399,3 @@ exports.STSClient = STSClient;
|
|
|
399
399
|
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
|
|
400
400
|
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
|
401
401
|
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
|
402
|
-
Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
|
|
403
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
404
|
-
Object.defineProperty(exports, '__proto__', {
|
|
405
|
-
enumerable: true,
|
|
406
|
-
value: schemas_0['__proto__']
|
|
407
|
-
});
|
|
408
|
-
|
|
409
|
-
Object.keys(schemas_0).forEach(function (k) {
|
|
410
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
|
|
411
|
-
});
|
|
412
|
-
Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
|
|
413
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
414
|
-
Object.defineProperty(exports, '__proto__', {
|
|
415
|
-
enumerable: true,
|
|
416
|
-
value: errors['__proto__']
|
|
417
|
-
});
|
|
418
|
-
|
|
419
|
-
Object.keys(errors).forEach(function (k) {
|
|
420
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
|
|
421
|
-
});
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.STSServiceException =
|
|
4
|
-
const client_1 = require("@smithy/core/client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
|
|
6
|
-
class STSServiceException extends client_1.ServiceException {
|
|
1
|
+
const { ServiceException: __ServiceException } = require("@smithy/core/client");
|
|
2
|
+
exports.__ServiceException = __ServiceException;
|
|
3
|
+
exports.STSServiceException = class STSServiceException extends __ServiceException {
|
|
7
4
|
constructor(options) {
|
|
8
5
|
super(options);
|
|
9
6
|
Object.setPrototypeOf(this, STSServiceException.prototype);
|
|
10
7
|
}
|
|
11
|
-
}
|
|
12
|
-
exports.STSServiceException = STSServiceException;
|
|
8
|
+
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.SessionDurationEscalationException = exports.OutboundWebIdentityFederationDisabledException = exports.JWTPayloadSizeExceededException = exports.ExpiredTradeInTokenException = exports.InvalidAuthorizationMessageException = exports.IDPCommunicationErrorException = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = void 0;
|
|
4
|
-
const STSServiceException_1 = require("./STSServiceException");
|
|
5
|
-
class ExpiredTokenException extends STSServiceException_1.STSServiceException {
|
|
1
|
+
const { STSServiceException: __BaseException } = require("./STSServiceException");
|
|
2
|
+
exports.ExpiredTokenException = class ExpiredTokenException extends __BaseException {
|
|
6
3
|
name = "ExpiredTokenException";
|
|
7
4
|
$fault = "client";
|
|
8
5
|
constructor(opts) {
|
|
@@ -13,9 +10,8 @@ class ExpiredTokenException extends STSServiceException_1.STSServiceException {
|
|
|
13
10
|
});
|
|
14
11
|
Object.setPrototypeOf(this, ExpiredTokenException.prototype);
|
|
15
12
|
}
|
|
16
|
-
}
|
|
17
|
-
exports.
|
|
18
|
-
class MalformedPolicyDocumentException extends STSServiceException_1.STSServiceException {
|
|
13
|
+
};
|
|
14
|
+
exports.MalformedPolicyDocumentException = class MalformedPolicyDocumentException extends __BaseException {
|
|
19
15
|
name = "MalformedPolicyDocumentException";
|
|
20
16
|
$fault = "client";
|
|
21
17
|
constructor(opts) {
|
|
@@ -26,9 +22,8 @@ class MalformedPolicyDocumentException extends STSServiceException_1.STSServiceE
|
|
|
26
22
|
});
|
|
27
23
|
Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
|
|
28
24
|
}
|
|
29
|
-
}
|
|
30
|
-
exports.
|
|
31
|
-
class PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException {
|
|
25
|
+
};
|
|
26
|
+
exports.PackedPolicyTooLargeException = class PackedPolicyTooLargeException extends __BaseException {
|
|
32
27
|
name = "PackedPolicyTooLargeException";
|
|
33
28
|
$fault = "client";
|
|
34
29
|
constructor(opts) {
|
|
@@ -39,9 +34,8 @@ class PackedPolicyTooLargeException extends STSServiceException_1.STSServiceExce
|
|
|
39
34
|
});
|
|
40
35
|
Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
|
|
41
36
|
}
|
|
42
|
-
}
|
|
43
|
-
exports.
|
|
44
|
-
class RegionDisabledException extends STSServiceException_1.STSServiceException {
|
|
37
|
+
};
|
|
38
|
+
exports.RegionDisabledException = class RegionDisabledException extends __BaseException {
|
|
45
39
|
name = "RegionDisabledException";
|
|
46
40
|
$fault = "client";
|
|
47
41
|
constructor(opts) {
|
|
@@ -52,9 +46,8 @@ class RegionDisabledException extends STSServiceException_1.STSServiceException
|
|
|
52
46
|
});
|
|
53
47
|
Object.setPrototypeOf(this, RegionDisabledException.prototype);
|
|
54
48
|
}
|
|
55
|
-
}
|
|
56
|
-
exports.
|
|
57
|
-
class IDPRejectedClaimException extends STSServiceException_1.STSServiceException {
|
|
49
|
+
};
|
|
50
|
+
exports.IDPRejectedClaimException = class IDPRejectedClaimException extends __BaseException {
|
|
58
51
|
name = "IDPRejectedClaimException";
|
|
59
52
|
$fault = "client";
|
|
60
53
|
constructor(opts) {
|
|
@@ -65,9 +58,8 @@ class IDPRejectedClaimException extends STSServiceException_1.STSServiceExceptio
|
|
|
65
58
|
});
|
|
66
59
|
Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
|
|
67
60
|
}
|
|
68
|
-
}
|
|
69
|
-
exports.
|
|
70
|
-
class InvalidIdentityTokenException extends STSServiceException_1.STSServiceException {
|
|
61
|
+
};
|
|
62
|
+
exports.InvalidIdentityTokenException = class InvalidIdentityTokenException extends __BaseException {
|
|
71
63
|
name = "InvalidIdentityTokenException";
|
|
72
64
|
$fault = "client";
|
|
73
65
|
constructor(opts) {
|
|
@@ -78,9 +70,8 @@ class InvalidIdentityTokenException extends STSServiceException_1.STSServiceExce
|
|
|
78
70
|
});
|
|
79
71
|
Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
|
|
80
72
|
}
|
|
81
|
-
}
|
|
82
|
-
exports.
|
|
83
|
-
class IDPCommunicationErrorException extends STSServiceException_1.STSServiceException {
|
|
73
|
+
};
|
|
74
|
+
exports.IDPCommunicationErrorException = class IDPCommunicationErrorException extends __BaseException {
|
|
84
75
|
name = "IDPCommunicationErrorException";
|
|
85
76
|
$fault = "client";
|
|
86
77
|
$retryable = {};
|
|
@@ -92,9 +83,8 @@ class IDPCommunicationErrorException extends STSServiceException_1.STSServiceExc
|
|
|
92
83
|
});
|
|
93
84
|
Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
|
|
94
85
|
}
|
|
95
|
-
}
|
|
96
|
-
exports.
|
|
97
|
-
class InvalidAuthorizationMessageException extends STSServiceException_1.STSServiceException {
|
|
86
|
+
};
|
|
87
|
+
exports.InvalidAuthorizationMessageException = class InvalidAuthorizationMessageException extends __BaseException {
|
|
98
88
|
name = "InvalidAuthorizationMessageException";
|
|
99
89
|
$fault = "client";
|
|
100
90
|
constructor(opts) {
|
|
@@ -105,9 +95,8 @@ class InvalidAuthorizationMessageException extends STSServiceException_1.STSServ
|
|
|
105
95
|
});
|
|
106
96
|
Object.setPrototypeOf(this, InvalidAuthorizationMessageException.prototype);
|
|
107
97
|
}
|
|
108
|
-
}
|
|
109
|
-
exports.
|
|
110
|
-
class ExpiredTradeInTokenException extends STSServiceException_1.STSServiceException {
|
|
98
|
+
};
|
|
99
|
+
exports.ExpiredTradeInTokenException = class ExpiredTradeInTokenException extends __BaseException {
|
|
111
100
|
name = "ExpiredTradeInTokenException";
|
|
112
101
|
$fault = "client";
|
|
113
102
|
constructor(opts) {
|
|
@@ -118,9 +107,8 @@ class ExpiredTradeInTokenException extends STSServiceException_1.STSServiceExcep
|
|
|
118
107
|
});
|
|
119
108
|
Object.setPrototypeOf(this, ExpiredTradeInTokenException.prototype);
|
|
120
109
|
}
|
|
121
|
-
}
|
|
122
|
-
exports.
|
|
123
|
-
class JWTPayloadSizeExceededException extends STSServiceException_1.STSServiceException {
|
|
110
|
+
};
|
|
111
|
+
exports.JWTPayloadSizeExceededException = class JWTPayloadSizeExceededException extends __BaseException {
|
|
124
112
|
name = "JWTPayloadSizeExceededException";
|
|
125
113
|
$fault = "client";
|
|
126
114
|
constructor(opts) {
|
|
@@ -131,9 +119,8 @@ class JWTPayloadSizeExceededException extends STSServiceException_1.STSServiceEx
|
|
|
131
119
|
});
|
|
132
120
|
Object.setPrototypeOf(this, JWTPayloadSizeExceededException.prototype);
|
|
133
121
|
}
|
|
134
|
-
}
|
|
135
|
-
exports.
|
|
136
|
-
class OutboundWebIdentityFederationDisabledException extends STSServiceException_1.STSServiceException {
|
|
122
|
+
};
|
|
123
|
+
exports.OutboundWebIdentityFederationDisabledException = class OutboundWebIdentityFederationDisabledException extends __BaseException {
|
|
137
124
|
name = "OutboundWebIdentityFederationDisabledException";
|
|
138
125
|
$fault = "client";
|
|
139
126
|
constructor(opts) {
|
|
@@ -144,9 +131,8 @@ class OutboundWebIdentityFederationDisabledException extends STSServiceException
|
|
|
144
131
|
});
|
|
145
132
|
Object.setPrototypeOf(this, OutboundWebIdentityFederationDisabledException.prototype);
|
|
146
133
|
}
|
|
147
|
-
}
|
|
148
|
-
exports.
|
|
149
|
-
class SessionDurationEscalationException extends STSServiceException_1.STSServiceException {
|
|
134
|
+
};
|
|
135
|
+
exports.SessionDurationEscalationException = class SessionDurationEscalationException extends __BaseException {
|
|
150
136
|
name = "SessionDurationEscalationException";
|
|
151
137
|
$fault = "client";
|
|
152
138
|
constructor(opts) {
|
|
@@ -157,5 +143,4 @@ class SessionDurationEscalationException extends STSServiceException_1.STSServic
|
|
|
157
143
|
});
|
|
158
144
|
Object.setPrototypeOf(this, SessionDurationEscalationException.prototype);
|
|
159
145
|
}
|
|
160
|
-
}
|
|
161
|
-
exports.SessionDurationEscalationException = SessionDurationEscalationException;
|
|
146
|
+
};
|