@jjrawlins/cdk-iam-policy-builder-helper 0.0.68 → 0.0.70
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 +4 -4
- package/cdk-iam-policy-builder-helper/jsii/jsii.go +2 -2
- package/cdk-iam-policy-builder-helper/version +1 -1
- package/lib/constructs/Actions.d.ts +2 -0
- package/lib/constructs/Actions.js +3 -1
- package/methods_list.txt +2 -0
- package/node_modules/@aws/lambda-invoke-store/README.md +8 -0
- package/node_modules/@aws/lambda-invoke-store/{dist → dist-cjs}/invoke-store.js +12 -36
- package/node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js +64 -0
- package/node_modules/@aws/lambda-invoke-store/{dist → dist-types}/invoke-store.d.ts +5 -0
- package/node_modules/@aws/lambda-invoke-store/package.json +26 -8
- package/node_modules/@aws-sdk/client-iam/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/node_modules/@aws-sdk/client-iam/package.json +12 -12
- package/node_modules/@aws-sdk/client-sso/package.json +11 -11
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +108 -45
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js +55 -46
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +54 -0
- package/node_modules/@aws-sdk/credential-provider-node/dist-types/defaultProvider.d.ts +3 -2
- package/node_modules/@aws-sdk/credential-provider-node/dist-types/runtime/memoize-chain.d.ts +18 -0
- package/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/defaultProvider.d.ts +3 -2
- package/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/runtime/memoize-chain.d.ts +19 -0
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +4 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +13 -6
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js +13 -6
- package/node_modules/@aws-sdk/nested-clients/package.json +11 -11
- package/node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +7 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/stsRegionDefaultResolver.js +20 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/stsRegionDefaultResolver.native.js +6 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-es/index.js +1 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.browser.js +3 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.js +16 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.native.js +3 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-types/index.d.ts +1 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/stsRegionDefaultResolver.browser.d.ts +4 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/stsRegionDefaultResolver.d.ts +14 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/stsRegionDefaultResolver.native.d.ts +4 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/index.d.ts +1 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/stsRegionDefaultResolver.browser.d.ts +1 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/stsRegionDefaultResolver.d.ts +7 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/stsRegionDefaultResolver.native.d.ts +1 -0
- package/node_modules/@aws-sdk/region-config-resolver/package.json +8 -3
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@aws-sdk/types/dist-types/credentials.d.ts +1 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts +1 -0
- package/node_modules/@aws-sdk/types/package.json +1 -1
- package/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +3 -3
- package/node_modules/axios/CHANGELOG.md +15 -3
- package/node_modules/axios/dist/axios.js +2 -2
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +2 -2
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +2 -2
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +3 -3
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/lib/adapters/http.js +1 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/package.json +1 -1
- package/package.json +6 -6
package/methods_list.txt
CHANGED
|
@@ -10378,6 +10378,7 @@ kinesis:StopStreamEncryption
|
|
|
10378
10378
|
kinesis:SubscribeToShard
|
|
10379
10379
|
kinesis:TagResource
|
|
10380
10380
|
kinesis:UntagResource
|
|
10381
|
+
kinesis:UpdateMaxRecordSize
|
|
10381
10382
|
kinesis:UpdateShardCount
|
|
10382
10383
|
kinesis:UpdateStreamMode
|
|
10383
10384
|
kinesisanalytics:AddApplicationCloudWatchLoggingOption
|
|
@@ -17931,6 +17932,7 @@ support:DescribeTrustedAdvisorCheckSummaries
|
|
|
17931
17932
|
support:GetInteraction
|
|
17932
17933
|
support:InitiateCallForCase
|
|
17933
17934
|
support:InitiateChatForCase
|
|
17935
|
+
support:InitiateLiveContactForCase
|
|
17934
17936
|
support:PutCaseAttributes
|
|
17935
17937
|
support:RateCaseCommunication
|
|
17936
17938
|
support:RefreshTrustedAdvisorCheck
|
|
@@ -99,6 +99,14 @@ Convenience method to get the current request ID.
|
|
|
99
99
|
const requestId = InvokeStore.getRequestId(); // Returns '-' if outside context
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
+
### InvokeStore.getTenantId()
|
|
103
|
+
|
|
104
|
+
Convenience method to get the tenant ID.
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
const requestId = InvokeStore.getTenantId();
|
|
108
|
+
```
|
|
109
|
+
|
|
102
110
|
### InvokeStore.getXRayTraceId()
|
|
103
111
|
|
|
104
112
|
Convenience method to get the current [X-Ray trace ID](https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-traces). This ID is used for distributed tracing across AWS services.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA provides an escape hatch since we're modifying the global object which may not be expected to a customer's handler.
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var async_hooks = require('async_hooks');
|
|
4
|
+
|
|
6
5
|
const noGlobalAwsLambda = process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "1" ||
|
|
7
6
|
process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "true";
|
|
8
7
|
if (!noGlobalAwsLambda) {
|
|
@@ -11,37 +10,21 @@ if (!noGlobalAwsLambda) {
|
|
|
11
10
|
const PROTECTED_KEYS = {
|
|
12
11
|
REQUEST_ID: Symbol("_AWS_LAMBDA_REQUEST_ID"),
|
|
13
12
|
X_RAY_TRACE_ID: Symbol("_AWS_LAMBDA_X_RAY_TRACE_ID"),
|
|
13
|
+
TENANT_ID: Symbol("_AWS_LAMBDA_TENANT_ID"),
|
|
14
14
|
};
|
|
15
|
-
/**
|
|
16
|
-
* InvokeStore implementation class
|
|
17
|
-
*/
|
|
18
15
|
class InvokeStoreImpl {
|
|
19
|
-
static storage = new
|
|
20
|
-
// Protected keys for Lambda context fields
|
|
16
|
+
static storage = new async_hooks.AsyncLocalStorage();
|
|
21
17
|
static PROTECTED_KEYS = PROTECTED_KEYS;
|
|
22
|
-
/**
|
|
23
|
-
* Initialize and run code within an invoke context
|
|
24
|
-
*/
|
|
25
18
|
static run(context, fn) {
|
|
26
19
|
return this.storage.run({ ...context }, fn);
|
|
27
20
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Get the complete current context
|
|
30
|
-
*/
|
|
31
21
|
static getContext() {
|
|
32
22
|
return this.storage.getStore();
|
|
33
23
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Get a specific value from the context by key
|
|
36
|
-
*/
|
|
37
24
|
static get(key) {
|
|
38
25
|
const context = this.storage.getStore();
|
|
39
26
|
return context?.[key];
|
|
40
27
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Set a custom value in the current context
|
|
43
|
-
* Protected Lambda context fields cannot be overwritten
|
|
44
|
-
*/
|
|
45
28
|
static set(key, value) {
|
|
46
29
|
if (this.isProtectedKey(key)) {
|
|
47
30
|
throw new Error(`Cannot modify protected Lambda context field`);
|
|
@@ -51,27 +34,18 @@ class InvokeStoreImpl {
|
|
|
51
34
|
context[key] = value;
|
|
52
35
|
}
|
|
53
36
|
}
|
|
54
|
-
/**
|
|
55
|
-
* Get the current request ID
|
|
56
|
-
*/
|
|
57
37
|
static getRequestId() {
|
|
58
38
|
return this.get(this.PROTECTED_KEYS.REQUEST_ID) ?? "-";
|
|
59
39
|
}
|
|
60
|
-
/**
|
|
61
|
-
* Get the current X-ray trace ID
|
|
62
|
-
*/
|
|
63
40
|
static getXRayTraceId() {
|
|
64
41
|
return this.get(this.PROTECTED_KEYS.X_RAY_TRACE_ID);
|
|
65
42
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
43
|
+
static getTenantId() {
|
|
44
|
+
return this.get(this.PROTECTED_KEYS.TENANT_ID);
|
|
45
|
+
}
|
|
69
46
|
static hasContext() {
|
|
70
47
|
return this.storage.getStore() !== undefined;
|
|
71
48
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Check if a key is protected (readonly Lambda context field)
|
|
74
|
-
*/
|
|
75
49
|
static isProtectedKey(key) {
|
|
76
50
|
return (key === this.PROTECTED_KEYS.REQUEST_ID ||
|
|
77
51
|
key === this.PROTECTED_KEYS.X_RAY_TRACE_ID);
|
|
@@ -87,4 +61,6 @@ else {
|
|
|
87
61
|
globalThis.awslambda.InvokeStore = instance;
|
|
88
62
|
}
|
|
89
63
|
}
|
|
90
|
-
|
|
64
|
+
const InvokeStore = instance;
|
|
65
|
+
|
|
66
|
+
exports.InvokeStore = InvokeStore;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'async_hooks';
|
|
2
|
+
|
|
3
|
+
const noGlobalAwsLambda = process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "1" ||
|
|
4
|
+
process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "true";
|
|
5
|
+
if (!noGlobalAwsLambda) {
|
|
6
|
+
globalThis.awslambda = globalThis.awslambda || {};
|
|
7
|
+
}
|
|
8
|
+
const PROTECTED_KEYS = {
|
|
9
|
+
REQUEST_ID: Symbol("_AWS_LAMBDA_REQUEST_ID"),
|
|
10
|
+
X_RAY_TRACE_ID: Symbol("_AWS_LAMBDA_X_RAY_TRACE_ID"),
|
|
11
|
+
TENANT_ID: Symbol("_AWS_LAMBDA_TENANT_ID"),
|
|
12
|
+
};
|
|
13
|
+
class InvokeStoreImpl {
|
|
14
|
+
static storage = new AsyncLocalStorage();
|
|
15
|
+
static PROTECTED_KEYS = PROTECTED_KEYS;
|
|
16
|
+
static run(context, fn) {
|
|
17
|
+
return this.storage.run({ ...context }, fn);
|
|
18
|
+
}
|
|
19
|
+
static getContext() {
|
|
20
|
+
return this.storage.getStore();
|
|
21
|
+
}
|
|
22
|
+
static get(key) {
|
|
23
|
+
const context = this.storage.getStore();
|
|
24
|
+
return context?.[key];
|
|
25
|
+
}
|
|
26
|
+
static set(key, value) {
|
|
27
|
+
if (this.isProtectedKey(key)) {
|
|
28
|
+
throw new Error(`Cannot modify protected Lambda context field`);
|
|
29
|
+
}
|
|
30
|
+
const context = this.storage.getStore();
|
|
31
|
+
if (context) {
|
|
32
|
+
context[key] = value;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
static getRequestId() {
|
|
36
|
+
return this.get(this.PROTECTED_KEYS.REQUEST_ID) ?? "-";
|
|
37
|
+
}
|
|
38
|
+
static getXRayTraceId() {
|
|
39
|
+
return this.get(this.PROTECTED_KEYS.X_RAY_TRACE_ID);
|
|
40
|
+
}
|
|
41
|
+
static getTenantId() {
|
|
42
|
+
return this.get(this.PROTECTED_KEYS.TENANT_ID);
|
|
43
|
+
}
|
|
44
|
+
static hasContext() {
|
|
45
|
+
return this.storage.getStore() !== undefined;
|
|
46
|
+
}
|
|
47
|
+
static isProtectedKey(key) {
|
|
48
|
+
return (key === this.PROTECTED_KEYS.REQUEST_ID ||
|
|
49
|
+
key === this.PROTECTED_KEYS.X_RAY_TRACE_ID);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
let instance;
|
|
53
|
+
if (!noGlobalAwsLambda && globalThis.awslambda?.InvokeStore) {
|
|
54
|
+
instance = globalThis.awslambda.InvokeStore;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
instance = InvokeStoreImpl;
|
|
58
|
+
if (!noGlobalAwsLambda && globalThis.awslambda) {
|
|
59
|
+
globalThis.awslambda.InvokeStore = instance;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const InvokeStore = instance;
|
|
63
|
+
|
|
64
|
+
export { InvokeStore };
|
|
@@ -13,6 +13,7 @@ declare class InvokeStoreImpl {
|
|
|
13
13
|
static readonly PROTECTED_KEYS: {
|
|
14
14
|
readonly REQUEST_ID: symbol;
|
|
15
15
|
readonly X_RAY_TRACE_ID: symbol;
|
|
16
|
+
readonly TENANT_ID: symbol;
|
|
16
17
|
};
|
|
17
18
|
/**
|
|
18
19
|
* Initialize and run code within an invoke context
|
|
@@ -39,6 +40,10 @@ declare class InvokeStoreImpl {
|
|
|
39
40
|
* Get the current X-ray trace ID
|
|
40
41
|
*/
|
|
41
42
|
static getXRayTraceId(): string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Get the current tenant ID
|
|
45
|
+
*/
|
|
46
|
+
static getTenantId(): string | undefined;
|
|
42
47
|
/**
|
|
43
48
|
* Check if we're currently within an invoke context
|
|
44
49
|
*/
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws/lambda-invoke-store",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Invoke scoped data storage for AWS Lambda Node.js Runtime Environment",
|
|
5
5
|
"homepage": "https://github.com/awslabs/aws-lambda-invoke-store",
|
|
6
|
-
"main": "./dist/invoke-store.js",
|
|
7
|
-
"
|
|
6
|
+
"main": "./dist-cjs/invoke-store.js",
|
|
7
|
+
"module": "./dist-es/invoke-store.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist-types/invoke-store.d.ts",
|
|
11
|
+
"module": "./dist-es/invoke-store.js",
|
|
12
|
+
"node": "./dist-cjs/invoke-store.js",
|
|
13
|
+
"import": "./dist-es/invoke-store.js",
|
|
14
|
+
"require": "./dist-cjs/invoke-store.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
8
17
|
"files": [
|
|
9
|
-
"dist"
|
|
18
|
+
"dist-es",
|
|
19
|
+
"dist-cjs",
|
|
20
|
+
"dist-types"
|
|
10
21
|
],
|
|
11
22
|
"repository": {
|
|
12
23
|
"type": "git",
|
|
@@ -18,15 +29,22 @@
|
|
|
18
29
|
"url": "http://aws.amazon.com"
|
|
19
30
|
},
|
|
20
31
|
"scripts": {
|
|
21
|
-
"build": "
|
|
32
|
+
"build": "yarn clean && yarn build:types && node ./scripts/build-rollup.js",
|
|
33
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
34
|
+
"clean": "rm -rf dist-types dist-cjs dist-es",
|
|
22
35
|
"test": "vitest run",
|
|
23
36
|
"test:watch": "vitest watch",
|
|
24
|
-
"
|
|
37
|
+
"release": "yarn build && changeset publish"
|
|
25
38
|
},
|
|
26
39
|
"devDependencies": {
|
|
40
|
+
"@changesets/cli": "^2.29.6",
|
|
41
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
42
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
27
43
|
"@tsconfig/node18": "^18.2.4",
|
|
28
|
-
"@types/node": "^18.19.
|
|
29
|
-
"
|
|
44
|
+
"@types/node": "^18.19.130",
|
|
45
|
+
"rollup": "^4.52.5",
|
|
46
|
+
"tslib": "^2.8.1",
|
|
47
|
+
"typescript": "^5.9.3",
|
|
30
48
|
"vitest": "^3.1.1"
|
|
31
49
|
},
|
|
32
50
|
"engines": {
|
|
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: IAMClientConfig) => {
|
|
|
8
8
|
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
|
|
9
9
|
authSchemePreference: string[] | import("@smithy/types").Provider<string[]>;
|
|
10
10
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
11
|
-
credentialDefaultProvider: ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider) | ((init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit) => import("@
|
|
11
|
+
credentialDefaultProvider: ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider) | ((init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit) => import("@aws-sdk/credential-provider-node/dist-types/runtime/memoize-chain").MemoizedRuntimeConfigAwsCredentialIdentityProvider);
|
|
12
12
|
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-node").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
|
|
13
13
|
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
14
14
|
region: string | import("@smithy/types").Provider<string>;
|
|
@@ -11,9 +11,7 @@ export declare const getRuntimeConfig: (config: IAMClientConfig) => {
|
|
|
11
11
|
| ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider)
|
|
12
12
|
| ((
|
|
13
13
|
init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit
|
|
14
|
-
) => import("@
|
|
15
|
-
import("@smithy/types").AwsCredentialIdentity
|
|
16
|
-
>);
|
|
14
|
+
) => import("@aws-sdk/credential-provider-node/dist-types/runtime/memoize-chain").MemoizedRuntimeConfigAwsCredentialIdentityProvider);
|
|
17
15
|
defaultUserAgentProvider: (
|
|
18
16
|
config?: import("@aws-sdk/util-user-agent-node").PreviouslyResolved
|
|
19
17
|
) => Promise<import("@smithy/types").UserAgent>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-iam",
|
|
3
3
|
"description": "AWS SDK for JavaScript Iam Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.920.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-iam",
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/core": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
26
|
-
"@aws-sdk/middleware-logger": "3.
|
|
27
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
28
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
29
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
30
|
-
"@aws-sdk/types": "3.
|
|
31
|
-
"@aws-sdk/util-endpoints": "3.
|
|
32
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
33
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
23
|
+
"@aws-sdk/core": "3.920.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.920.0",
|
|
25
|
+
"@aws-sdk/middleware-host-header": "3.920.0",
|
|
26
|
+
"@aws-sdk/middleware-logger": "3.920.0",
|
|
27
|
+
"@aws-sdk/middleware-recursion-detection": "3.920.0",
|
|
28
|
+
"@aws-sdk/middleware-user-agent": "3.920.0",
|
|
29
|
+
"@aws-sdk/region-config-resolver": "3.920.0",
|
|
30
|
+
"@aws-sdk/types": "3.920.0",
|
|
31
|
+
"@aws-sdk/util-endpoints": "3.920.0",
|
|
32
|
+
"@aws-sdk/util-user-agent-browser": "3.920.0",
|
|
33
|
+
"@aws-sdk/util-user-agent-node": "3.920.0",
|
|
34
34
|
"@smithy/config-resolver": "^4.4.0",
|
|
35
35
|
"@smithy/core": "^3.17.1",
|
|
36
36
|
"@smithy/fetch-http-handler": "^5.3.4",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sso",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.920.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/core": "3.
|
|
24
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
25
|
-
"@aws-sdk/middleware-logger": "3.
|
|
26
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
27
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
28
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
29
|
-
"@aws-sdk/types": "3.
|
|
30
|
-
"@aws-sdk/util-endpoints": "3.
|
|
31
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
32
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
23
|
+
"@aws-sdk/core": "3.920.0",
|
|
24
|
+
"@aws-sdk/middleware-host-header": "3.920.0",
|
|
25
|
+
"@aws-sdk/middleware-logger": "3.920.0",
|
|
26
|
+
"@aws-sdk/middleware-recursion-detection": "3.920.0",
|
|
27
|
+
"@aws-sdk/middleware-user-agent": "3.920.0",
|
|
28
|
+
"@aws-sdk/region-config-resolver": "3.920.0",
|
|
29
|
+
"@aws-sdk/types": "3.920.0",
|
|
30
|
+
"@aws-sdk/util-endpoints": "3.920.0",
|
|
31
|
+
"@aws-sdk/util-user-agent-browser": "3.920.0",
|
|
32
|
+
"@aws-sdk/util-user-agent-node": "3.920.0",
|
|
33
33
|
"@smithy/config-resolver": "^4.4.0",
|
|
34
34
|
"@smithy/core": "^3.17.1",
|
|
35
35
|
"@smithy/fetch-http-handler": "^5.3.4",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.920.0",
|
|
4
4
|
"description": "Core functions & classes shared by multiple AWS SDK clients.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"license": "Apache-2.0",
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@aws-sdk/types": "3.
|
|
84
|
+
"@aws-sdk/types": "3.920.0",
|
|
85
85
|
"@aws-sdk/xml-builder": "3.914.0",
|
|
86
86
|
"@smithy/core": "^3.17.1",
|
|
87
87
|
"@smithy/node-config-provider": "^4.3.3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-env",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.920.0",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from known environment variables",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@aws-sdk/core": "3.
|
|
30
|
-
"@aws-sdk/types": "3.
|
|
29
|
+
"@aws-sdk/core": "3.920.0",
|
|
30
|
+
"@aws-sdk/types": "3.920.0",
|
|
31
31
|
"@smithy/property-provider": "^4.2.3",
|
|
32
32
|
"@smithy/types": "^4.8.0",
|
|
33
33
|
"tslib": "^2.6.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-http",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.920.0",
|
|
4
4
|
"description": "AWS credential provider for containers and HTTP sources",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"license": "Apache-2.0",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aws-sdk/core": "3.
|
|
32
|
-
"@aws-sdk/types": "3.
|
|
31
|
+
"@aws-sdk/core": "3.920.0",
|
|
32
|
+
"@aws-sdk/types": "3.920.0",
|
|
33
33
|
"@smithy/fetch-http-handler": "^5.3.4",
|
|
34
34
|
"@smithy/node-http-handler": "^4.4.3",
|
|
35
35
|
"@smithy/property-provider": "^4.2.3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.920.0",
|
|
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",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
},
|
|
29
29
|
"license": "Apache-2.0",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aws-sdk/core": "3.
|
|
32
|
-
"@aws-sdk/credential-provider-env": "3.
|
|
33
|
-
"@aws-sdk/credential-provider-http": "3.
|
|
34
|
-
"@aws-sdk/credential-provider-process": "3.
|
|
35
|
-
"@aws-sdk/credential-provider-sso": "3.
|
|
36
|
-
"@aws-sdk/credential-provider-web-identity": "3.
|
|
37
|
-
"@aws-sdk/nested-clients": "3.
|
|
38
|
-
"@aws-sdk/types": "3.
|
|
31
|
+
"@aws-sdk/core": "3.920.0",
|
|
32
|
+
"@aws-sdk/credential-provider-env": "3.920.0",
|
|
33
|
+
"@aws-sdk/credential-provider-http": "3.920.0",
|
|
34
|
+
"@aws-sdk/credential-provider-process": "3.920.0",
|
|
35
|
+
"@aws-sdk/credential-provider-sso": "3.920.0",
|
|
36
|
+
"@aws-sdk/credential-provider-web-identity": "3.920.0",
|
|
37
|
+
"@aws-sdk/nested-clients": "3.920.0",
|
|
38
|
+
"@aws-sdk/types": "3.920.0",
|
|
39
39
|
"@smithy/credential-provider-imds": "^4.2.3",
|
|
40
40
|
"@smithy/property-provider": "^4.2.3",
|
|
41
41
|
"@smithy/shared-ini-file-loader": "^4.3.3",
|
|
@@ -21,17 +21,73 @@ const remoteProvider = async (init) => {
|
|
|
21
21
|
return fromInstanceMetadata(init);
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
+
function memoizeChain(providers, treatAsExpired) {
|
|
25
|
+
const chain = internalCreateChain(providers);
|
|
26
|
+
let activeLock;
|
|
27
|
+
let passiveLock;
|
|
28
|
+
let credentials;
|
|
29
|
+
const provider = async (options) => {
|
|
30
|
+
if (options?.forceRefresh) {
|
|
31
|
+
return await chain(options);
|
|
32
|
+
}
|
|
33
|
+
if (credentials?.expiration) {
|
|
34
|
+
if (credentials?.expiration?.getTime() < Date.now()) {
|
|
35
|
+
credentials = undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (activeLock) {
|
|
39
|
+
await activeLock;
|
|
40
|
+
}
|
|
41
|
+
else if (!credentials || treatAsExpired?.(credentials)) {
|
|
42
|
+
if (credentials) {
|
|
43
|
+
if (!passiveLock) {
|
|
44
|
+
passiveLock = chain(options).then((c) => {
|
|
45
|
+
credentials = c;
|
|
46
|
+
passiveLock = undefined;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
activeLock = chain(options).then((c) => {
|
|
52
|
+
credentials = c;
|
|
53
|
+
activeLock = undefined;
|
|
54
|
+
});
|
|
55
|
+
return provider(options);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return credentials;
|
|
59
|
+
};
|
|
60
|
+
return provider;
|
|
61
|
+
}
|
|
62
|
+
const internalCreateChain = (providers) => async (awsIdentityProperties) => {
|
|
63
|
+
let lastProviderError;
|
|
64
|
+
for (const provider of providers) {
|
|
65
|
+
try {
|
|
66
|
+
return await provider(awsIdentityProperties);
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
lastProviderError = err;
|
|
70
|
+
if (err?.tryNextLink) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
throw err;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
throw lastProviderError;
|
|
77
|
+
};
|
|
78
|
+
|
|
24
79
|
let multipleCredentialSourceWarningEmitted = false;
|
|
25
|
-
const defaultProvider = (init = {}) =>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
80
|
+
const defaultProvider = (init = {}) => memoizeChain([
|
|
81
|
+
async () => {
|
|
82
|
+
const profile = init.profile ?? process.env[sharedIniFileLoader.ENV_PROFILE];
|
|
83
|
+
if (profile) {
|
|
84
|
+
const envStaticCredentialsAreSet = process.env[credentialProviderEnv.ENV_KEY] && process.env[credentialProviderEnv.ENV_SECRET];
|
|
85
|
+
if (envStaticCredentialsAreSet) {
|
|
86
|
+
if (!multipleCredentialSourceWarningEmitted) {
|
|
87
|
+
const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger"
|
|
88
|
+
? init.logger.warn.bind(init.logger)
|
|
89
|
+
: console.warn;
|
|
90
|
+
warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
|
35
91
|
Multiple credential sources detected:
|
|
36
92
|
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
|
37
93
|
This SDK will proceed with the AWS_PROFILE value.
|
|
@@ -40,45 +96,52 @@ const defaultProvider = (init = {}) => propertyProvider.memoize(propertyProvider
|
|
|
40
96
|
Please ensure that your environment only sets either the AWS_PROFILE or the
|
|
41
97
|
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
|
42
98
|
`);
|
|
43
|
-
|
|
99
|
+
multipleCredentialSourceWarningEmitted = true;
|
|
100
|
+
}
|
|
44
101
|
}
|
|
102
|
+
throw new propertyProvider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
|
|
103
|
+
logger: init.logger,
|
|
104
|
+
tryNextLink: true,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
|
|
108
|
+
return credentialProviderEnv.fromEnv(init)();
|
|
109
|
+
},
|
|
110
|
+
async (awsIdentityProperties) => {
|
|
111
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
|
|
112
|
+
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
|
|
113
|
+
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
|
|
114
|
+
throw new propertyProvider.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
|
|
45
115
|
}
|
|
46
|
-
|
|
116
|
+
const { fromSSO } = await import('@aws-sdk/credential-provider-sso');
|
|
117
|
+
return fromSSO(init)(awsIdentityProperties);
|
|
118
|
+
},
|
|
119
|
+
async (awsIdentityProperties) => {
|
|
120
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
|
|
121
|
+
const { fromIni } = await import('@aws-sdk/credential-provider-ini');
|
|
122
|
+
return fromIni(init)(awsIdentityProperties);
|
|
123
|
+
},
|
|
124
|
+
async (awsIdentityProperties) => {
|
|
125
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
|
|
126
|
+
const { fromProcess } = await import('@aws-sdk/credential-provider-process');
|
|
127
|
+
return fromProcess(init)(awsIdentityProperties);
|
|
128
|
+
},
|
|
129
|
+
async (awsIdentityProperties) => {
|
|
130
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
|
|
131
|
+
const { fromTokenFile } = await import('@aws-sdk/credential-provider-web-identity');
|
|
132
|
+
return fromTokenFile(init)(awsIdentityProperties);
|
|
133
|
+
},
|
|
134
|
+
async () => {
|
|
135
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider");
|
|
136
|
+
return (await remoteProvider(init))();
|
|
137
|
+
},
|
|
138
|
+
async () => {
|
|
139
|
+
throw new propertyProvider.CredentialsProviderError("Could not load credentials from any providers", {
|
|
140
|
+
tryNextLink: false,
|
|
47
141
|
logger: init.logger,
|
|
48
|
-
tryNextLink: true,
|
|
49
142
|
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return credentialProviderEnv.fromEnv(init)();
|
|
53
|
-
}, async () => {
|
|
54
|
-
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
|
|
55
|
-
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
|
|
56
|
-
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
|
|
57
|
-
throw new propertyProvider.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
|
|
58
|
-
}
|
|
59
|
-
const { fromSSO } = await import('@aws-sdk/credential-provider-sso');
|
|
60
|
-
return fromSSO(init)();
|
|
61
|
-
}, async () => {
|
|
62
|
-
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
|
|
63
|
-
const { fromIni } = await import('@aws-sdk/credential-provider-ini');
|
|
64
|
-
return fromIni(init)();
|
|
65
|
-
}, async () => {
|
|
66
|
-
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
|
|
67
|
-
const { fromProcess } = await import('@aws-sdk/credential-provider-process');
|
|
68
|
-
return fromProcess(init)();
|
|
69
|
-
}, async () => {
|
|
70
|
-
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
|
|
71
|
-
const { fromTokenFile } = await import('@aws-sdk/credential-provider-web-identity');
|
|
72
|
-
return fromTokenFile(init)();
|
|
73
|
-
}, async () => {
|
|
74
|
-
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider");
|
|
75
|
-
return (await remoteProvider(init))();
|
|
76
|
-
}, async () => {
|
|
77
|
-
throw new propertyProvider.CredentialsProviderError("Could not load credentials from any providers", {
|
|
78
|
-
tryNextLink: false,
|
|
79
|
-
logger: init.logger,
|
|
80
|
-
});
|
|
81
|
-
}), credentialsTreatedAsExpired, credentialsWillNeedRefresh);
|
|
143
|
+
},
|
|
144
|
+
], credentialsTreatedAsExpired);
|
|
82
145
|
const credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined;
|
|
83
146
|
const credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000;
|
|
84
147
|
|