@cdk8s/awscdk-resolver 0.0.94 → 0.0.96

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.
Files changed (198) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/package.json +7 -5
  4. package/node_modules/@aws-sdk/client-sso/package.json +4 -4
  5. package/node_modules/@aws-sdk/client-sso-oidc/LICENSE +201 -0
  6. package/node_modules/@aws-sdk/client-sso-oidc/README.md +274 -0
  7. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js +64 -0
  8. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js +14 -0
  9. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js +7 -0
  10. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js +1024 -0
  11. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.browser.js +39 -0
  12. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js +49 -0
  13. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.native.js +15 -0
  14. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js +40 -0
  15. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDC.js +15 -0
  16. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js +52 -0
  17. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  18. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js +58 -0
  19. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js +25 -0
  20. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js +25 -0
  21. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js +25 -0
  22. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js +25 -0
  23. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/index.js +4 -0
  24. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/EndpointParameters.js +14 -0
  25. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/endpointResolver.js +10 -0
  26. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/ruleset.js +4 -0
  27. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/extensionConfiguration.js +1 -0
  28. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/index.js +5 -0
  29. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/SSOOIDCServiceException.js +8 -0
  30. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/index.js +1 -0
  31. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/models_0.js +217 -0
  32. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js +409 -0
  33. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.browser.js +34 -0
  34. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js +44 -0
  35. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.native.js +11 -0
  36. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js +36 -0
  37. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js +21 -0
  38. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDC.d.ts +75 -0
  39. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts +212 -0
  40. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  41. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  42. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/CreateTokenCommand.d.ts +162 -0
  43. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/CreateTokenWithIAMCommand.d.ts +244 -0
  44. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/RegisterClientCommand.d.ts +108 -0
  45. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/StartDeviceAuthorizationCommand.d.ts +111 -0
  46. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/index.d.ts +4 -0
  47. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/EndpointParameters.d.ts +40 -0
  48. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/endpointResolver.d.ts +5 -0
  49. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/ruleset.d.ts +2 -0
  50. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/extensionConfiguration.d.ts +9 -0
  51. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/index.d.ts +50 -0
  52. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/models/SSOOIDCServiceException.d.ts +13 -0
  53. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/models/index.d.ts +1 -0
  54. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/models/models_0.d.ts +734 -0
  55. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/protocols/Aws_restJson1.d.ts +38 -0
  56. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts +53 -0
  57. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts +53 -0
  58. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts +52 -0
  59. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.shared.d.ts +32 -0
  60. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeExtensions.d.ts +17 -0
  61. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDC.d.ts +73 -0
  62. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts +144 -0
  63. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  64. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  65. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/CreateTokenCommand.d.ts +35 -0
  66. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/CreateTokenWithIAMCommand.d.ts +39 -0
  67. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/RegisterClientCommand.d.ts +38 -0
  68. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/StartDeviceAuthorizationCommand.d.ts +39 -0
  69. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/index.d.ts +4 -0
  70. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
  71. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  72. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  73. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  74. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/index.d.ts +8 -0
  75. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/models/SSOOIDCServiceException.d.ts +8 -0
  76. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/models/index.d.ts +1 -0
  77. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/models/models_0.d.ts +201 -0
  78. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +53 -0
  79. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts +110 -0
  80. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts +114 -0
  81. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts +104 -0
  82. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.shared.d.ts +49 -0
  83. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  84. package/node_modules/@aws-sdk/client-sso-oidc/package.json +100 -0
  85. package/node_modules/@aws-sdk/client-sts/LICENSE +201 -0
  86. package/node_modules/@aws-sdk/client-sts/README.md +273 -0
  87. package/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +56 -0
  88. package/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  89. package/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js +67 -0
  90. package/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js +20 -0
  91. package/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js +14 -0
  92. package/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js +7 -0
  93. package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +1457 -0
  94. package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.browser.js +39 -0
  95. package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js +63 -0
  96. package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.native.js +15 -0
  97. package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js +40 -0
  98. package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js +25 -0
  99. package/node_modules/@aws-sdk/client-sts/dist-es/STS.js +23 -0
  100. package/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js +52 -0
  101. package/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  102. package/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js +60 -0
  103. package/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js +25 -0
  104. package/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithSAMLCommand.js +25 -0
  105. package/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithWebIdentityCommand.js +25 -0
  106. package/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js +24 -0
  107. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js +24 -0
  108. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js +24 -0
  109. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js +25 -0
  110. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js +25 -0
  111. package/node_modules/@aws-sdk/client-sts/dist-es/commands/index.js +8 -0
  112. package/node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js +22 -0
  113. package/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js +67 -0
  114. package/node_modules/@aws-sdk/client-sts/dist-es/endpoint/EndpointParameters.js +16 -0
  115. package/node_modules/@aws-sdk/client-sts/dist-es/endpoint/endpointResolver.js +10 -0
  116. package/node_modules/@aws-sdk/client-sts/dist-es/endpoint/ruleset.js +4 -0
  117. package/node_modules/@aws-sdk/client-sts/dist-es/extensionConfiguration.js +1 -0
  118. package/node_modules/@aws-sdk/client-sts/dist-es/index.js +6 -0
  119. package/node_modules/@aws-sdk/client-sts/dist-es/models/STSServiceException.js +8 -0
  120. package/node_modules/@aws-sdk/client-sts/dist-es/models/index.js +1 -0
  121. package/node_modules/@aws-sdk/client-sts/dist-es/models/models_0.js +130 -0
  122. package/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js +885 -0
  123. package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.browser.js +34 -0
  124. package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js +58 -0
  125. package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.native.js +11 -0
  126. package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js +36 -0
  127. package/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js +21 -0
  128. package/node_modules/@aws-sdk/client-sts/dist-types/STS.d.ts +71 -0
  129. package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +182 -0
  130. package/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  131. package/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthSchemeProvider.d.ts +71 -0
  132. package/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleCommand.d.ts +257 -0
  133. package/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleWithSAMLCommand.d.ts +282 -0
  134. package/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleWithWebIdentityCommand.d.ts +291 -0
  135. package/node_modules/@aws-sdk/client-sts/dist-types/commands/DecodeAuthorizationMessageCommand.d.ts +115 -0
  136. package/node_modules/@aws-sdk/client-sts/dist-types/commands/GetAccessKeyInfoCommand.d.ts +75 -0
  137. package/node_modules/@aws-sdk/client-sts/dist-types/commands/GetCallerIdentityCommand.d.ts +116 -0
  138. package/node_modules/@aws-sdk/client-sts/dist-types/commands/GetFederationTokenCommand.d.ts +230 -0
  139. package/node_modules/@aws-sdk/client-sts/dist-types/commands/GetSessionTokenCommand.d.ts +154 -0
  140. package/node_modules/@aws-sdk/client-sts/dist-types/commands/index.d.ts +8 -0
  141. package/node_modules/@aws-sdk/client-sts/dist-types/defaultRoleAssumers.d.ts +23 -0
  142. package/node_modules/@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers.d.ts +43 -0
  143. package/node_modules/@aws-sdk/client-sts/dist-types/endpoint/EndpointParameters.d.ts +46 -0
  144. package/node_modules/@aws-sdk/client-sts/dist-types/endpoint/endpointResolver.d.ts +5 -0
  145. package/node_modules/@aws-sdk/client-sts/dist-types/endpoint/ruleset.d.ts +2 -0
  146. package/node_modules/@aws-sdk/client-sts/dist-types/extensionConfiguration.d.ts +9 -0
  147. package/node_modules/@aws-sdk/client-sts/dist-types/index.d.ts +17 -0
  148. package/node_modules/@aws-sdk/client-sts/dist-types/models/STSServiceException.d.ts +13 -0
  149. package/node_modules/@aws-sdk/client-sts/dist-types/models/index.d.ts +1 -0
  150. package/node_modules/@aws-sdk/client-sts/dist-types/models/models_0.d.ts +1213 -0
  151. package/node_modules/@aws-sdk/client-sts/dist-types/protocols/Aws_query.d.ts +74 -0
  152. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +54 -0
  153. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +52 -0
  154. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +53 -0
  155. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.shared.d.ts +32 -0
  156. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeExtensions.d.ts +17 -0
  157. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STS.d.ts +143 -0
  158. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +165 -0
  159. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  160. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +54 -0
  161. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts +35 -0
  162. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +39 -0
  163. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +39 -0
  164. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +39 -0
  165. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +38 -0
  166. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts +39 -0
  167. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts +39 -0
  168. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts +38 -0
  169. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/index.d.ts +8 -0
  170. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultRoleAssumers.d.ts +19 -0
  171. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +33 -0
  172. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +57 -0
  173. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  174. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  175. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  176. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/index.d.ts +9 -0
  177. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/STSServiceException.d.ts +8 -0
  178. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/index.d.ts +1 -0
  179. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/models_0.d.ts +206 -0
  180. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/protocols/Aws_query.d.ts +101 -0
  181. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +116 -0
  182. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +109 -0
  183. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +110 -0
  184. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.shared.d.ts +51 -0
  185. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  186. package/node_modules/@aws-sdk/client-sts/package.json +102 -0
  187. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  188. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  189. package/node_modules/@aws-sdk/credential-provider-ini/package.json +7 -7
  190. package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
  191. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  192. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  193. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  194. package/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
  195. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  196. package/node_modules/@aws-sdk/util-locate-window/package.json +2 -2
  197. package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
  198. package/package.json +3 -3
