@cdklabs/cdk-ecs-codedeploy 0.0.241 → 0.0.242
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/.jsii +3 -3
- package/lib/api-canary/index.js +1 -1
- package/lib/ecs-appspec/index.js +1 -1
- package/lib/ecs-deployment/index.js +1 -1
- package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/README.md +10 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +32 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +65 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttpTypes.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +59 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +17 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js +5 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +5 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js +42 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.browser.js +27 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js +59 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttpTypes.js +1 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js +53 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js +13 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/index.browser.js +1 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/index.js +1 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/checkUrl.d.ts +7 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.browser.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttpTypes.d.ts +69 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/requestHelpers.d.ts +11 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/retry-wrapper.d.ts +10 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/index.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/index.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/checkUrl.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttp.browser.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttp.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttpTypes.d.ts +18 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/requestHelpers.d.ts +7 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/retry-wrapper.d.ts +8 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/index.browser.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/index.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-http/package.json +67 -0
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +7 -10
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js +4 -8
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +1 -0
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveSsoCredentials.d.ts +2 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveSsoCredentials.d.ts +4 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +5 -4
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js +4 -3
- package/node_modules/@aws-sdk/credential-provider-node/dist-types/remoteProvider.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-node/package.json +4 -3
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +9 -6
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js +3 -5
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js +5 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/resolveSSOCredentials.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/resolveSSOCredentials.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const retryWrapper = (toRetry, maxRetries, delayMs) => {
|
|
2
|
+
return async () => {
|
|
3
|
+
for (let i = 0; i < maxRetries; ++i) {
|
|
4
|
+
try {
|
|
5
|
+
return await toRetry();
|
|
6
|
+
}
|
|
7
|
+
catch (e) {
|
|
8
|
+
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return await toRetry();
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { fromHttp } from "./fromHttp/fromHttp.browser";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { fromHttp } from "./fromHttp/fromHttp";
|
package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.browser.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AwsCredentialIdentityProvider } from "@smithy/types";
|
|
2
|
+
import type { FromHttpOptions } from "./fromHttpTypes";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a provider that gets credentials via HTTP request.
|
|
5
|
+
*/
|
|
6
|
+
export declare const fromHttp: (options: FromHttpOptions) => AwsCredentialIdentityProvider;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AwsCredentialIdentityProvider } from "@smithy/types";
|
|
2
|
+
import type { FromHttpOptions } from "./fromHttpTypes";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a provider that gets credentials via HTTP request.
|
|
5
|
+
*/
|
|
6
|
+
export declare const fromHttp: (options: FromHttpOptions) => AwsCredentialIdentityProvider;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { CredentialProviderOptions } from "@aws-sdk/types";
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*
|
|
5
|
+
* Input for the fromHttp function in the HTTP Credentials Provider for Node.js.
|
|
6
|
+
*/
|
|
7
|
+
export interface FromHttpOptions extends CredentialProviderOptions {
|
|
8
|
+
/**
|
|
9
|
+
* If this value is provided, it will be used as-is.
|
|
10
|
+
*
|
|
11
|
+
* For browser environments, use instead {@link credentialsFullUri}.
|
|
12
|
+
*/
|
|
13
|
+
awsContainerCredentialsFullUri?: string;
|
|
14
|
+
/**
|
|
15
|
+
* If this value is provided instead of the full URI, it
|
|
16
|
+
* will be appended to the default link local host of 169.254.170.2.
|
|
17
|
+
*
|
|
18
|
+
* Not supported in browsers.
|
|
19
|
+
*/
|
|
20
|
+
awsContainerCredentialsRelativeUri?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Will be read on each credentials request to
|
|
23
|
+
* add an Authorization request header value.
|
|
24
|
+
*
|
|
25
|
+
* Not supported in browsers.
|
|
26
|
+
*/
|
|
27
|
+
awsContainerAuthorizationTokenFile?: string;
|
|
28
|
+
/**
|
|
29
|
+
* An alternative to awsContainerAuthorizationTokenFile,
|
|
30
|
+
* this is the token value itself.
|
|
31
|
+
*
|
|
32
|
+
* For browser environments, use instead {@link authorizationToken}.
|
|
33
|
+
*/
|
|
34
|
+
awsContainerAuthorizationToken?: string;
|
|
35
|
+
/**
|
|
36
|
+
* BROWSER ONLY.
|
|
37
|
+
*
|
|
38
|
+
* In browsers, a relative URI is not allowed, and a full URI must be provided.
|
|
39
|
+
* HTTPS is required.
|
|
40
|
+
*
|
|
41
|
+
* This value is required for the browser environment.
|
|
42
|
+
*/
|
|
43
|
+
credentialsFullUri?: string;
|
|
44
|
+
/**
|
|
45
|
+
* BROWSER ONLY.
|
|
46
|
+
*
|
|
47
|
+
* Providing this value will set an "Authorization" request
|
|
48
|
+
* header value on the GET request.
|
|
49
|
+
*/
|
|
50
|
+
authorizationToken?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Default is 3 retry attempts or 4 total attempts.
|
|
53
|
+
*/
|
|
54
|
+
maxRetries?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Default is 1000ms. Time in milliseconds to spend waiting between retry attempts.
|
|
57
|
+
*/
|
|
58
|
+
timeout?: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
export type HttpProviderCredentials = {
|
|
64
|
+
AccessKeyId: string;
|
|
65
|
+
SecretAccessKey: string;
|
|
66
|
+
Token: string;
|
|
67
|
+
AccountId?: string;
|
|
68
|
+
Expiration: string;
|
|
69
|
+
};
|
package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/requestHelpers.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AwsCredentialIdentity } from "@aws-sdk/types";
|
|
2
|
+
import { HttpRequest } from "@smithy/protocol-http";
|
|
3
|
+
import { HttpResponse } from "@smithy/types";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare function createGetRequest(url: URL): HttpRequest;
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function getCredentials(response: HttpResponse): Promise<AwsCredentialIdentity>;
|
package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/checkUrl.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const checkUrl: (url: URL) => void;
|
package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttpTypes.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CredentialProviderOptions } from "@aws-sdk/types";
|
|
2
|
+
export interface FromHttpOptions extends CredentialProviderOptions {
|
|
3
|
+
awsContainerCredentialsFullUri?: string;
|
|
4
|
+
awsContainerCredentialsRelativeUri?: string;
|
|
5
|
+
awsContainerAuthorizationTokenFile?: string;
|
|
6
|
+
awsContainerAuthorizationToken?: string;
|
|
7
|
+
credentialsFullUri?: string;
|
|
8
|
+
authorizationToken?: string;
|
|
9
|
+
maxRetries?: number;
|
|
10
|
+
timeout?: number;
|
|
11
|
+
}
|
|
12
|
+
export type HttpProviderCredentials = {
|
|
13
|
+
AccessKeyId: string;
|
|
14
|
+
SecretAccessKey: string;
|
|
15
|
+
Token: string;
|
|
16
|
+
AccountId?: string;
|
|
17
|
+
Expiration: string;
|
|
18
|
+
};
|
package/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/requestHelpers.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AwsCredentialIdentity } from "@aws-sdk/types";
|
|
2
|
+
import { HttpRequest } from "@smithy/protocol-http";
|
|
3
|
+
import { HttpResponse } from "@smithy/types";
|
|
4
|
+
export declare function createGetRequest(url: URL): HttpRequest;
|
|
5
|
+
export declare function getCredentials(
|
|
6
|
+
response: HttpResponse
|
|
7
|
+
): Promise<AwsCredentialIdentity>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aws-sdk/credential-provider-http",
|
|
3
|
+
"version": "3.503.1",
|
|
4
|
+
"description": "AWS credential provider for containers and HTTP sources",
|
|
5
|
+
"main": "./dist-cjs/index.js",
|
|
6
|
+
"module": "./dist-es/index.js",
|
|
7
|
+
"browser": "./dist-es/index.browser.js",
|
|
8
|
+
"react-native": "./dist-es/index.browser.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
11
|
+
"build:cjs": "node ../../scripts/compilation/inline credential-provider-http",
|
|
12
|
+
"build:es": "tsc -p tsconfig.es.json",
|
|
13
|
+
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
|
|
14
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
15
|
+
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
16
|
+
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
|
|
17
|
+
"test": "jest"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"aws",
|
|
21
|
+
"credentials"
|
|
22
|
+
],
|
|
23
|
+
"author": {
|
|
24
|
+
"name": "AWS SDK for JavaScript Team",
|
|
25
|
+
"url": "https://aws.amazon.com/javascript/"
|
|
26
|
+
},
|
|
27
|
+
"license": "Apache-2.0",
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@aws-sdk/types": "3.502.0",
|
|
30
|
+
"@smithy/fetch-http-handler": "^2.4.1",
|
|
31
|
+
"@smithy/node-http-handler": "^2.3.1",
|
|
32
|
+
"@smithy/property-provider": "^2.1.1",
|
|
33
|
+
"@smithy/protocol-http": "^3.1.1",
|
|
34
|
+
"@smithy/smithy-client": "^2.3.1",
|
|
35
|
+
"@smithy/types": "^2.9.1",
|
|
36
|
+
"@smithy/util-stream": "^2.1.1",
|
|
37
|
+
"tslib": "^2.5.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@tsconfig/recommended": "1.0.1",
|
|
41
|
+
"@types/node": "^14.14.31",
|
|
42
|
+
"concurrently": "7.0.0",
|
|
43
|
+
"downlevel-dts": "0.10.1",
|
|
44
|
+
"rimraf": "3.0.2",
|
|
45
|
+
"typescript": "~4.9.5"
|
|
46
|
+
},
|
|
47
|
+
"types": "./dist-types/index.d.ts",
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=14.0.0"
|
|
50
|
+
},
|
|
51
|
+
"typesVersions": {
|
|
52
|
+
"<4.0": {
|
|
53
|
+
"dist-types/*": [
|
|
54
|
+
"dist-types/ts3.4/*"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"files": [
|
|
59
|
+
"dist-*/**"
|
|
60
|
+
],
|
|
61
|
+
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/credential-provider-http",
|
|
62
|
+
"repository": {
|
|
63
|
+
"type": "git",
|
|
64
|
+
"url": "https://github.com/aws/aws-sdk-js-v3.git",
|
|
65
|
+
"directory": "packages/credential-provider-http"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -130,15 +130,11 @@ var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile)
|
|
|
130
130
|
), "resolveProcessCredentials");
|
|
131
131
|
|
|
132
132
|
// src/resolveSsoCredentials.ts
|
|
133
|
-
var resolveSsoCredentials = /* @__PURE__ */ __name(async (
|
|
134
|
-
const { fromSSO
|
|
135
|
-
const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = validateSsoProfile(data);
|
|
133
|
+
var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => {
|
|
134
|
+
const { fromSSO } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-sso")));
|
|
136
135
|
return fromSSO({
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
ssoSession: sso_session,
|
|
140
|
-
ssoRegion: sso_region,
|
|
141
|
-
ssoRoleName: sso_role_name
|
|
136
|
+
profile,
|
|
137
|
+
logger: options.logger
|
|
142
138
|
})();
|
|
143
139
|
}, "resolveSsoCredentials");
|
|
144
140
|
var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
|
|
@@ -163,7 +159,8 @@ var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, optio
|
|
|
163
159
|
webIdentityTokenFile: profile.web_identity_token_file,
|
|
164
160
|
roleArn: profile.role_arn,
|
|
165
161
|
roleSessionName: profile.role_session_name,
|
|
166
|
-
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity
|
|
162
|
+
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
|
|
163
|
+
logger: options.logger
|
|
167
164
|
})()
|
|
168
165
|
), "resolveWebIdentityCredentials");
|
|
169
166
|
|
|
@@ -186,7 +183,7 @@ var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, op
|
|
|
186
183
|
return resolveProcessCredentials(options, profileName);
|
|
187
184
|
}
|
|
188
185
|
if (isSsoProfile(data)) {
|
|
189
|
-
return await resolveSsoCredentials(
|
|
186
|
+
return await resolveSsoCredentials(profileName, options);
|
|
190
187
|
}
|
|
191
188
|
throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
|
|
192
189
|
}, "resolveProfileData");
|
|
@@ -22,7 +22,7 @@ export const resolveProfileData = async (profileName, profiles, options, visited
|
|
|
22
22
|
return resolveProcessCredentials(options, profileName);
|
|
23
23
|
}
|
|
24
24
|
if (isSsoProfile(data)) {
|
|
25
|
-
return await resolveSsoCredentials(
|
|
25
|
+
return await resolveSsoCredentials(profileName, options);
|
|
26
26
|
}
|
|
27
27
|
throw new CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
|
|
28
28
|
};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
export const resolveSsoCredentials = async (
|
|
2
|
-
const { fromSSO
|
|
3
|
-
const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = validateSsoProfile(data);
|
|
1
|
+
export const resolveSsoCredentials = async (profile, options = {}) => {
|
|
2
|
+
const { fromSSO } = await import("@aws-sdk/credential-provider-sso");
|
|
4
3
|
return fromSSO({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ssoSession: sso_session,
|
|
8
|
-
ssoRegion: sso_region,
|
|
9
|
-
ssoRoleName: sso_role_name,
|
|
4
|
+
profile,
|
|
5
|
+
logger: options.logger,
|
|
10
6
|
})();
|
|
11
7
|
};
|
|
12
8
|
export const isSsoProfile = (arg) => arg &&
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { SsoProfile } from "@aws-sdk/credential-provider-sso";
|
|
2
|
+
import type { CredentialProviderOptions } from "@aws-sdk/types";
|
|
2
3
|
import type { Profile } from "@smithy/types";
|
|
3
4
|
/**
|
|
4
5
|
* @internal
|
|
5
6
|
*/
|
|
6
|
-
export declare const resolveSsoCredentials: (
|
|
7
|
+
export declare const resolveSsoCredentials: (profile: string, options?: CredentialProviderOptions) => Promise<import("@aws-sdk/types").AwsCredentialIdentity>;
|
|
7
8
|
/**
|
|
8
9
|
* @internal
|
|
9
10
|
* duplicated from \@aws-sdk/credential-provider-sso to defer import.
|
package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveSsoCredentials.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { SsoProfile } from "@aws-sdk/credential-provider-sso";
|
|
2
|
+
import { CredentialProviderOptions } from "@aws-sdk/types";
|
|
2
3
|
import { Profile } from "@smithy/types";
|
|
3
4
|
export declare const resolveSsoCredentials: (
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
profile: string,
|
|
6
|
+
options?: CredentialProviderOptions
|
|
7
|
+
) => Promise<import("@aws-sdk/types").AwsCredentialIdentity>;
|
|
6
8
|
export declare const isSsoProfile: (arg: Profile) => arg is Partial<SsoProfile>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.503.1",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@aws-sdk/client-sts": "3.502.0",
|
|
28
28
|
"@aws-sdk/credential-provider-env": "3.502.0",
|
|
29
29
|
"@aws-sdk/credential-provider-process": "3.502.0",
|
|
30
|
-
"@aws-sdk/credential-provider-sso": "3.
|
|
30
|
+
"@aws-sdk/credential-provider-sso": "3.503.1",
|
|
31
31
|
"@aws-sdk/credential-provider-web-identity": "3.502.0",
|
|
32
32
|
"@aws-sdk/types": "3.502.0",
|
|
33
33
|
"@smithy/credential-provider-imds": "^2.2.1",
|
|
@@ -47,8 +47,9 @@ var remoteProvider = /* @__PURE__ */ __name(async (init) => {
|
|
|
47
47
|
var _a, _b;
|
|
48
48
|
const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require("@smithy/credential-provider-imds")));
|
|
49
49
|
if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
|
|
50
|
-
(_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromContainerMetadata");
|
|
51
|
-
|
|
50
|
+
(_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromHttp/fromContainerMetadata");
|
|
51
|
+
const { fromHttp } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-http")));
|
|
52
|
+
return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init));
|
|
52
53
|
}
|
|
53
54
|
if (process.env[ENV_IMDS_DISABLED]) {
|
|
54
55
|
return async () => {
|
|
@@ -73,8 +74,8 @@ var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_
|
|
|
73
74
|
async () => {
|
|
74
75
|
var _a;
|
|
75
76
|
(_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromSSO");
|
|
76
|
-
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName } = init;
|
|
77
|
-
if (!ssoStartUrl
|
|
77
|
+
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
|
|
78
|
+
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
|
|
78
79
|
throw new import_property_provider.CredentialsProviderError(
|
|
79
80
|
"Skipping SSO provider in default chain (inputs do not include SSO fields)."
|
|
80
81
|
);
|
|
@@ -11,8 +11,8 @@ export const defaultProvider = (init = {}) => memoize(chain(...(init.profile ||
|
|
|
11
11
|
},
|
|
12
12
|
]), async () => {
|
|
13
13
|
init.logger?.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromSSO");
|
|
14
|
-
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName } = init;
|
|
15
|
-
if (!ssoStartUrl
|
|
14
|
+
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
|
|
15
|
+
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
|
|
16
16
|
throw new CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).");
|
|
17
17
|
}
|
|
18
18
|
const { fromSSO } = await import("@aws-sdk/credential-provider-sso");
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { CredentialsProviderError } from "@smithy/property-provider";
|
|
1
|
+
import { chain, CredentialsProviderError } from "@smithy/property-provider";
|
|
2
2
|
export const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
|
|
3
3
|
export const remoteProvider = async (init) => {
|
|
4
4
|
const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import("@smithy/credential-provider-imds");
|
|
5
5
|
if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
|
|
6
|
-
init.logger?.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromContainerMetadata");
|
|
7
|
-
|
|
6
|
+
init.logger?.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromHttp/fromContainerMetadata");
|
|
7
|
+
const { fromHttp } = await import("@aws-sdk/credential-provider-http");
|
|
8
|
+
return chain(fromHttp(init), fromContainerMetadata(init));
|
|
8
9
|
}
|
|
9
10
|
if (process.env[ENV_IMDS_DISABLED]) {
|
|
10
11
|
return async () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-node",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.503.1",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from a Node.JS environment. ",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=14.0.0"
|
|
@@ -28,9 +28,10 @@
|
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@aws-sdk/credential-provider-env": "3.502.0",
|
|
31
|
-
"@aws-sdk/credential-provider-
|
|
31
|
+
"@aws-sdk/credential-provider-http": "3.503.1",
|
|
32
|
+
"@aws-sdk/credential-provider-ini": "3.503.1",
|
|
32
33
|
"@aws-sdk/credential-provider-process": "3.502.0",
|
|
33
|
-
"@aws-sdk/credential-provider-sso": "3.
|
|
34
|
+
"@aws-sdk/credential-provider-sso": "3.503.1",
|
|
34
35
|
"@aws-sdk/credential-provider-web-identity": "3.502.0",
|
|
35
36
|
"@aws-sdk/types": "3.502.0",
|
|
36
37
|
"@smithy/credential-provider-imds": "^2.2.1",
|
|
@@ -61,6 +61,7 @@ var resolveSSOCredentials = /* @__PURE__ */ __name(async ({
|
|
|
61
61
|
ssoRegion,
|
|
62
62
|
ssoRoleName,
|
|
63
63
|
ssoClient,
|
|
64
|
+
clientConfig,
|
|
64
65
|
profile
|
|
65
66
|
}) => {
|
|
66
67
|
let token;
|
|
@@ -93,7 +94,11 @@ var resolveSSOCredentials = /* @__PURE__ */ __name(async ({
|
|
|
93
94
|
}
|
|
94
95
|
const { accessToken } = token;
|
|
95
96
|
const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports));
|
|
96
|
-
const sso = ssoClient || new SSOClient2(
|
|
97
|
+
const sso = ssoClient || new SSOClient2(
|
|
98
|
+
Object.assign({}, clientConfig ?? {}, {
|
|
99
|
+
region: (clientConfig == null ? void 0 : clientConfig.region) ?? ssoRegion
|
|
100
|
+
})
|
|
101
|
+
);
|
|
97
102
|
let ssoResp;
|
|
98
103
|
try {
|
|
99
104
|
ssoResp = await sso.send(
|
|
@@ -134,11 +139,7 @@ var fromSSO = /* @__PURE__ */ __name((init = {}) => async () => {
|
|
|
134
139
|
var _a;
|
|
135
140
|
(_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-sso", "fromSSO");
|
|
136
141
|
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
|
|
137
|
-
|
|
138
|
-
if (!ssoClient) {
|
|
139
|
-
const { SSOClient: SSOClient2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports));
|
|
140
|
-
ssoClient = new SSOClient2(init.clientConfig ?? {});
|
|
141
|
-
}
|
|
142
|
+
const { ssoClient } = init;
|
|
142
143
|
const profileName = (0, import_shared_ini_file_loader.getProfileName)(init);
|
|
143
144
|
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
|
|
144
145
|
const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
|
|
@@ -170,6 +171,7 @@ var fromSSO = /* @__PURE__ */ __name((init = {}) => async () => {
|
|
|
170
171
|
ssoRegion: sso_region,
|
|
171
172
|
ssoRoleName: sso_role_name,
|
|
172
173
|
ssoClient,
|
|
174
|
+
clientConfig: init.clientConfig,
|
|
173
175
|
profile: profileName
|
|
174
176
|
});
|
|
175
177
|
} else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
|
|
@@ -184,6 +186,7 @@ var fromSSO = /* @__PURE__ */ __name((init = {}) => async () => {
|
|
|
184
186
|
ssoRegion,
|
|
185
187
|
ssoRoleName,
|
|
186
188
|
ssoClient,
|
|
189
|
+
clientConfig: init.clientConfig,
|
|
187
190
|
profile: profileName
|
|
188
191
|
});
|
|
189
192
|
}
|
|
@@ -6,11 +6,7 @@ import { validateSsoProfile } from "./validateSsoProfile";
|
|
|
6
6
|
export const fromSSO = (init = {}) => async () => {
|
|
7
7
|
init.logger?.debug("@aws-sdk/credential-provider-sso", "fromSSO");
|
|
8
8
|
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
|
|
9
|
-
|
|
10
|
-
if (!ssoClient) {
|
|
11
|
-
const { SSOClient } = await import("./loadSso");
|
|
12
|
-
ssoClient = new SSOClient(init.clientConfig ?? {});
|
|
13
|
-
}
|
|
9
|
+
const { ssoClient } = init;
|
|
14
10
|
const profileName = getProfileName(init);
|
|
15
11
|
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
|
|
16
12
|
const profiles = await parseKnownFiles(init);
|
|
@@ -42,6 +38,7 @@ export const fromSSO = (init = {}) => async () => {
|
|
|
42
38
|
ssoRegion: sso_region,
|
|
43
39
|
ssoRoleName: sso_role_name,
|
|
44
40
|
ssoClient: ssoClient,
|
|
41
|
+
clientConfig: init.clientConfig,
|
|
45
42
|
profile: profileName,
|
|
46
43
|
});
|
|
47
44
|
}
|
|
@@ -57,6 +54,7 @@ export const fromSSO = (init = {}) => async () => {
|
|
|
57
54
|
ssoRegion,
|
|
58
55
|
ssoRoleName,
|
|
59
56
|
ssoClient,
|
|
57
|
+
clientConfig: init.clientConfig,
|
|
60
58
|
profile: profileName,
|
|
61
59
|
});
|
|
62
60
|
}
|
|
@@ -2,7 +2,7 @@ import { fromSso as getSsoTokenProvider } from "@aws-sdk/token-providers";
|
|
|
2
2
|
import { CredentialsProviderError } from "@smithy/property-provider";
|
|
3
3
|
import { getSSOTokenFromFile } from "@smithy/shared-ini-file-loader";
|
|
4
4
|
const SHOULD_FAIL_CREDENTIAL_CHAIN = false;
|
|
5
|
-
export const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, profile, }) => {
|
|
5
|
+
export const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, profile, }) => {
|
|
6
6
|
let token;
|
|
7
7
|
const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
|
|
8
8
|
if (ssoSession) {
|
|
@@ -30,7 +30,10 @@ export const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccoun
|
|
|
30
30
|
}
|
|
31
31
|
const { accessToken } = token;
|
|
32
32
|
const { SSOClient, GetRoleCredentialsCommand } = await import("./loadSso");
|
|
33
|
-
const sso = ssoClient ||
|
|
33
|
+
const sso = ssoClient ||
|
|
34
|
+
new SSOClient(Object.assign({}, clientConfig ?? {}, {
|
|
35
|
+
region: clientConfig?.region ?? ssoRegion,
|
|
36
|
+
}));
|
|
34
37
|
let ssoResp;
|
|
35
38
|
try {
|
|
36
39
|
ssoResp = await sso.send(new GetRoleCredentialsCommand({
|
|
@@ -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, profile, }: FromSSOInit & SsoCredentialsParameters) => Promise<AwsCredentialIdentity>;
|
|
6
|
+
export declare const resolveSSOCredentials: ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, profile, }: FromSSOInit & SsoCredentialsParameters) => Promise<AwsCredentialIdentity>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-sso",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.503.1",
|
|
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",
|