p6-cdk-s3-protector 0.0.20 → 0.0.22
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 +6 -6
- package/lib/p6cdks3protector.js +1 -1
- package/node_modules/@aws-sdk/client-s3/package.json +3 -3
- package/node_modules/@aws-sdk/client-s3-control/package.json +2 -2
- package/node_modules/@aws-sdk/client-sts/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js +1 -2
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials.d.ts +2 -1
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProfileData.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveAssumeRoleCredentials.d.ts +3 -1
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProfileData.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-ini/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-node/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-location-constraint/dist-cjs/index.js +4 -7
- package/node_modules/@aws-sdk/middleware-location-constraint/dist-es/index.js +4 -7
- package/node_modules/@aws-sdk/middleware-location-constraint/package.json +1 -1
- package/package.json +7 -7
package/.jsii
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
]
|
|
9
9
|
},
|
|
10
10
|
"bundled": {
|
|
11
|
-
"@aws-sdk/client-s3": "^3.
|
|
12
|
-
"@aws-sdk/client-s3-control": "^3.
|
|
13
|
-
"@aws-sdk/client-sts": "^3.
|
|
11
|
+
"@aws-sdk/client-s3": "^3.913.0",
|
|
12
|
+
"@aws-sdk/client-s3-control": "^3.913.0",
|
|
13
|
+
"@aws-sdk/client-sts": "^3.913.0",
|
|
14
14
|
"@types/aws-lambda": "^8.10.156",
|
|
15
15
|
"aws-sdk": "^2.1692.0",
|
|
16
16
|
"cdk-iam-floyd": "^0.724.0",
|
|
@@ -4089,7 +4089,7 @@
|
|
|
4089
4089
|
},
|
|
4090
4090
|
"description": "AWS CDK: A Real-Time S3 Protector",
|
|
4091
4091
|
"homepage": "https://github.com/p6m7g8/p6-cdk-s3-protector.git",
|
|
4092
|
-
"jsiiVersion": "5.9.
|
|
4092
|
+
"jsiiVersion": "5.9.10 (build 0e9cf43)",
|
|
4093
4093
|
"keywords": [
|
|
4094
4094
|
"aws",
|
|
4095
4095
|
"cdk",
|
|
@@ -4172,6 +4172,6 @@
|
|
|
4172
4172
|
"symbolId": "src/p6cdks3protector:P6CDKS3Protector"
|
|
4173
4173
|
}
|
|
4174
4174
|
},
|
|
4175
|
-
"version": "0.0.
|
|
4176
|
-
"fingerprint": "
|
|
4175
|
+
"version": "0.0.22",
|
|
4176
|
+
"fingerprint": "g7K15vZIf6IK619OovcFaRg7/JARQBfP+HUGQUS5rDg="
|
|
4177
4177
|
}
|
package/lib/p6cdks3protector.js
CHANGED
|
@@ -41,7 +41,7 @@ const lambdajs = __importStar(require("aws-cdk-lib/aws-lambda-nodejs"));
|
|
|
41
41
|
const cr = __importStar(require("aws-cdk-lib/custom-resources"));
|
|
42
42
|
const floyd = __importStar(require("cdk-iam-floyd"));
|
|
43
43
|
class P6CDKS3Protector extends cdk.Resource {
|
|
44
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "p6-cdk-s3-protector.P6CDKS3Protector", version: "0.0.
|
|
44
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "p6-cdk-s3-protector.P6CDKS3Protector", version: "0.0.22" };
|
|
45
45
|
constructor(scope, id) {
|
|
46
46
|
super(scope, id);
|
|
47
47
|
const policy = new floyd.Statement.S3().allow().toPutObject().toPutObjectAcl();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-s3",
|
|
3
3
|
"description": "AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.913.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-s3",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
31
31
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
32
32
|
"@aws-sdk/core": "3.911.0",
|
|
33
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
33
|
+
"@aws-sdk/credential-provider-node": "3.913.0",
|
|
34
34
|
"@aws-sdk/middleware-bucket-endpoint": "3.910.0",
|
|
35
35
|
"@aws-sdk/middleware-expect-continue": "3.910.0",
|
|
36
36
|
"@aws-sdk/middleware-flexible-checksums": "3.911.0",
|
|
37
37
|
"@aws-sdk/middleware-host-header": "3.910.0",
|
|
38
|
-
"@aws-sdk/middleware-location-constraint": "3.
|
|
38
|
+
"@aws-sdk/middleware-location-constraint": "3.913.0",
|
|
39
39
|
"@aws-sdk/middleware-logger": "3.910.0",
|
|
40
40
|
"@aws-sdk/middleware-recursion-detection": "3.910.0",
|
|
41
41
|
"@aws-sdk/middleware-sdk-s3": "3.911.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-s3-control",
|
|
3
3
|
"description": "AWS SDK for JavaScript S3 Control Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.913.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-s3-control",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
24
24
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
25
25
|
"@aws-sdk/core": "3.911.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.913.0",
|
|
27
27
|
"@aws-sdk/middleware-bucket-endpoint": "3.910.0",
|
|
28
28
|
"@aws-sdk/middleware-host-header": "3.910.0",
|
|
29
29
|
"@aws-sdk/middleware-logger": "3.910.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sts",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.913.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-sts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
24
24
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
25
25
|
"@aws-sdk/core": "3.911.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.913.0",
|
|
27
27
|
"@aws-sdk/middleware-host-header": "3.910.0",
|
|
28
28
|
"@aws-sdk/middleware-logger": "3.910.0",
|
|
29
29
|
"@aws-sdk/middleware-recursion-detection": "3.910.0",
|
|
@@ -56,7 +56,7 @@ const isCredentialSourceProfile = (arg, { profile, logger }) => {
|
|
|
56
56
|
}
|
|
57
57
|
return withProviderProfile;
|
|
58
58
|
};
|
|
59
|
-
const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => {
|
|
59
|
+
const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}, resolveProfileData) => {
|
|
60
60
|
options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
|
|
61
61
|
const profileData = profiles[profileName];
|
|
62
62
|
const { source_profile, region } = profileData;
|
|
@@ -176,7 +176,7 @@ const resolveProfileData = async (profileName, profiles, options, visitedProfile
|
|
|
176
176
|
return resolveStaticCredentials(data, options);
|
|
177
177
|
}
|
|
178
178
|
if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
|
|
179
|
-
return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);
|
|
179
|
+
return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles, resolveProfileData);
|
|
180
180
|
}
|
|
181
181
|
if (isStaticCredsProfile(data)) {
|
|
182
182
|
return resolveStaticCredentials(data, options);
|
|
@@ -2,7 +2,6 @@ import { setCredentialFeature } from "@aws-sdk/core/client";
|
|
|
2
2
|
import { CredentialsProviderError } from "@smithy/property-provider";
|
|
3
3
|
import { getProfileName } from "@smithy/shared-ini-file-loader";
|
|
4
4
|
import { resolveCredentialSource } from "./resolveCredentialSource";
|
|
5
|
-
import { resolveProfileData } from "./resolveProfileData";
|
|
6
5
|
export const isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
|
|
7
6
|
return (Boolean(arg) &&
|
|
8
7
|
typeof arg === "object" &&
|
|
@@ -26,7 +25,7 @@ const isCredentialSourceProfile = (arg, { profile, logger }) => {
|
|
|
26
25
|
}
|
|
27
26
|
return withProviderProfile;
|
|
28
27
|
};
|
|
29
|
-
export const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => {
|
|
28
|
+
export const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}, resolveProfileData) => {
|
|
30
29
|
options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
|
|
31
30
|
const profileData = profiles[profileName];
|
|
32
31
|
const { source_profile, region } = profileData;
|
|
@@ -10,7 +10,7 @@ export const resolveProfileData = async (profileName, profiles, options, visited
|
|
|
10
10
|
return resolveStaticCredentials(data, options);
|
|
11
11
|
}
|
|
12
12
|
if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
|
|
13
|
-
return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);
|
|
13
|
+
return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles, resolveProfileData);
|
|
14
14
|
}
|
|
15
15
|
if (isStaticCredsProfile(data)) {
|
|
16
16
|
return resolveStaticCredentials(data, options);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Logger, ParsedIniData } from "@smithy/types";
|
|
2
2
|
import { FromIniInit } from "./fromIni";
|
|
3
|
+
import type { ResolveProfileData } from "./resolveProfileData";
|
|
3
4
|
/**
|
|
4
5
|
* @internal
|
|
5
6
|
*
|
|
@@ -44,4 +45,4 @@ export declare const isAssumeRoleProfile: (arg: any, { profile, logger }?: {
|
|
|
44
45
|
/**
|
|
45
46
|
* @internal
|
|
46
47
|
*/
|
|
47
|
-
export declare const resolveAssumeRoleCredentials: (profileName: string, profiles: ParsedIniData, options: FromIniInit, visitedProfiles
|
|
48
|
+
export declare const resolveAssumeRoleCredentials: (profileName: string, profiles: ParsedIniData, options: FromIniInit, visitedProfiles: Record<string, true> | undefined, resolveProfileData: ResolveProfileData) => Promise<import("@aws-sdk/types").AttributedAwsCredentialIdentity>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Logger, ParsedIniData } from "@smithy/types";
|
|
2
2
|
import { FromIniInit } from "./fromIni";
|
|
3
|
+
import { ResolveProfileData } from "./resolveProfileData";
|
|
3
4
|
export interface AssumeRoleParams {
|
|
4
5
|
RoleArn: string;
|
|
5
6
|
RoleSessionName: string;
|
|
@@ -22,5 +23,6 @@ export declare const resolveAssumeRoleCredentials: (
|
|
|
22
23
|
profileName: string,
|
|
23
24
|
profiles: ParsedIniData,
|
|
24
25
|
options: FromIniInit,
|
|
25
|
-
visitedProfiles
|
|
26
|
+
visitedProfiles: Record<string, true> | undefined,
|
|
27
|
+
resolveProfileData: ResolveProfileData
|
|
26
28
|
) => Promise<import("@aws-sdk/types").AttributedAwsCredentialIdentity>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.913.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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-node",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.913.0",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from a Node.JS environment. ",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@aws-sdk/credential-provider-env": "3.911.0",
|
|
35
35
|
"@aws-sdk/credential-provider-http": "3.911.0",
|
|
36
|
-
"@aws-sdk/credential-provider-ini": "3.
|
|
36
|
+
"@aws-sdk/credential-provider-ini": "3.913.0",
|
|
37
37
|
"@aws-sdk/credential-provider-process": "3.911.0",
|
|
38
38
|
"@aws-sdk/credential-provider-sso": "3.911.0",
|
|
39
39
|
"@aws-sdk/credential-provider-web-identity": "3.911.0",
|
|
@@ -5,13 +5,10 @@ function locationConstraintMiddleware(options) {
|
|
|
5
5
|
const { CreateBucketConfiguration } = args.input;
|
|
6
6
|
const region = await options.region();
|
|
7
7
|
if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
input
|
|
11
|
-
|
|
12
|
-
CreateBucketConfiguration: region === "us-east-1" ? undefined : { LocationConstraint: region },
|
|
13
|
-
},
|
|
14
|
-
};
|
|
8
|
+
if (region !== "us-east-1") {
|
|
9
|
+
args.input.CreateBucketConfiguration = args.input.CreateBucketConfiguration ?? {};
|
|
10
|
+
args.input.CreateBucketConfiguration.LocationConstraint = region;
|
|
11
|
+
}
|
|
15
12
|
}
|
|
16
13
|
return next(args);
|
|
17
14
|
};
|
|
@@ -3,13 +3,10 @@ export function locationConstraintMiddleware(options) {
|
|
|
3
3
|
const { CreateBucketConfiguration } = args.input;
|
|
4
4
|
const region = await options.region();
|
|
5
5
|
if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
input
|
|
9
|
-
|
|
10
|
-
CreateBucketConfiguration: region === "us-east-1" ? undefined : { LocationConstraint: region },
|
|
11
|
-
},
|
|
12
|
-
};
|
|
6
|
+
if (region !== "us-east-1") {
|
|
7
|
+
args.input.CreateBucketConfiguration = args.input.CreateBucketConfiguration ?? {};
|
|
8
|
+
args.input.CreateBucketConfiguration.LocationConstraint = region;
|
|
9
|
+
}
|
|
13
10
|
}
|
|
14
11
|
return next(args);
|
|
15
12
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-location-constraint",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.913.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline middleware-location-constraint",
|
package/package.json
CHANGED
|
@@ -62,15 +62,15 @@
|
|
|
62
62
|
"cdk-dia": "^0.12.1",
|
|
63
63
|
"constructs": "^10.4.2",
|
|
64
64
|
"esbuild": "^0.25.11",
|
|
65
|
-
"eslint": "^9.
|
|
65
|
+
"eslint": "^9.38.0",
|
|
66
66
|
"eslint-plugin-import": "^2.32.0",
|
|
67
67
|
"http-server": "^14.1.1",
|
|
68
68
|
"jest": "^30.2.0",
|
|
69
|
-
"jsii": "^5.9.
|
|
69
|
+
"jsii": "^5.9.10",
|
|
70
70
|
"jsii-diff": "^1.116.0",
|
|
71
71
|
"jsii-docgen": "^10.10.1",
|
|
72
72
|
"jsii-pacmak": "^1.116.0",
|
|
73
|
-
"jsii-rosetta": "^5.9.
|
|
73
|
+
"jsii-rosetta": "^5.9.11",
|
|
74
74
|
"publib": "^0.2.1024",
|
|
75
75
|
"ts-jest": "^29.4.5",
|
|
76
76
|
"ts-node": "^10.9.2",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"constructs": "^10.4.2"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@aws-sdk/client-s3": "^3.
|
|
85
|
-
"@aws-sdk/client-s3-control": "^3.
|
|
86
|
-
"@aws-sdk/client-sts": "^3.
|
|
84
|
+
"@aws-sdk/client-s3": "^3.913.0",
|
|
85
|
+
"@aws-sdk/client-s3-control": "^3.913.0",
|
|
86
|
+
"@aws-sdk/client-sts": "^3.913.0",
|
|
87
87
|
"@types/aws-lambda": "^8.10.156",
|
|
88
88
|
"aws-cdk-lib": "^2.220.0",
|
|
89
89
|
"aws-sdk": "^2.1692.0",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"main": "lib/index.js",
|
|
113
113
|
"types": "lib/index.d.ts",
|
|
114
114
|
"license": "Apache-2.0",
|
|
115
|
-
"version": "0.0.
|
|
115
|
+
"version": "0.0.22",
|
|
116
116
|
"jsii": {
|
|
117
117
|
"outdir": "dist",
|
|
118
118
|
"tsc": {
|