@@ -0,0 +1,67 @@
1
+ import { AssumeRoleCommand } from "./commands/AssumeRoleCommand";
2
+ import { AssumeRoleWithWebIdentityCommand, } from "./commands/AssumeRoleWithWebIdentityCommand";
3
+ const ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
4
+ const resolveRegion = async (_region, _parentRegion, credentialProviderLogger) => {
5
+ const region = typeof _region === "function" ? await _region() : _region;
6
+ const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
7
+ credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (provider)`, `${parentRegion} (parent client)`, `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`);
8
+ return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;
9
+ };
10
+ export const getDefaultRoleAssumer = (stsOptions, stsClientCtor) => {
11
+ let stsClient;
12
+ let closureSourceCreds;
13
+ return async (sourceCreds, params) => {
14
+ closureSourceCreds = sourceCreds;
15
+ if (!stsClient) {
16
+ const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, } = stsOptions;
17
+ const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger);
18
+ stsClient = new stsClientCtor({
19
+ credentialDefaultProvider: () => async () => closureSourceCreds,
20
+ region: resolvedRegion,
21
+ requestHandler: requestHandler,
22
+ logger: logger,
23
+ });
24
+ }
25
+ const { Credentials } = await stsClient.send(new AssumeRoleCommand(params));
26
+ if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
27
+ throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
28
+ }
29
+ return {
30
+ accessKeyId: Credentials.AccessKeyId,
31
+ secretAccessKey: Credentials.SecretAccessKey,
32
+ sessionToken: Credentials.SessionToken,
33
+ expiration: Credentials.Expiration,
34
+ credentialScope: Credentials.CredentialScope,
35
+ };
36
+ };
37
+ };
38
+ export const getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor) => {
39
+ let stsClient;
40
+ return async (params) => {
41
+ if (!stsClient) {
42
+ const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, } = stsOptions;
43
+ const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger);
44
+ stsClient = new stsClientCtor({
45
+ region: resolvedRegion,
46
+ requestHandler: requestHandler,
47
+ logger: logger,
48
+ });
49
+ }
50
+ const { Credentials } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
51
+ if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
52
+ throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
53
+ }
54
+ return {
55
+ accessKeyId: Credentials.AccessKeyId,
56
+ secretAccessKey: Credentials.SecretAccessKey,
57
+ sessionToken: Credentials.SessionToken,
58
+ expiration: Credentials.Expiration,
59
+ credentialScope: Credentials.CredentialScope,
60
+ };
61
+ };
62
+ };
63
+ export const decorateDefaultCredentialProvider = (provider) => (input) => provider({
64
+ roleAssumer: getDefaultRoleAssumer(input, input.stsClientCtor),
65
+ roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input, input.stsClientCtor),
66
+ ...input,
67
+ });
@@ -0,0 +1,16 @@
1
+ export const resolveClientEndpointParameters = (options) => {
2
+ return {
3
+ ...options,
4
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
5
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
6
+ useGlobalEndpoint: options.useGlobalEndpoint ?? false,
7
+ defaultSigningName: "sts",
8
+ };
9
+ };
10
+ export const commonParams = {
11
+ UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
12
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
+ Endpoint: { type: "builtInParams", name: "endpoint" },
14
+ Region: { type: "builtInParams", name: "region" },
15
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
16
+ };
@@ -0,0 +1,10 @@
1
+ import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
2
+ import { customEndpointFunctions, resolveEndpoint } from "@smithy/util-endpoints";
3
+ import { ruleSet } from "./ruleset";
4
+ export const defaultEndpointResolver = (endpointParams, context = {}) => {
5
+ return resolveEndpoint(ruleSet, {
6
+ endpointParams: endpointParams,
7
+ logger: context.logger,
8
+ });
9
+ };
10
+ customEndpointFunctions.aws = awsEndpointFunctions;
@@ -0,0 +1,4 @@
1
+ const F = "required", G = "type", H = "fn", I = "argv", J = "ref";
2
+ const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "String" }, n = { [F]: true, "default": false, [G]: "Boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }, v = {}, w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y];
3
+ const _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
4
+ export const ruleSet = _data;
@@ -0,0 +1,6 @@
1
+ export * from "./STSClient";
2
+ export * from "./STS";
3
+ export * from "./commands";
4
+ export * from "./models";
5
+ export * from "./defaultRoleAssumers";
6
+ export { STSServiceException } from "./models/STSServiceException";
@@ -0,0 +1,8 @@
1
+ import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
2
+ export { __ServiceException };
3
+ export class STSServiceException extends __ServiceException {
4
+ constructor(options) {
5
+ super(options);
6
+ Object.setPrototypeOf(this, STSServiceException.prototype);
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export * from "./models_0";
@@ -0,0 +1,130 @@
1
+ import { SENSITIVE_STRING } from "@smithy/smithy-client";
2
+ import { STSServiceException as __BaseException } from "./STSServiceException";
3
+ export class ExpiredTokenException extends __BaseException {
4
+ constructor(opts) {
5
+ super({
6
+ name: "ExpiredTokenException",
7
+ $fault: "client",
8
+ ...opts,
9
+ });
10
+ this.name = "ExpiredTokenException";
11
+ this.$fault = "client";
12
+ Object.setPrototypeOf(this, ExpiredTokenException.prototype);
13
+ }
14
+ }
15
+ export class MalformedPolicyDocumentException extends __BaseException {
16
+ constructor(opts) {
17
+ super({
18
+ name: "MalformedPolicyDocumentException",
19
+ $fault: "client",
20
+ ...opts,
21
+ });
22
+ this.name = "MalformedPolicyDocumentException";
23
+ this.$fault = "client";
24
+ Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
25
+ }
26
+ }
27
+ export class PackedPolicyTooLargeException extends __BaseException {
28
+ constructor(opts) {
29
+ super({
30
+ name: "PackedPolicyTooLargeException",
31
+ $fault: "client",
32
+ ...opts,
33
+ });
34
+ this.name = "PackedPolicyTooLargeException";
35
+ this.$fault = "client";
36
+ Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
37
+ }
38
+ }
39
+ export class RegionDisabledException extends __BaseException {
40
+ constructor(opts) {
41
+ super({
42
+ name: "RegionDisabledException",
43
+ $fault: "client",
44
+ ...opts,
45
+ });
46
+ this.name = "RegionDisabledException";
47
+ this.$fault = "client";
48
+ Object.setPrototypeOf(this, RegionDisabledException.prototype);
49
+ }
50
+ }
51
+ export class IDPRejectedClaimException extends __BaseException {
52
+ constructor(opts) {
53
+ super({
54
+ name: "IDPRejectedClaimException",
55
+ $fault: "client",
56
+ ...opts,
57
+ });
58
+ this.name = "IDPRejectedClaimException";
59
+ this.$fault = "client";
60
+ Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
61
+ }
62
+ }
63
+ export class InvalidIdentityTokenException extends __BaseException {
64
+ constructor(opts) {
65
+ super({
66
+ name: "InvalidIdentityTokenException",
67
+ $fault: "client",
68
+ ...opts,
69
+ });
70
+ this.name = "InvalidIdentityTokenException";
71
+ this.$fault = "client";
72
+ Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
73
+ }
74
+ }
75
+ export class IDPCommunicationErrorException extends __BaseException {
76
+ constructor(opts) {
77
+ super({
78
+ name: "IDPCommunicationErrorException",
79
+ $fault: "client",
80
+ ...opts,
81
+ });
82
+ this.name = "IDPCommunicationErrorException";
83
+ this.$fault = "client";
84
+ Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
85
+ }
86
+ }
87
+ export class InvalidAuthorizationMessageException extends __BaseException {
88
+ constructor(opts) {
89
+ super({
90
+ name: "InvalidAuthorizationMessageException",
91
+ $fault: "client",
92
+ ...opts,
93
+ });
94
+ this.name = "InvalidAuthorizationMessageException";
95
+ this.$fault = "client";
96
+ Object.setPrototypeOf(this, InvalidAuthorizationMessageException.prototype);
97
+ }
98
+ }
99
+ export const CredentialsFilterSensitiveLog = (obj) => ({
100
+ ...obj,
101
+ ...(obj.SecretAccessKey && { SecretAccessKey: SENSITIVE_STRING }),
102
+ });
103
+ export const AssumeRoleResponseFilterSensitiveLog = (obj) => ({
104
+ ...obj,
105
+ ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
106
+ });
107
+ export const AssumeRoleWithSAMLRequestFilterSensitiveLog = (obj) => ({
108
+ ...obj,
109
+ ...(obj.SAMLAssertion && { SAMLAssertion: SENSITIVE_STRING }),
110
+ });
111
+ export const AssumeRoleWithSAMLResponseFilterSensitiveLog = (obj) => ({
112
+ ...obj,
113
+ ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
114
+ });
115
+ export const AssumeRoleWithWebIdentityRequestFilterSensitiveLog = (obj) => ({
116
+ ...obj,
117
+ ...(obj.WebIdentityToken && { WebIdentityToken: SENSITIVE_STRING }),
118
+ });
119
+ export const AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({
120
+ ...obj,
121
+ ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
122
+ });
123
+ export const GetFederationTokenResponseFilterSensitiveLog = (obj) => ({
124
+ ...obj,
125
+ ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
126
+ });
127
+ export const GetSessionTokenResponseFilterSensitiveLog = (obj) => ({
128
+ ...obj,
129
+ ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
130
+ });