@cdk8s/awscdk-resolver 0.0.429 → 0.0.430

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 (93) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/package.json +2 -2
  4. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +22 -24
  5. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js +3 -10
  6. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js +4 -3
  7. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js +2 -2
  8. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js +5 -5
  9. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js +4 -2
  10. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +4 -2
  11. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/fromIni.d.ts +2 -3
  12. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials.d.ts +3 -3
  13. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveLoginCredentials.d.ts +2 -1
  14. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProfileData.d.ts +2 -1
  15. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveSsoCredentials.d.ts +2 -1
  16. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveWebIdentityCredentials.d.ts +2 -1
  17. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/fromIni.d.ts +5 -3
  18. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveAssumeRoleCredentials.d.ts +2 -0
  19. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveLoginCredentials.d.ts +3 -1
  20. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProfileData.d.ts +2 -0
  21. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveSsoCredentials.d.ts +3 -1
  22. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveWebIdentityCredentials.d.ts +3 -1
  23. package/node_modules/@aws-sdk/credential-provider-ini/package.json +5 -5
  24. package/node_modules/@aws-sdk/credential-provider-login/package.json +2 -2
  25. package/node_modules/@aws-sdk/credential-provider-node/package.json +4 -4
  26. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +5 -3
  27. package/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js +2 -0
  28. package/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js +3 -3
  29. package/node_modules/@aws-sdk/credential-provider-sso/dist-types/fromSSO.d.ts +2 -1
  30. package/node_modules/@aws-sdk/credential-provider-sso/dist-types/resolveSSOCredentials.d.ts +1 -1
  31. package/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/fromSSO.d.ts +2 -0
  32. package/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/resolveSSOCredentials.d.ts +1 -0
  33. package/node_modules/@aws-sdk/credential-provider-sso/package.json +2 -2
  34. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +2 -2
  35. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +3 -2
  36. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js +3 -2
  37. package/node_modules/@aws-sdk/nested-clients/package.json +1 -1
  38. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +6 -13
  39. package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +2 -9
  40. package/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +2 -2
  41. package/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +2 -2
  42. package/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts +1 -1
  43. package/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts +3 -2
  44. package/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts +2 -1
  45. package/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts +1 -1
  46. package/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts +3 -1
  47. package/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts +3 -1
  48. package/node_modules/@aws-sdk/token-providers/package.json +2 -2
  49. package/node_modules/@smithy/abort-controller/package.json +2 -2
  50. package/node_modules/@smithy/config-resolver/package.json +5 -5
  51. package/node_modules/@smithy/core/package.json +10 -8
  52. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  53. package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
  54. package/node_modules/@smithy/hash-node/package.json +2 -2
  55. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  56. package/node_modules/@smithy/middleware-content-length/package.json +3 -3
  57. package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +11 -3
  58. package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js +10 -2
  59. package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +1 -1
  60. package/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/createConfigValueProvider.d.ts +2 -1
  61. package/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/createConfigValueProvider.d.ts +2 -1
  62. package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
  63. package/node_modules/@smithy/middleware-retry/package.json +8 -8
  64. package/node_modules/@smithy/middleware-serde/package.json +3 -3
  65. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  66. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  67. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  68. package/node_modules/@smithy/property-provider/package.json +2 -2
  69. package/node_modules/@smithy/protocol-http/package.json +2 -2
  70. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  71. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  72. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  73. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  74. package/node_modules/@smithy/signature-v4/package.json +4 -4
  75. package/node_modules/@smithy/smithy-client/dist-cjs/index.js +6 -0
  76. package/node_modules/@smithy/smithy-client/dist-es/client.js +6 -0
  77. package/node_modules/@smithy/smithy-client/dist-types/client.d.ts +33 -7
  78. package/node_modules/@smithy/smithy-client/dist-types/ts3.4/client.d.ts +33 -7
  79. package/node_modules/@smithy/smithy-client/package.json +7 -7
  80. package/node_modules/@smithy/types/dist-types/schema/schema-deprecated.d.ts +7 -0
  81. package/node_modules/@smithy/types/dist-types/schema/schema.d.ts +6 -0
  82. package/node_modules/@smithy/types/dist-types/ts3.4/schema/schema-deprecated.d.ts +7 -0
  83. package/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +6 -0
  84. package/node_modules/@smithy/types/package.json +1 -1
  85. package/node_modules/@smithy/url-parser/package.json +3 -3
  86. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  87. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  88. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  89. package/node_modules/@smithy/util-middleware/package.json +2 -2
  90. package/node_modules/@smithy/util-retry/package.json +3 -3
  91. package/node_modules/@smithy/util-stream/package.json +4 -4
  92. package/node_modules/@smithy/util-waiter/package.json +3 -3
  93. package/package.json +3 -3
