@aws-sdk/client-sts 3.30.0 → 3.34.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/CHANGELOG.md +35 -0
- package/dist/cjs/STSClient.js +12 -12
- package/dist/cjs/STSClient.js.map +1 -1
- package/dist/cjs/commands/AssumeRoleCommand.js +4 -4
- package/dist/cjs/commands/AssumeRoleCommand.js.map +1 -1
- package/dist/cjs/commands/AssumeRoleWithSAMLCommand.js +3 -3
- package/dist/cjs/commands/AssumeRoleWithSAMLCommand.js.map +1 -1
- package/dist/cjs/commands/AssumeRoleWithWebIdentityCommand.js +3 -3
- package/dist/cjs/commands/AssumeRoleWithWebIdentityCommand.js.map +1 -1
- package/dist/cjs/commands/DecodeAuthorizationMessageCommand.js +4 -4
- package/dist/cjs/commands/DecodeAuthorizationMessageCommand.js.map +1 -1
- package/dist/cjs/commands/GetAccessKeyInfoCommand.js +4 -4
- package/dist/cjs/commands/GetAccessKeyInfoCommand.js.map +1 -1
- package/dist/cjs/commands/GetCallerIdentityCommand.js +4 -4
- package/dist/cjs/commands/GetCallerIdentityCommand.js.map +1 -1
- package/dist/cjs/commands/GetFederationTokenCommand.js +4 -4
- package/dist/cjs/commands/GetFederationTokenCommand.js.map +1 -1
- package/dist/cjs/commands/GetSessionTokenCommand.js +4 -4
- package/dist/cjs/commands/GetSessionTokenCommand.js.map +1 -1
- package/dist/cjs/defaultRoleAssumers.js +4 -4
- package/dist/cjs/defaultRoleAssumers.js.map +1 -1
- package/dist/cjs/defaultRoleAssumers.spec.js +3 -3
- package/dist/cjs/defaultRoleAssumers.spec.js.map +1 -1
- package/dist/cjs/defaultStsRoleAssumers.js +2 -2
- package/dist/cjs/defaultStsRoleAssumers.js.map +1 -1
- package/dist/cjs/endpoints.js +1 -1
- package/dist/cjs/endpoints.js.map +1 -1
- package/dist/cjs/index.js +12 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/models/index.js +1 -1
- package/dist/cjs/models/index.js.map +1 -1
- package/dist/cjs/package.json +39 -39
- package/dist/cjs/protocols/Aws_query.js +40 -40
- package/dist/cjs/protocols/Aws_query.js.map +1 -1
- package/dist/cjs/runtimeConfig.browser.js +4 -4
- package/dist/cjs/runtimeConfig.browser.js.map +1 -1
- package/dist/cjs/runtimeConfig.js +8 -8
- package/dist/cjs/runtimeConfig.js.map +1 -1
- package/dist/cjs/runtimeConfig.native.js +1 -1
- package/dist/cjs/runtimeConfig.native.js.map +1 -1
- package/dist/es/STS.js +1 -8
- package/dist/es/STS.js.map +1 -1
- package/dist/es/STSClient.js +1 -13
- package/dist/es/STSClient.js.map +1 -1
- package/dist/es/commands/AssumeRoleCommand.js +2 -110
- package/dist/es/commands/AssumeRoleCommand.js.map +1 -1
- package/dist/es/commands/AssumeRoleWithSAMLCommand.js +2 -158
- package/dist/es/commands/AssumeRoleWithSAMLCommand.js.map +1 -1
- package/dist/es/commands/AssumeRoleWithWebIdentityCommand.js +2 -162
- package/dist/es/commands/AssumeRoleWithWebIdentityCommand.js.map +1 -1
- package/dist/es/commands/DecodeAuthorizationMessageCommand.js +2 -62
- package/dist/es/commands/DecodeAuthorizationMessageCommand.js.map +1 -1
- package/dist/es/commands/GetAccessKeyInfoCommand.js +2 -44
- package/dist/es/commands/GetAccessKeyInfoCommand.js.map +1 -1
- package/dist/es/commands/GetCallerIdentityCommand.js +2 -36
- package/dist/es/commands/GetCallerIdentityCommand.js.map +1 -1
- package/dist/es/commands/GetFederationTokenCommand.js +2 -165
- package/dist/es/commands/GetFederationTokenCommand.js.map +1 -1
- package/dist/es/commands/GetSessionTokenCommand.js +2 -78
- package/dist/es/commands/GetSessionTokenCommand.js.map +1 -1
- package/dist/es/defaultRoleAssumers.js +0 -16
- package/dist/es/defaultRoleAssumers.js.map +1 -1
- package/dist/es/defaultRoleAssumers.spec.js +9 -14
- package/dist/es/defaultRoleAssumers.spec.js.map +1 -1
- package/dist/es/defaultStsRoleAssumers.js +10 -31
- package/dist/es/defaultStsRoleAssumers.js.map +1 -1
- package/dist/es/endpoints.js +1 -1
- package/dist/es/endpoints.js.map +1 -1
- package/dist/es/models/models_0.js +0 -87
- package/dist/es/models/models_0.js.map +1 -1
- package/dist/es/package.json +39 -39
- package/dist/es/protocols/Aws_query.js +154 -156
- package/dist/es/protocols/Aws_query.js.map +1 -1
- package/dist/es/runtimeConfig.browser.js +0 -3
- package/dist/es/runtimeConfig.browser.js.map +1 -1
- package/dist/es/runtimeConfig.js +0 -3
- package/dist/es/runtimeConfig.js.map +1 -1
- package/dist/es/runtimeConfig.native.js +0 -3
- package/dist/es/runtimeConfig.native.js.map +1 -1
- package/dist/es/runtimeConfig.shared.js +0 -3
- package/dist/es/runtimeConfig.shared.js.map +1 -1
- package/dist/types/runtimeConfig.browser.d.ts +1 -0
- package/dist/types/runtimeConfig.d.ts +1 -0
- package/dist/types/runtimeConfig.native.d.ts +1 -0
- package/dist/types/ts3.4/runtimeConfig.browser.d.ts +1 -0
- package/dist/types/ts3.4/runtimeConfig.d.ts +1 -0
- package/dist/types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +39 -39
- package/protocols/Aws_query.ts +3 -1
- package/tsconfig.es.json +0 -2
- package/tsconfig.json +3 -5
- package/tsconfig.types.json +8 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const package_json_1 =
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("./package.json"));
|
|
6
6
|
const defaultStsRoleAssumers_1 = require("./defaultStsRoleAssumers");
|
|
7
7
|
const config_resolver_1 = require("@aws-sdk/config-resolver");
|
|
8
8
|
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
@@ -21,8 +21,8 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
|
21
21
|
*/
|
|
22
22
|
const getRuntimeConfig = (config) => {
|
|
23
23
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
24
|
-
|
|
25
|
-
const clientSharedValues =
|
|
24
|
+
smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
|
|
25
|
+
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
|
|
26
26
|
return {
|
|
27
27
|
...clientSharedValues,
|
|
28
28
|
...config,
|
|
@@ -30,12 +30,12 @@ const getRuntimeConfig = (config) => {
|
|
|
30
30
|
base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
|
|
31
31
|
base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
|
|
32
32
|
bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
|
|
33
|
-
credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d :
|
|
34
|
-
defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e :
|
|
35
|
-
maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f :
|
|
36
|
-
region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g :
|
|
33
|
+
credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : defaultStsRoleAssumers_1.decorateDefaultCredentialProvider(credential_provider_node_1.defaultProvider),
|
|
34
|
+
defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
35
|
+
maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
36
|
+
region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
37
37
|
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
|
|
38
|
-
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j :
|
|
38
|
+
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
|
|
39
39
|
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
|
|
40
40
|
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
|
|
41
41
|
utf8Decoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _m !== void 0 ? _m : util_utf8_node_1.fromUtf8,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeConfig.js","sourceRoot":"","sources":["../../runtimeConfig.ts"],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"runtimeConfig.js","sourceRoot":"","sources":["../../runtimeConfig.ts"],"names":[],"mappings":";;;;AAAA,0EAAyC;AAEzC,qEAA6E;AAC7E,8DAAuG;AACvG,gFAAiG;AACjG,kDAA0C;AAC1C,gEAA4G;AAC5G,wEAA6E;AAC7E,kEAA8E;AAC9E,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AAN,MAAM,CAAE,SAAS,mCAAI,iCAAc,CAAC,iDAA8B,CAAC;QAC9E,MAAM,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,mCAAI,gBAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;QACnD,eAAe,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,eAAe,mCAAI,mCAAe;QAC3D,WAAW,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,mCAAI,yBAAQ;QAC5C,WAAW,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,mCAAI,uBAAM;KAC3C,CAAC;AACJ,CAAC,CAAC;AAxBW,QAAA,gBAAgB,oBAwB3B"}
|
|
@@ -8,7 +8,7 @@ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
|
8
8
|
*/
|
|
9
9
|
const getRuntimeConfig = (config) => {
|
|
10
10
|
var _a;
|
|
11
|
-
const browserDefaults =
|
|
11
|
+
const browserDefaults = runtimeConfig_browser_1.getRuntimeConfig(config);
|
|
12
12
|
return {
|
|
13
13
|
...browserDefaults,
|
|
14
14
|
...config,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeConfig.native.js","sourceRoot":"","sources":["../../runtimeConfig.native.ts"],"names":[],"mappings":";;;AAAA,qDAA+C;AAE/C,mEAAsF;AAEtF;;GAEG;AACI,MAAM,gBAAgB,GAAG,CAAC,MAAuB,EAAE,EAAE;;IAC1D,MAAM,eAAe,GAAG,
|
|
1
|
+
{"version":3,"file":"runtimeConfig.native.js","sourceRoot":"","sources":["../../runtimeConfig.native.ts"],"names":[],"mappings":";;;AAAA,qDAA+C;AAE/C,mEAAsF;AAEtF;;GAEG;AACI,MAAM,gBAAgB,GAAG,CAAC,MAAuB,EAAE,EAAE;;IAC1D,MAAM,eAAe,GAAG,wCAAuB,CAAC,MAAM,CAAC,CAAC;IACxD,OAAO;QACL,GAAG,eAAe;QAClB,GAAG,MAAM;QACT,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,mCAAI,kBAAM;KACjC,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,gBAAgB,oBAQ3B"}
|
package/dist/es/STS.js
CHANGED
|
@@ -8,14 +8,7 @@ import { GetAccessKeyInfoCommand, } from "./commands/GetAccessKeyInfoCommand";
|
|
|
8
8
|
import { GetCallerIdentityCommand, } from "./commands/GetCallerIdentityCommand";
|
|
9
9
|
import { GetFederationTokenCommand, } from "./commands/GetFederationTokenCommand";
|
|
10
10
|
import { GetSessionTokenCommand, } from "./commands/GetSessionTokenCommand";
|
|
11
|
-
|
|
12
|
-
* <fullname>Security Token Service</fullname>
|
|
13
|
-
* <p>Security Token Service (STS) enables you to request temporary, limited-privilege
|
|
14
|
-
* credentials for Identity and Access Management (IAM) users or for users that you
|
|
15
|
-
* authenticate (federated users). This guide provides descriptions of the STS API. For
|
|
16
|
-
* more information about using this service, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html">Temporary Security Credentials</a>.</p>
|
|
17
|
-
*/
|
|
18
|
-
var STS = /** @class */ (function (_super) {
|
|
11
|
+
var STS = (function (_super) {
|
|
19
12
|
__extends(STS, _super);
|
|
20
13
|
function STS() {
|
|
21
14
|
return _super !== null && _super.apply(this, arguments) || this;
|
package/dist/es/STS.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"STS.js","sourceRoot":"","sources":["../../STS.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAmD,MAAM,8BAA8B,CAAC;AAClH,OAAO,EACL,yBAAyB,GAG1B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,gCAAgC,GAGjC,MAAM,6CAA6C,CAAC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AAU,EAAE;YACrC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;SACjC;aAAM,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE;YACnC,IAAI,OAAO,WAAW,KAAK,QAAQ;gBAAE,MAAM,IAAI,KAAK,CAAC,iCAA+B,OAAO,WAAa,CAAC,CAAC;YAC1G,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;SAC3C;aAAM;YACL,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;SACxC;IACH,CAAC;IACH,UAAC;AAAD,CAAC,AAj1BD,CAAyB,SAAS,GAi1BjC"}
|
package/dist/es/STSClient.js
CHANGED
|
@@ -8,14 +8,7 @@ import { getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
|
|
|
8
8
|
import { resolveStsAuthConfig } from "@aws-sdk/middleware-sdk-sts";
|
|
9
9
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
10
10
|
import { Client as __Client, } from "@aws-sdk/smithy-client";
|
|
11
|
-
|
|
12
|
-
* <fullname>Security Token Service</fullname>
|
|
13
|
-
* <p>Security Token Service (STS) enables you to request temporary, limited-privilege
|
|
14
|
-
* credentials for Identity and Access Management (IAM) users or for users that you
|
|
15
|
-
* authenticate (federated users). This guide provides descriptions of the STS API. For
|
|
16
|
-
* more information about using this service, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html">Temporary Security Credentials</a>.</p>
|
|
17
|
-
*/
|
|
18
|
-
var STSClient = /** @class */ (function (_super) {
|
|
11
|
+
var STSClient = (function (_super) {
|
|
19
12
|
__extends(STSClient, _super);
|
|
20
13
|
function STSClient(configuration) {
|
|
21
14
|
var _this = this;
|
|
@@ -35,11 +28,6 @@ var STSClient = /** @class */ (function (_super) {
|
|
|
35
28
|
_this.middlewareStack.use(getUserAgentPlugin(_this.config));
|
|
36
29
|
return _this;
|
|
37
30
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
40
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
41
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
42
|
-
*/
|
|
43
31
|
STSClient.prototype.destroy = function () {
|
|
44
32
|
_super.prototype.destroy.call(this);
|
|
45
33
|
};
|
package/dist/es/STSClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"STSClient.js","sourceRoot":"","sources":["../../STSClient.ts"],"names":[],"mappings":";AAcA,OAAO,EAAE,gBAAgB,IAAI,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAKL,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAGL,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAyC,cAAc,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACtH,OAAO,EAA6C,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC9G,OAAO,EAGL,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,MAAM,IAAI,QAAQ,GAGnB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"STSClient.js","sourceRoot":"","sources":["../../STSClient.ts"],"names":[],"mappings":";AAcA,OAAO,EAAE,gBAAgB,IAAI,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAKL,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE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,CAAC,CAAC;QAC3D,KAAI,CAAC,eAAe,CAAC,GAAG,CAAC,eAAe,CAAC,KAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACvD,KAAI,CAAC,eAAe,CAAC,GAAG,CAAC,kBAAkB,CAAC,KAAI,CAAC,MAAM,CAAC,CAAC,CAAC;;IAC5D,CAAC;IAOD,2BAAO,GAAP;QACE,iBAAM,OAAO,WAAE,CAAC;IAClB,CAAC;IACH,gBAAC;AAAD,CAAC,AApCD,CAA+B,QAAQ,GAoCtC"}
|
|
@@ -4,121 +4,13 @@ import { deserializeAws_queryAssumeRoleCommand, serializeAws_queryAssumeRoleComm
|
|
|
4
4
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
5
5
|
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
|
|
6
6
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
7
|
-
|
|
8
|
-
* <p>Returns a set of temporary security credentials that you can use to access Amazon Web Services
|
|
9
|
-
* resources that you might not normally have access to. These temporary credentials
|
|
10
|
-
* consist of an access key ID, a secret access key, and a security token. Typically, you
|
|
11
|
-
* use <code>AssumeRole</code> within your account or for cross-account access. For a
|
|
12
|
-
* comparison of <code>AssumeRole</code> with other API operations that produce temporary
|
|
13
|
-
* credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
|
|
14
|
-
* Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing
|
|
15
|
-
* the STS API operations</a> in the
|
|
16
|
-
* <i>IAM User Guide</i>.</p>
|
|
17
|
-
* <p>
|
|
18
|
-
* <b>Permissions</b>
|
|
19
|
-
* </p>
|
|
20
|
-
* <p>The temporary security credentials created by <code>AssumeRole</code> can be used to
|
|
21
|
-
* make API calls to any Amazon Web Services service with the following exception: You cannot call the
|
|
22
|
-
* STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
|
|
23
|
-
* operations.</p>
|
|
24
|
-
* <p>(Optional) You can pass inline or managed <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">session policies</a> to
|
|
25
|
-
* this operation. You can pass a single JSON policy document to use as an inline session
|
|
26
|
-
* policy. You can also specify up to 10 managed policies to use as managed session policies.
|
|
27
|
-
* The plaintext that you use for both inline and managed session policies can't exceed 2,048
|
|
28
|
-
* characters. Passing policies to this operation returns new
|
|
29
|
-
* temporary credentials. The resulting session's permissions are the intersection of the
|
|
30
|
-
* role's identity-based policy and the session policies. You can use the role's temporary
|
|
31
|
-
* credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
|
|
32
|
-
* the role. You cannot use session policies to grant more permissions than those allowed
|
|
33
|
-
* by the identity-based policy of the role that is being assumed. For more information, see
|
|
34
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
|
|
35
|
-
* Policies</a> in the <i>IAM User Guide</i>.</p>
|
|
36
|
-
* <p>To assume a role from a different account, your account must be trusted by the
|
|
37
|
-
* role. The trust relationship is defined in the role's trust policy when the role is
|
|
38
|
-
* created. That trust policy states which accounts are allowed to delegate that access to
|
|
39
|
-
* users in the account. </p>
|
|
40
|
-
* <p>A user who wants to access a role in a different account must also have permissions that
|
|
41
|
-
* are delegated from the user account administrator. The administrator must attach a policy
|
|
42
|
-
* that allows the user to call <code>AssumeRole</code> for the ARN of the role in the other
|
|
43
|
-
* account. If the user is in the same account as the role, then you can do either of the
|
|
44
|
-
* following:</p>
|
|
45
|
-
* <ul>
|
|
46
|
-
* <li>
|
|
47
|
-
* <p>Attach a policy to the user (identical to the previous user in a different
|
|
48
|
-
* account).</p>
|
|
49
|
-
* </li>
|
|
50
|
-
* <li>
|
|
51
|
-
* <p>Add the user as a principal directly in the role's trust policy.</p>
|
|
52
|
-
* </li>
|
|
53
|
-
* </ul>
|
|
54
|
-
* <p>In this case, the trust policy acts as an IAM resource-based policy. Users in the same
|
|
55
|
-
* account as the role do not need explicit permission to assume the role. For more
|
|
56
|
-
* information about trust policies and resource-based policies, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">IAM Policies</a> in
|
|
57
|
-
* the <i>IAM User Guide</i>.</p>
|
|
58
|
-
* <p>
|
|
59
|
-
* <b>Tags</b>
|
|
60
|
-
* </p>
|
|
61
|
-
* <p>(Optional) You can pass tag key-value pairs to your session. These tags are called
|
|
62
|
-
* session tags. For more information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the
|
|
63
|
-
* <i>IAM User Guide</i>.</p>
|
|
64
|
-
* <p>An administrator must grant you the permissions necessary to pass session tags. The
|
|
65
|
-
* administrator can also create granular permissions to allow you to pass only specific
|
|
66
|
-
* session tags. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html">Tutorial: Using Tags
|
|
67
|
-
* for Attribute-Based Access Control</a> in the
|
|
68
|
-
* <i>IAM User Guide</i>.</p>
|
|
69
|
-
* <p>You can set the session tags as transitive. Transitive tags persist during role
|
|
70
|
-
* chaining. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining">Chaining Roles
|
|
71
|
-
* with Session Tags</a> in the <i>IAM User Guide</i>.</p>
|
|
72
|
-
* <p>
|
|
73
|
-
* <b>Using MFA with AssumeRole</b>
|
|
74
|
-
* </p>
|
|
75
|
-
* <p>(Optional) You can include multi-factor authentication (MFA) information when you call
|
|
76
|
-
* <code>AssumeRole</code>. This is useful for cross-account scenarios to ensure that the
|
|
77
|
-
* user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that
|
|
78
|
-
* scenario, the trust policy of the role being assumed includes a condition that tests for
|
|
79
|
-
* MFA authentication. If the caller does not include valid MFA information, the request to
|
|
80
|
-
* assume the role is denied. The condition in a trust policy that tests for MFA
|
|
81
|
-
* authentication might look like the following example.</p>
|
|
82
|
-
* <p>
|
|
83
|
-
* <code>"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}</code>
|
|
84
|
-
* </p>
|
|
85
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html">Configuring MFA-Protected API Access</a>
|
|
86
|
-
* in the <i>IAM User Guide</i> guide.</p>
|
|
87
|
-
* <p>To use MFA with <code>AssumeRole</code>, you pass values for the
|
|
88
|
-
* <code>SerialNumber</code> and <code>TokenCode</code> parameters. The
|
|
89
|
-
* <code>SerialNumber</code> value identifies the user's hardware or virtual MFA device.
|
|
90
|
-
* The <code>TokenCode</code> is the time-based one-time password (TOTP) that the MFA device
|
|
91
|
-
* produces. </p>
|
|
92
|
-
* @example
|
|
93
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
94
|
-
* ```javascript
|
|
95
|
-
* import { STSClient, AssumeRoleCommand } from "@aws-sdk/client-sts"; // ES Modules import
|
|
96
|
-
* // const { STSClient, AssumeRoleCommand } = require("@aws-sdk/client-sts"); // CommonJS import
|
|
97
|
-
* const client = new STSClient(config);
|
|
98
|
-
* const command = new AssumeRoleCommand(input);
|
|
99
|
-
* const response = await client.send(command);
|
|
100
|
-
* ```
|
|
101
|
-
*
|
|
102
|
-
* @see {@link AssumeRoleCommandInput} for command's `input` shape.
|
|
103
|
-
* @see {@link AssumeRoleCommandOutput} for command's `response` shape.
|
|
104
|
-
* @see {@link STSClientResolvedConfig | config} for command's `input` shape.
|
|
105
|
-
*
|
|
106
|
-
*/
|
|
107
|
-
var AssumeRoleCommand = /** @class */ (function (_super) {
|
|
7
|
+
var AssumeRoleCommand = (function (_super) {
|
|
108
8
|
__extends(AssumeRoleCommand, _super);
|
|
109
|
-
// Start section: command_properties
|
|
110
|
-
// End section: command_properties
|
|
111
9
|
function AssumeRoleCommand(input) {
|
|
112
|
-
var _this =
|
|
113
|
-
// Start section: command_constructor
|
|
114
|
-
_super.call(this) || this;
|
|
10
|
+
var _this = _super.call(this) || this;
|
|
115
11
|
_this.input = input;
|
|
116
12
|
return _this;
|
|
117
|
-
// End section: command_constructor
|
|
118
13
|
}
|
|
119
|
-
/**
|
|
120
|
-
* @internal
|
|
121
|
-
*/
|
|
122
14
|
AssumeRoleCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
123
15
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
124
16
|
this.middlewareStack.use(getAwsAuthPlugin(configuration));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssumeRoleCommand.js","sourceRoot":"","sources":["../../../commands/AssumeRoleCommand.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,qCAAqC,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AACpH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"AssumeRoleCommand.js","sourceRoot":"","sources":["../../../commands/AssumeRoleCommand.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,qCAAqC,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AACpH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAkH7D;IAAuC,qCAItC;IAIC,2BAAqB,KAA6B;QAAlD,YAEE,iBAAO,SAER;QAJoB,WAAK,GAAL,KAAK,CAAwB;;IAIlD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oleWithSAMLResponse } from "../models
|
|
|
3
3
|
import { deserializeAws_queryAssumeRoleWithSAMLCommand, serializeAws_queryAssumeRoleWithSAMLCommand, } from "../protocols/Aws_query";
|
|
4
4
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
5
5
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
6
|
-
|
|
7
|
-
* <p>Returns a set of temporary security credentials for users who have been authenticated
|
|
8
|
-
* via a SAML authentication response. This operation provides a mechanism for tying an
|
|
9
|
-
* enterprise identity store or directory to role-based Amazon Web Services access without user-specific
|
|
10
|
-
* credentials or configuration. For a comparison of <code>AssumeRoleWithSAML</code> with the
|
|
11
|
-
* other API operations that produce temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
|
|
12
|
-
* Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
|
|
13
|
-
* STS API operations</a> in the <i>IAM User Guide</i>.</p>
|
|
14
|
-
* <p>The temporary security credentials returned by this operation consist of an access key
|
|
15
|
-
* ID, a secret access key, and a security token. Applications can use these temporary
|
|
16
|
-
* security credentials to sign calls to Amazon Web Services services.</p>
|
|
17
|
-
* <p>
|
|
18
|
-
* <b>Session Duration</b>
|
|
19
|
-
* </p>
|
|
20
|
-
* <p>By default, the temporary security credentials created by
|
|
21
|
-
* <code>AssumeRoleWithSAML</code> last for one hour. However, you can use the optional
|
|
22
|
-
* <code>DurationSeconds</code> parameter to specify the duration of your session. Your
|
|
23
|
-
* role session lasts for the duration that you specify, or until the time specified in the
|
|
24
|
-
* SAML authentication response's <code>SessionNotOnOrAfter</code> value, whichever is
|
|
25
|
-
* shorter. You can provide a <code>DurationSeconds</code> value from 900 seconds (15 minutes)
|
|
26
|
-
* up to the maximum session duration setting for the role. This setting can have a value from
|
|
27
|
-
* 1 hour to 12 hours. To learn how to view the maximum value for your role, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session">View the
|
|
28
|
-
* Maximum Session Duration Setting for a Role</a> in the
|
|
29
|
-
* <i>IAM User Guide</i>. The maximum session duration limit applies when
|
|
30
|
-
* you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
|
|
31
|
-
* commands. However the limit does not apply when you use those operations to create a
|
|
32
|
-
* console URL. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html">Using IAM Roles</a> in the
|
|
33
|
-
* <i>IAM User Guide</i>.</p>
|
|
34
|
-
* <note>
|
|
35
|
-
* <p>
|
|
36
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining">Role chaining</a> limits your CLI or Amazon Web Services API
|
|
37
|
-
* role session to a maximum of one hour. When you use the <code>AssumeRole</code> API
|
|
38
|
-
* operation to assume a role, you can specify the duration of your role session with
|
|
39
|
-
* the <code>DurationSeconds</code> parameter. You can specify a parameter value of up
|
|
40
|
-
* to 43200 seconds (12 hours), depending on the maximum session duration setting for
|
|
41
|
-
* your role. However, if you assume a role using role chaining and provide a
|
|
42
|
-
* <code>DurationSeconds</code> parameter value greater than one hour, the
|
|
43
|
-
* operation fails.</p>
|
|
44
|
-
* </note>
|
|
45
|
-
* <p>
|
|
46
|
-
* <b>Permissions</b>
|
|
47
|
-
* </p>
|
|
48
|
-
* <p>The temporary security credentials created by <code>AssumeRoleWithSAML</code> can be
|
|
49
|
-
* used to make API calls to any Amazon Web Services service with the following exception: you cannot call
|
|
50
|
-
* the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
|
|
51
|
-
* operations.</p>
|
|
52
|
-
* <p>(Optional) You can pass inline or managed <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">session policies</a> to
|
|
53
|
-
* this operation. You can pass a single JSON policy document to use as an inline session
|
|
54
|
-
* policy. You can also specify up to 10 managed policies to use as managed session policies.
|
|
55
|
-
* The plaintext that you use for both inline and managed session policies can't exceed 2,048
|
|
56
|
-
* characters. Passing policies to this operation returns new
|
|
57
|
-
* temporary credentials. The resulting session's permissions are the intersection of the
|
|
58
|
-
* role's identity-based policy and the session policies. You can use the role's temporary
|
|
59
|
-
* credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
|
|
60
|
-
* the role. You cannot use session policies to grant more permissions than those allowed
|
|
61
|
-
* by the identity-based policy of the role that is being assumed. For more information, see
|
|
62
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
|
|
63
|
-
* Policies</a> in the <i>IAM User Guide</i>.</p>
|
|
64
|
-
* <p>Calling <code>AssumeRoleWithSAML</code> does not require the use of Amazon Web Services security
|
|
65
|
-
* credentials. The identity of the caller is validated by using keys in the metadata document
|
|
66
|
-
* that is uploaded for the SAML provider entity for your identity provider. </p>
|
|
67
|
-
* <important>
|
|
68
|
-
* <p>Calling <code>AssumeRoleWithSAML</code> can result in an entry in your CloudTrail logs.
|
|
69
|
-
* The entry includes the value in the <code>NameID</code> element of the SAML assertion.
|
|
70
|
-
* We recommend that you use a <code>NameIDType</code> that is not associated with any
|
|
71
|
-
* personally identifiable information (PII). For example, you could instead use the
|
|
72
|
-
* persistent identifier
|
|
73
|
-
* (<code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code>).</p>
|
|
74
|
-
* </important>
|
|
75
|
-
* <p>
|
|
76
|
-
* <b>Tags</b>
|
|
77
|
-
* </p>
|
|
78
|
-
* <p>(Optional) You can configure your IdP to pass attributes into your SAML assertion as
|
|
79
|
-
* session tags. Each session tag consists of a key name and an associated value. For more
|
|
80
|
-
* information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the
|
|
81
|
-
* <i>IAM User Guide</i>.</p>
|
|
82
|
-
* <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
|
|
83
|
-
* characters and the values can’t exceed 256 characters. For these and additional limits, see
|
|
84
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
|
|
85
|
-
* and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
|
|
86
|
-
*
|
|
87
|
-
* <note>
|
|
88
|
-
* <p>An Amazon Web Services conversion compresses the passed session policies and session tags into a
|
|
89
|
-
* packed binary format that has a separate limit. Your request can fail for this limit
|
|
90
|
-
* even if your plaintext meets the other requirements. The <code>PackedPolicySize</code>
|
|
91
|
-
* response element indicates by percentage how close the policies and tags for your
|
|
92
|
-
* request are to the upper size limit.
|
|
93
|
-
* </p>
|
|
94
|
-
* </note>
|
|
95
|
-
* <p>You can pass a session tag with the same key as a tag that is
|
|
96
|
-
* attached to the role. When you do, session tags override the role's tags with the same
|
|
97
|
-
* key.</p>
|
|
98
|
-
* <p>An administrator must grant you the permissions necessary to pass session tags. The
|
|
99
|
-
* administrator can also create granular permissions to allow you to pass only specific
|
|
100
|
-
* session tags. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html">Tutorial: Using Tags
|
|
101
|
-
* for Attribute-Based Access Control</a> in the
|
|
102
|
-
* <i>IAM User Guide</i>.</p>
|
|
103
|
-
* <p>You can set the session tags as transitive. Transitive tags persist during role
|
|
104
|
-
* chaining. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining">Chaining Roles
|
|
105
|
-
* with Session Tags</a> in the <i>IAM User Guide</i>.</p>
|
|
106
|
-
* <p>
|
|
107
|
-
* <b>SAML Configuration</b>
|
|
108
|
-
* </p>
|
|
109
|
-
* <p>Before your application can call <code>AssumeRoleWithSAML</code>, you must configure
|
|
110
|
-
* your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you
|
|
111
|
-
* must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that
|
|
112
|
-
* represents your identity provider. You must also create an IAM role that specifies this
|
|
113
|
-
* SAML provider in its trust policy. </p>
|
|
114
|
-
* <p>For more information, see the following resources:</p>
|
|
115
|
-
* <ul>
|
|
116
|
-
* <li>
|
|
117
|
-
* <p>
|
|
118
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html">About
|
|
119
|
-
* SAML 2.0-based Federation</a> in the <i>IAM User Guide</i>.
|
|
120
|
-
* </p>
|
|
121
|
-
* </li>
|
|
122
|
-
* <li>
|
|
123
|
-
* <p>
|
|
124
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html">Creating SAML Identity Providers</a> in the
|
|
125
|
-
* <i>IAM User Guide</i>. </p>
|
|
126
|
-
* </li>
|
|
127
|
-
* <li>
|
|
128
|
-
* <p>
|
|
129
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html">Configuring
|
|
130
|
-
* a Relying Party and Claims</a> in the <i>IAM User Guide</i>.
|
|
131
|
-
* </p>
|
|
132
|
-
* </li>
|
|
133
|
-
* <li>
|
|
134
|
-
* <p>
|
|
135
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html">Creating a Role for SAML 2.0 Federation</a> in the
|
|
136
|
-
* <i>IAM User Guide</i>. </p>
|
|
137
|
-
* </li>
|
|
138
|
-
* </ul>
|
|
139
|
-
* @example
|
|
140
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
141
|
-
* ```javascript
|
|
142
|
-
* import { STSClient, AssumeRoleWithSAMLCommand } from "@aws-sdk/client-sts"; // ES Modules import
|
|
143
|
-
* // const { STSClient, AssumeRoleWithSAMLCommand } = require("@aws-sdk/client-sts"); // CommonJS import
|
|
144
|
-
* const client = new STSClient(config);
|
|
145
|
-
* const command = new AssumeRoleWithSAMLCommand(input);
|
|
146
|
-
* const response = await client.send(command);
|
|
147
|
-
* ```
|
|
148
|
-
*
|
|
149
|
-
* @see {@link AssumeRoleWithSAMLCommandInput} for command's `input` shape.
|
|
150
|
-
* @see {@link AssumeRoleWithSAMLCommandOutput} for command's `response` shape.
|
|
151
|
-
* @see {@link STSClientResolvedConfig | config} for command's `input` shape.
|
|
152
|
-
*
|
|
153
|
-
*/
|
|
154
|
-
var AssumeRoleWithSAMLCommand = /** @class */ (function (_super) {
|
|
6
|
+
var AssumeRoleWithSAMLCommand = (function (_super) {
|
|
155
7
|
__extends(AssumeRoleWithSAMLCommand, _super);
|
|
156
|
-
// Start section: command_properties
|
|
157
|
-
// End section: command_properties
|
|
158
8
|
function AssumeRoleWithSAMLCommand(input) {
|
|
159
|
-
var _this =
|
|
160
|
-
// Start section: command_constructor
|
|
161
|
-
_super.call(this) || this;
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
162
10
|
_this.input = input;
|
|
163
11
|
return _this;
|
|
164
|
-
// End section: command_constructor
|
|
165
12
|
}
|
|
166
|
-
/**
|
|
167
|
-
* @internal
|
|
168
|
-
*/
|
|
169
13
|
AssumeRoleWithSAMLCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
170
14
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
171
15
|
var stack = clientStack.concat(this.middlewareStack);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssumeRoleWithSAMLCommand.js","sourceRoot":"","sources":["../../../commands/AssumeRoleWithSAMLCommand.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EACL,6CAA6C,EAC7C,2CAA2C,GAC5C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"AssumeRoleWithSAML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