@@ -3,7 +3,7 @@ import { fromSso as getSsoTokenProvider } from "@aws-sdk/token-providers";
3
3
  import { CredentialsProviderError } from "@smithy/property-provider";
4
4
  import { getSSOTokenFromFile } from "@smithy/shared-ini-file-loader";
5
5
  const SHOULD_FAIL_CREDENTIAL_CHAIN = false;
6
- export const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {
6
+ export const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {
7
7
  let token;
8
8
  const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
9
9
  if (ssoSession) {
@@ -47,9 +47,9 @@ export const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccoun
47
47
  const { SSOClient, GetRoleCredentialsCommand } = await import("./loadSso");
48
48
  const sso = ssoClient ||
49
49
  new SSOClient(Object.assign({}, clientConfig ?? {}, {
50
- logger: clientConfig?.logger ?? parentClientConfig?.logger,
50
+ logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,
51
51
  region: clientConfig?.region ?? ssoRegion,
52
- userAgentAppId: clientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,
52
+ userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,
53
53
  }));
54
54
  let ssoResp;
55
55
  try {
@@ -1,4 +1,4 @@
1
- import type { CredentialProviderOptions, RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
1
+ import type { AwsIdentityProperties, CredentialProviderOptions, RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
2
2
  import { SourceProfileInit } from "@smithy/shared-ini-file-loader";
3
3
  import type { SSOClient, SSOClientConfig } from "./loadSso";
4
4
  /**
@@ -33,6 +33,7 @@ export interface SsoCredentialsParameters {
33
33
  export interface FromSSOInit extends SourceProfileInit, CredentialProviderOptions {
34
34
  ssoClient?: SSOClient;
35
35
  clientConfig?: SSOClientConfig;
36
+ callerClientConfig?: AwsIdentityProperties["callerClientConfig"];
36
37
  }
37
38
  /**
38
39
  * @internal
@@ -3,4 +3,4 @@ import { FromSSOInit, SsoCredentialsParameters } from "./fromSSO";
3
3
  /**
4
4
  * @internal
5
5
  */
6
- export declare const resolveSSOCredentials: ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }: FromSSOInit & SsoCredentialsParameters) => Promise<AwsCredentialIdentity>;
6
+ export declare const resolveSSOCredentials: ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }: FromSSOInit & SsoCredentialsParameters) => Promise<AwsCredentialIdentity>;
@@ -1,4 +1,5 @@
1
1
  import {
2
+ AwsIdentityProperties,
2
3
  CredentialProviderOptions,
3
4
  RuntimeConfigAwsCredentialIdentityProvider,
4
5
  } from "@aws-sdk/types";
@@ -16,6 +17,7 @@ export interface FromSSOInit
16
17
  CredentialProviderOptions {
17
18
  ssoClient?: SSOClient;
18
19
  clientConfig?: SSOClientConfig;
20
+ callerClientConfig?: AwsIdentityProperties["callerClientConfig"];
19
21
  }
20
22
  export declare const fromSSO: (
21
23
  init?: FromSSOInit & Partial<SsoCredentialsParameters>
@@ -9,6 +9,7 @@ export declare const resolveSSOCredentials: ({
9
9
  ssoClient,
10
10
  clientConfig,
11
11
  parentClientConfig,
12
+ callerClientConfig,
12
13
  profile,
13
14
  filepath,
14
15
  configFilepath,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-sso",
3
- "version": "3.948.0",
3
+ "version": "3.952.0",
4
4
  "description": "AWS credential provider that exchanges a resolved SSO login token file for temporary AWS credentials",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "@aws-sdk/client-sso": "3.948.0",
30
30
  "@aws-sdk/core": "3.947.0",
31
- "@aws-sdk/token-providers": "3.948.0",
31
+ "@aws-sdk/token-providers": "3.952.0",
32
32
  "@aws-sdk/types": "3.936.0",
33
33
  "@smithy/property-provider": "^4.2.5",
34
34
  "@smithy/shared-ini-file-loader": "^4.4.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-web-identity",
3
- "version": "3.948.0",
3
+ "version": "3.952.0",
4
4
  "description": "AWS credential provider that calls STS assumeRole for temporary AWS credentials",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -35,7 +35,7 @@
35
35
  "license": "Apache-2.0",
36
36
  "dependencies": {
37
37
  "@aws-sdk/core": "3.947.0",
38
- "@aws-sdk/nested-clients": "3.948.0",
38
+ "@aws-sdk/nested-clients": "3.952.0",
39
39
  "@aws-sdk/types": "3.936.0",
40
40
  "@smithy/property-provider": "^4.2.5",
41
41
  "@smithy/shared-ini-file-loader": "^4.4.0",
@@ -327,9 +327,10 @@ const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
327
327
  const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
328
328
  const region = typeof _region === "function" ? await _region() : _region;
329
329
  const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
330
- const stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)();
330
+ let stsDefaultRegion = "";
331
+ const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());
331
332
  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)`);
332
- return region ?? parentRegion ?? stsDefaultRegion;
333
+ return resolvedRegion;
333
334
  };
334
335
  const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
335
336
  let stsClient;
@@ -14,9 +14,10 @@ const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
14
14
  const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
15
15
  const region = typeof _region === "function" ? await _region() : _region;
16
16
  const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
17
- const stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)();
17
+ let stsDefaultRegion = "";
18
+ const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)());
18
19
  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)`);
19
- return region ?? parentRegion ?? stsDefaultRegion;
20
+ return resolvedRegion;
20
21
  };
21
22
  export const getDefaultRoleAssumer = (stsOptions, STSClient) => {
22
23
  let stsClient;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/nested-clients",
3
- "version": "3.948.0",
3
+ "version": "3.952.0",
4
4
  "description": "Nested clients for AWS SDK packages.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -23,9 +23,9 @@ const fromEnvSigningName = ({ logger, signingName } = {}) => async () => {
23
23
  const EXPIRE_WINDOW_MS = 5 * 60 * 1000;
24
24
  const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
25
25
 
26
- const getSsoOidcClient = async (ssoRegion, init = {}) => {
26
+ const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
27
27
  const { SSOOIDCClient } = await import('@aws-sdk/nested-clients/sso-oidc');
28
- const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop];
28
+ const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
29
29
  const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
30
30
  region: ssoRegion ?? init.clientConfig?.region,
31
31
  logger: coalesce("logger"),
@@ -34,9 +34,9 @@ const getSsoOidcClient = async (ssoRegion, init = {}) => {
34
34
  return ssoOidcClient;
35
35
  };
36
36
 
37
- const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => {
37
+ const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
38
38
  const { CreateTokenCommand } = await import('@aws-sdk/nested-clients/sso-oidc');
39
- const ssoOidcClient = await getSsoOidcClient(ssoRegion, init);
39
+ const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
40
40
  return ssoOidcClient.send(new CreateTokenCommand({
41
41
  clientId: ssoToken.clientId,
42
42
  clientSecret: ssoToken.clientSecret,
@@ -65,14 +65,7 @@ const writeSSOTokenToFile = (id, ssoToken) => {
65
65
  };
66
66
 
67
67
  const lastRefreshAttemptTime = new Date(0);
68
- const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {
69
- const init = {
70
- ..._init,
71
- parentClientConfig: {
72
- ...callerClientConfig,
73
- ..._init.parentClientConfig,
74
- },
75
- };
68
+ const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
76
69
  init.logger?.debug("@aws-sdk/token-providers - fromSso");
77
70
  const profiles = await sharedIniFileLoader.parseKnownFiles(init);
78
71
  const profileName = sharedIniFileLoader.getProfileName({
@@ -121,7 +114,7 @@ const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {
121
114
  validateTokenKey("refreshToken", ssoToken.refreshToken, true);
122
115
  try {
123
116
  lastRefreshAttemptTime.setTime(Date.now());
124
- const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init);
117
+ const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
125
118
  validateTokenKey("accessToken", newSsoOidcToken.accessToken);
126
119
  validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
127
120
  const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
@@ -6,14 +6,7 @@ import { validateTokenExpiry } from "./validateTokenExpiry";
6
6
  import { validateTokenKey } from "./validateTokenKey";
7
7
  import { writeSSOTokenToFile } from "./writeSSOTokenToFile";
8
8
  const lastRefreshAttemptTime = new Date(0);
9
- export const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {
10
- const init = {
11
- ..._init,
12
- parentClientConfig: {
13
- ...callerClientConfig,
14
- ..._init.parentClientConfig,
15
- },
16
- };
9
+ export const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
17
10
  init.logger?.debug("@aws-sdk/token-providers - fromSso");
18
11
  const profiles = await parseKnownFiles(init);
19
12
  const profileName = getProfileName({
@@ -62,7 +55,7 @@ export const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {
62
55
  validateTokenKey("refreshToken", ssoToken.refreshToken, true);
63
56
  try {
64
57
  lastRefreshAttemptTime.setTime(Date.now());
65
- const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init);
58
+ const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
66
59
  validateTokenKey("accessToken", newSsoOidcToken.accessToken);
67
60
  validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
68
61
  const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
@@ -1,7 +1,7 @@
1
1
  import { getSsoOidcClient } from "./getSsoOidcClient";
2
- export const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => {
2
+ export const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
3
3
  const { CreateTokenCommand } = await import("@aws-sdk/nested-clients/sso-oidc");
4
- const ssoOidcClient = await getSsoOidcClient(ssoRegion, init);
4
+ const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
5
5
  return ssoOidcClient.send(new CreateTokenCommand({
6
6
  clientId: ssoToken.clientId,
7
7
  clientSecret: ssoToken.clientSecret,
@@ -1,6 +1,6 @@
1
- export const getSsoOidcClient = async (ssoRegion, init = {}) => {
1
+ export const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
2
2
  const { SSOOIDCClient } = await import("@aws-sdk/nested-clients/sso-oidc");
3
- const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop];
3
+ const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
4
4
  const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
5
5
  region: ssoRegion ?? init.clientConfig?.region,
6
6
  logger: coalesce("logger"),
@@ -9,4 +9,4 @@ export interface FromSsoInit extends SourceProfileInit, CredentialProviderOption
9
9
  /**
10
10
  * Creates a token provider that will read from SSO token cache or ssoOidc.createToken() call.
11
11
  */
12
- export declare const fromSso: (_init?: FromSsoInit) => RuntimeConfigIdentityProvider<TokenIdentity>;
12
+ export declare const fromSso: (init?: FromSsoInit) => RuntimeConfigIdentityProvider<TokenIdentity>;
@@ -1,7 +1,8 @@
1
+ import type { AwsIdentityProperties } from "@aws-sdk/types";
1
2
  import { SSOToken } from "@smithy/shared-ini-file-loader";
2
3
  import { FromSsoInit } from "./fromSso";
3
4
  /**
4
- * Returns a new SSO OIDC token from ssoOids.createToken() API call.
5
+ * Returns a new SSO OIDC token from SSOOIDC::createToken() API call.
5
6
  * @internal
6
7
  */
7
- export declare const getNewSsoOidcToken: (ssoToken: SSOToken, ssoRegion: string, init?: FromSsoInit) => Promise<import("@aws-sdk/nested-clients/sso-oidc").CreateTokenCommandOutput>;
8
+ export declare const getNewSsoOidcToken: (ssoToken: SSOToken, ssoRegion: string, init?: FromSsoInit, callerClientConfig?: AwsIdentityProperties["callerClientConfig"]) => Promise<import("@aws-sdk/nested-clients/sso-oidc").CreateTokenCommandOutput>;
@@ -1,6 +1,7 @@
1
+ import type { AwsIdentityProperties } from "@aws-sdk/types";
1
2
  import { FromSsoInit } from "./fromSso";
2
3
  /**
3
4
  * Returns a SSOOIDC client for the given region.
4
5
  * @internal
5
6
  */
6
- export declare const getSsoOidcClient: (ssoRegion: string, init?: FromSsoInit) => Promise<import("@aws-sdk/nested-clients/sso-oidc").SSOOIDCClient>;
7
+ export declare const getSsoOidcClient: (ssoRegion: string, init?: FromSsoInit, callerClientConfig?: AwsIdentityProperties["callerClientConfig"]) => Promise<import("@aws-sdk/nested-clients/sso-oidc").SSOOIDCClient>;
@@ -10,5 +10,5 @@ export interface FromSsoInit
10
10
  clientConfig?: any;
11
11
  }
12
12
  export declare const fromSso: (
13
- _init?: FromSsoInit
13
+ init?: FromSsoInit
14
14
  ) => RuntimeConfigIdentityProvider<TokenIdentity>;
@@ -1,9 +1,11 @@
1
+ import { AwsIdentityProperties } from "@aws-sdk/types";
1
2
  import { SSOToken } from "@smithy/shared-ini-file-loader";
2
3
  import { FromSsoInit } from "./fromSso";
3
4
  export declare const getNewSsoOidcToken: (
4
5
  ssoToken: SSOToken,
5
6
  ssoRegion: string,
6
- init?: FromSsoInit
7
+ init?: FromSsoInit,
8
+ callerClientConfig?: AwsIdentityProperties["callerClientConfig"]
7
9
  ) => Promise<
8
10
  import("@aws-sdk/nested-clients/sso-oidc").CreateTokenCommandOutput
9
11
  >;
@@ -1,5 +1,7 @@
1
+ import { AwsIdentityProperties } from "@aws-sdk/types";
1
2
  import { FromSsoInit } from "./fromSso";
2
3
  export declare const getSsoOidcClient: (
3
4
  ssoRegion: string,
4
- init?: FromSsoInit
5
+ init?: FromSsoInit,
6
+ callerClientConfig?: AwsIdentityProperties["callerClientConfig"]
5
7
  ) => Promise<import("@aws-sdk/nested-clients/sso-oidc").SSOOIDCClient>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/token-providers",
3
- "version": "3.948.0",
3
+ "version": "3.952.0",
4
4
  "description": "A collection of token providers",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -30,7 +30,7 @@
30
30
  "license": "Apache-2.0",
31
31
  "dependencies": {
32
32
  "@aws-sdk/core": "3.947.0",
33
- "@aws-sdk/nested-clients": "3.948.0",
33
+ "@aws-sdk/nested-clients": "3.952.0",
34
34
  "@aws-sdk/types": "3.936.0",
35
35
  "@smithy/property-provider": "^4.2.5",
36
36
  "@smithy/shared-ini-file-loader": "^4.4.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/abort-controller",
3
- "version": "4.2.5",
3
+ "version": "4.2.6",
4
4
  "description": "A simple abort controller library",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -26,7 +26,7 @@
26
26
  "license": "Apache-2.0",
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@smithy/types": "^4.9.0",
29
+ "@smithy/types": "^4.10.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/config-resolver",
3
- "version": "4.4.3",
3
+ "version": "4.4.4",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline config-resolver",
@@ -25,11 +25,11 @@
25
25
  "license": "Apache-2.0",
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "@smithy/node-config-provider": "^4.3.5",
29
- "@smithy/types": "^4.9.0",
28
+ "@smithy/node-config-provider": "^4.3.6",
29
+ "@smithy/types": "^4.10.0",
30
30
  "@smithy/util-config-provider": "^4.2.0",
31
- "@smithy/util-endpoints": "^3.2.5",
32
- "@smithy/util-middleware": "^4.2.5",
31
+ "@smithy/util-endpoints": "^3.2.6",
32
+ "@smithy/util-middleware": "^4.2.6",
33
33
  "tslib": "^2.6.2"
34
34
  },
35
35
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.18.7",
3
+ "version": "3.19.0",
4
4
  "scripts": {
5
5
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline core",
@@ -14,7 +14,9 @@
14
14
  "extract:docs": "api-extractor run --local",
15
15
  "test:cbor:perf": "node ./scripts/cbor-perf.mjs",
16
16
  "test": "yarn g:vitest run",
17
- "test:watch": "yarn g:vitest watch"
17
+ "test:watch": "yarn g:vitest watch",
18
+ "test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
19
+ "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
18
20
  },
19
21
  "main": "./dist-cjs/index.js",
20
22
  "module": "./dist-es/index.js",
@@ -77,13 +79,13 @@
77
79
  "license": "Apache-2.0",
78
80
  "sideEffects": false,
79
81
  "dependencies": {
80
- "@smithy/middleware-serde": "^4.2.6",
81
- "@smithy/protocol-http": "^5.3.5",
82
- "@smithy/types": "^4.9.0",
82
+ "@smithy/middleware-serde": "^4.2.7",
83
+ "@smithy/protocol-http": "^5.3.6",
84
+ "@smithy/types": "^4.10.0",
83
85
  "@smithy/util-base64": "^4.3.0",
84
86
  "@smithy/util-body-length-browser": "^4.2.0",
85
- "@smithy/util-middleware": "^4.2.5",
86
- "@smithy/util-stream": "^4.5.6",
87
+ "@smithy/util-middleware": "^4.2.6",
88
+ "@smithy/util-stream": "^4.5.7",
87
89
  "@smithy/util-utf8": "^4.2.0",
88
90
  "@smithy/uuid": "^1.1.0",
89
91
  "tslib": "^2.6.2"
@@ -118,7 +120,7 @@
118
120
  "directory": "packages/core"
119
121
  },
120
122
  "devDependencies": {
121
- "@smithy/eventstream-serde-node": "^4.2.5",
123
+ "@smithy/eventstream-serde-node": "^4.2.6",
122
124
  "@types/node": "^18.11.9",
123
125
  "concurrently": "7.0.0",
124
126
  "downlevel-dts": "0.10.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/credential-provider-imds",
3
- "version": "4.2.5",
3
+ "version": "4.2.6",
4
4
  "description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -28,10 +28,10 @@
28
28
  "license": "Apache-2.0",
29
29
  "sideEffects": false,
30
30
  "dependencies": {
31
- "@smithy/node-config-provider": "^4.3.5",
32
- "@smithy/property-provider": "^4.2.5",
33
- "@smithy/types": "^4.9.0",
34
- "@smithy/url-parser": "^4.2.5",
31
+ "@smithy/node-config-provider": "^4.3.6",
32
+ "@smithy/property-provider": "^4.2.6",
33
+ "@smithy/types": "^4.10.0",
34
+ "@smithy/url-parser": "^4.2.6",
35
35
  "tslib": "^2.6.2"
36
36
  },
37
37
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/fetch-http-handler",
3
- "version": "5.3.6",
3
+ "version": "5.3.7",
4
4
  "description": "Provides a way to make requests",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
@@ -28,14 +28,14 @@
28
28
  "module": "./dist-es/index.js",
29
29
  "types": "./dist-types/index.d.ts",
30
30
  "dependencies": {
31
- "@smithy/protocol-http": "^5.3.5",
32
- "@smithy/querystring-builder": "^4.2.5",
33
- "@smithy/types": "^4.9.0",
31
+ "@smithy/protocol-http": "^5.3.6",
32
+ "@smithy/querystring-builder": "^4.2.6",
33
+ "@smithy/types": "^4.10.0",
34
34
  "@smithy/util-base64": "^4.3.0",
35
35
  "tslib": "^2.6.2"
36
36
  },
37
37
  "devDependencies": {
38
- "@smithy/abort-controller": "^4.2.5",
38
+ "@smithy/abort-controller": "^4.2.6",
39
39
  "concurrently": "7.0.0",
40
40
  "downlevel-dts": "0.10.1",
41
41
  "rimraf": "3.0.2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/hash-node",
3
- "version": "4.2.5",
3
+ "version": "4.2.6",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline hash-node",
@@ -32,7 +32,7 @@
32
32
  "typedoc": "0.23.23"
33
33
  },
34
34
  "dependencies": {
35
- "@smithy/types": "^4.9.0",
35
+ "@smithy/types": "^4.10.0",
36
36
  "@smithy/util-buffer-from": "^4.2.0",
37
37
  "@smithy/util-utf8": "^4.2.0",
38
38
  "tslib": "^2.6.2"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/invalid-dependency",
3
- "version": "4.2.5",
3
+ "version": "4.2.6",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline invalid-dependency",
@@ -24,7 +24,7 @@
24
24
  "license": "Apache-2.0",
25
25
  "sideEffects": false,
26
26
  "dependencies": {
27
- "@smithy/types": "^4.9.0",
27
+ "@smithy/types": "^4.10.0",
28
28
  "tslib": "^2.6.2"
29
29
  },
30
30
  "typesVersions": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-content-length",
3
- "version": "4.2.5",
3
+ "version": "4.2.6",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-content-length",
@@ -25,8 +25,8 @@
25
25
  "license": "Apache-2.0",
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "@smithy/protocol-http": "^5.3.5",
29
- "@smithy/types": "^4.9.0",
28
+ "@smithy/protocol-http": "^5.3.6",
29
+ "@smithy/types": "^4.10.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "engines": {
@@ -42,9 +42,17 @@ const isArnBucketName = (bucketName) => {
42
42
  return isValidArn;
43
43
  };
44
44
 
45
- const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config) => {
45
+ const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {
46
46
  const configProvider = async () => {
47
- const configValue = config[configKey] ?? config[canonicalEndpointParamKey];
47
+ let configValue;
48
+ if (isClientContextParam) {
49
+ const clientContextParams = config.clientContextParams;
50
+ const nestedValue = clientContextParams?.[configKey];
51
+ configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];
52
+ }
53
+ else {
54
+ configValue = config[configKey] ?? config[canonicalEndpointParamKey];
55
+ }
48
56
  if (typeof configValue === "function") {
49
57
  return configValue();
50
58
  }
@@ -129,7 +137,7 @@ const resolveParams = async (commandInput, instructionsSupplier, clientConfig) =
129
137
  break;
130
138
  case "clientContextParams":
131
139
  case "builtInParams":
132
- endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();
140
+ endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")();
133
141
  break;
134
142
  case "operationContextParams":
135
143
  endpointParams[name] = instruction.get(commandInput);
@@ -1,6 +1,14 @@
1
- export const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config) => {
1
+ export const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {
2
2
  const configProvider = async () => {
3
- const configValue = config[configKey] ?? config[canonicalEndpointParamKey];
3
+ let configValue;
4
+ if (isClientContextParam) {
5
+ const clientContextParams = config.clientContextParams;
6
+ const nestedValue = clientContextParams?.[configKey];
7
+ configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];
8
+ }
9
+ else {
10
+ configValue = config[configKey] ?? config[canonicalEndpointParamKey];
11
+ }
4
12
  if (typeof configValue === "function") {
5
13
  return configValue();
6
14
  }
@@ -36,7 +36,7 @@ export const resolveParams = async (commandInput, instructionsSupplier, clientCo
36
36
  break;
37
37
  case "clientContextParams":
38
38
  case "builtInParams":
39
- endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();
39
+ endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")();
40
40
  break;
41
41
  case "operationContextParams":
42
42
  endpointParams[name] = instruction.get(commandInput);
@@ -7,7 +7,8 @@
7
7
  * it will most likely not contain the config
8
8
  * value, but we use it as a fallback.
9
9
  * @param config - container of the config values.
10
+ * @param isClientContextParam - whether this is a client context parameter.
10
11
  *
11
12
  * @returns async function that will resolve with the value.
12
13
  */
13
- export declare const createConfigValueProvider: <Config extends Record<string, unknown>>(configKey: string, canonicalEndpointParamKey: string, config: Config) => () => Promise<any>;
14
+ export declare const createConfigValueProvider: <Config extends Record<string, unknown>>(configKey: string, canonicalEndpointParamKey: string, config: Config, isClientContextParam?: boolean) => () => Promise<any>;
@@ -7,7 +7,8 @@
7
7
  * it will most likely not contain the config
8
8
  * value, but we use it as a fallback.
9
9
  * @param config - container of the config values.
10
+ * @param isClientContextParam - whether this is a client context parameter.
10
11
  *
11
12
  * @returns async function that will resolve with the value.
12
13
  */
13
- export declare const createConfigValueProvider: <Config extends Record<string, unknown>>(configKey: string, canonicalEndpointParamKey: string, config: Config) => () => Promise<any>;
14
+ export declare const createConfigValueProvider: <Config extends Record<string, unknown>>(configKey: string, canonicalEndpointParamKey: string, config: Config, isClientContextParam?: boolean) => () => Promise<any>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-endpoint",
3
- "version": "4.3.14",
3
+ "version": "4.4.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-endpoint",
@@ -25,13 +25,13 @@
25
25
  "license": "Apache-2.0",
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "@smithy/core": "^3.18.7",
29
- "@smithy/middleware-serde": "^4.2.6",
30
- "@smithy/node-config-provider": "^4.3.5",
31
- "@smithy/shared-ini-file-loader": "^4.4.0",
32
- "@smithy/types": "^4.9.0",
33
- "@smithy/url-parser": "^4.2.5",
34
- "@smithy/util-middleware": "^4.2.5",
28
+ "@smithy/core": "^3.19.0",
29
+ "@smithy/middleware-serde": "^4.2.7",
30
+ "@smithy/node-config-provider": "^4.3.6",
31
+ "@smithy/shared-ini-file-loader": "^4.4.1",
32
+ "@smithy/types": "^4.10.0",
33
+ "@smithy/url-parser": "^4.2.6",
34
+ "@smithy/util-middleware": "^4.2.6",
35
35
  "tslib": "^2.6.2"
36
36
  },
37
37
  "devDependencies": {