@aws-sdk/client-accessanalyzer 3.595.0 → 3.598.0
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/dist-types/commands/CheckAccessNotGrantedCommand.d.ts +82 -0
- package/dist-types/commands/CheckNoPublicAccessCommand.d.ts +43 -0
- package/dist-types/commands/GenerateFindingRecommendationCommand.d.ts +24 -0
- package/dist-types/commands/GetFindingRecommendationCommand.d.ts +97 -0
- package/package.json +37 -37
|
@@ -92,6 +92,88 @@ declare const CheckAccessNotGrantedCommand_base: {
|
|
|
92
92
|
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
|
|
93
93
|
*
|
|
94
94
|
* @public
|
|
95
|
+
* @example Passing check. Restrictive identity policy.
|
|
96
|
+
* ```javascript
|
|
97
|
+
* //
|
|
98
|
+
* const input = {
|
|
99
|
+
* "access": [
|
|
100
|
+
* {
|
|
101
|
+
* "actions": [
|
|
102
|
+
* "s3:PutObject"
|
|
103
|
+
* ]
|
|
104
|
+
* }
|
|
105
|
+
* ],
|
|
106
|
+
* "policyDocument": "{\"Version\":\"2012-10-17\",\"Id\":\"123\",\"Statement\":[{\"Sid\":\"AllowJohnDoe\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:user/JohnDoe\"},\"Action\":\"s3:GetObject\",\"Resource\":\"*\"}]}",
|
|
107
|
+
* "policyType": "RESOURCE_POLICY"
|
|
108
|
+
* };
|
|
109
|
+
* const command = new CheckAccessNotGrantedCommand(input);
|
|
110
|
+
* const response = await client.send(command);
|
|
111
|
+
* /* response ==
|
|
112
|
+
* {
|
|
113
|
+
* "message": "The policy document does not grant access to perform the listed actions or resources.",
|
|
114
|
+
* "result": "PASS"
|
|
115
|
+
* }
|
|
116
|
+
* *\/
|
|
117
|
+
* // example id: example-1
|
|
118
|
+
* ```
|
|
119
|
+
*
|
|
120
|
+
* @example Passing check. Restrictive S3 Bucket resource policy.
|
|
121
|
+
* ```javascript
|
|
122
|
+
* //
|
|
123
|
+
* const input = {
|
|
124
|
+
* "access": [
|
|
125
|
+
* {
|
|
126
|
+
* "resources": [
|
|
127
|
+
* "arn:aws:s3:::sensitive-bucket/*"
|
|
128
|
+
* ]
|
|
129
|
+
* }
|
|
130
|
+
* ],
|
|
131
|
+
* "policyDocument": "{\"Version\":\"2012-10-17\",\"Id\":\"123\",\"Statement\":[{\"Sid\":\"AllowJohnDoe\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:user/JohnDoe\"},\"Action\":\"s3:PutObject\",\"Resource\":\"arn:aws:s3:::non-sensitive-bucket/*\"}]}",
|
|
132
|
+
* "policyType": "RESOURCE_POLICY"
|
|
133
|
+
* };
|
|
134
|
+
* const command = new CheckAccessNotGrantedCommand(input);
|
|
135
|
+
* const response = await client.send(command);
|
|
136
|
+
* /* response ==
|
|
137
|
+
* {
|
|
138
|
+
* "message": "The policy document does not grant access to perform the listed actions or resources.",
|
|
139
|
+
* "result": "PASS"
|
|
140
|
+
* }
|
|
141
|
+
* *\/
|
|
142
|
+
* // example id: example-2
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* @example Failing check. Permissive S3 Bucket resource policy.
|
|
146
|
+
* ```javascript
|
|
147
|
+
* //
|
|
148
|
+
* const input = {
|
|
149
|
+
* "access": [
|
|
150
|
+
* {
|
|
151
|
+
* "resources": [
|
|
152
|
+
* "arn:aws:s3:::my-bucket/*"
|
|
153
|
+
* ]
|
|
154
|
+
* }
|
|
155
|
+
* ],
|
|
156
|
+
* "policyDocument": "{\"Version\":\"2012-10-17\",\"Id\":\"123\",\"Statement\":[{\"Sid\":\"AllowJohnDoe\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:user/JohnDoe\"},\"Action\":\"s3:PutObject\",\"Resource\":\"arn:aws:s3:::my-bucket/*\"}]}",
|
|
157
|
+
* "policyType": "RESOURCE_POLICY"
|
|
158
|
+
* };
|
|
159
|
+
* const command = new CheckAccessNotGrantedCommand(input);
|
|
160
|
+
* const response = await client.send(command);
|
|
161
|
+
* /* response ==
|
|
162
|
+
* {
|
|
163
|
+
* "message": "The policy document grants access to perform one or more of the listed actions or resources.",
|
|
164
|
+
* "reasons": [
|
|
165
|
+
* {
|
|
166
|
+
* "description": "One or more of the listed actions or resources in the statement with sid: AllowJohnDoe.",
|
|
167
|
+
* "statementId": "AllowJohnDoe",
|
|
168
|
+
* "statementIndex": 0
|
|
169
|
+
* }
|
|
170
|
+
* ],
|
|
171
|
+
* "result": "FAIL"
|
|
172
|
+
* }
|
|
173
|
+
* *\/
|
|
174
|
+
* // example id: example-3
|
|
175
|
+
* ```
|
|
176
|
+
*
|
|
95
177
|
*/
|
|
96
178
|
export declare class CheckAccessNotGrantedCommand extends CheckAccessNotGrantedCommand_base {
|
|
97
179
|
}
|
|
@@ -83,6 +83,49 @@ declare const CheckNoPublicAccessCommand_base: {
|
|
|
83
83
|
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
|
|
84
84
|
*
|
|
85
85
|
* @public
|
|
86
|
+
* @example Passing check. S3 Bucket policy without public access.
|
|
87
|
+
* ```javascript
|
|
88
|
+
* //
|
|
89
|
+
* const input = {
|
|
90
|
+
* "policyDocument": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Bob\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::111122223333:user/JohnDoe\"},\"Action\":[\"s3:GetObject\"]}]}",
|
|
91
|
+
* "resourceType": "AWS::S3::Bucket"
|
|
92
|
+
* };
|
|
93
|
+
* const command = new CheckNoPublicAccessCommand(input);
|
|
94
|
+
* const response = await client.send(command);
|
|
95
|
+
* /* response ==
|
|
96
|
+
* {
|
|
97
|
+
* "message": "The resource policy does not grant public access for the given resource type.",
|
|
98
|
+
* "result": "PASS"
|
|
99
|
+
* }
|
|
100
|
+
* *\/
|
|
101
|
+
* // example id: example-1
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* @example Failing check. S3 Bucket policy with public access.
|
|
105
|
+
* ```javascript
|
|
106
|
+
* //
|
|
107
|
+
* const input = {
|
|
108
|
+
* "policyDocument": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Bob\",\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":[\"s3:GetObject\"]}]}",
|
|
109
|
+
* "resourceType": "AWS::S3::Bucket"
|
|
110
|
+
* };
|
|
111
|
+
* const command = new CheckNoPublicAccessCommand(input);
|
|
112
|
+
* const response = await client.send(command);
|
|
113
|
+
* /* response ==
|
|
114
|
+
* {
|
|
115
|
+
* "message": "The resource policy grants public access for the given resource type.",
|
|
116
|
+
* "reasons": [
|
|
117
|
+
* {
|
|
118
|
+
* "description": "Public access granted in the following statement with sid: Bob.",
|
|
119
|
+
* "statementId": "Bob",
|
|
120
|
+
* "statementIndex": 0
|
|
121
|
+
* }
|
|
122
|
+
* ],
|
|
123
|
+
* "result": "FAIL"
|
|
124
|
+
* }
|
|
125
|
+
* *\/
|
|
126
|
+
* // example id: example-2
|
|
127
|
+
* ```
|
|
128
|
+
*
|
|
86
129
|
*/
|
|
87
130
|
export declare class CheckNoPublicAccessCommand extends CheckNoPublicAccessCommand_base {
|
|
88
131
|
}
|
|
@@ -66,6 +66,30 @@ declare const GenerateFindingRecommendationCommand_base: {
|
|
|
66
66
|
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
|
|
67
67
|
*
|
|
68
68
|
* @public
|
|
69
|
+
* @example Successfully started generating finding recommendation
|
|
70
|
+
* ```javascript
|
|
71
|
+
* //
|
|
72
|
+
* const input = {
|
|
73
|
+
* "analyzerArn": "arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a",
|
|
74
|
+
* "id": "finding-id"
|
|
75
|
+
* };
|
|
76
|
+
* const command = new GenerateFindingRecommendationCommand(input);
|
|
77
|
+
* await client.send(command);
|
|
78
|
+
* // example id: example-1
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @example Failed field validation for id value
|
|
82
|
+
* ```javascript
|
|
83
|
+
* //
|
|
84
|
+
* const input = {
|
|
85
|
+
* "analyzerArn": "arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a",
|
|
86
|
+
* "id": "!"
|
|
87
|
+
* };
|
|
88
|
+
* const command = new GenerateFindingRecommendationCommand(input);
|
|
89
|
+
* await client.send(command);
|
|
90
|
+
* // example id: example-2
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
69
93
|
*/
|
|
70
94
|
export declare class GenerateFindingRecommendationCommand extends GenerateFindingRecommendationCommand_base {
|
|
71
95
|
}
|
|
@@ -92,6 +92,103 @@ declare const GetFindingRecommendationCommand_base: {
|
|
|
92
92
|
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
|
|
93
93
|
*
|
|
94
94
|
* @public
|
|
95
|
+
* @example Successfully fetched finding recommendation
|
|
96
|
+
* ```javascript
|
|
97
|
+
* //
|
|
98
|
+
* const input = {
|
|
99
|
+
* "analyzerArn": "arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a",
|
|
100
|
+
* "id": "finding-id",
|
|
101
|
+
* "maxResults": 3,
|
|
102
|
+
* "nextToken": "token"
|
|
103
|
+
* };
|
|
104
|
+
* const command = new GetFindingRecommendationCommand(input);
|
|
105
|
+
* const response = await client.send(command);
|
|
106
|
+
* /* response ==
|
|
107
|
+
* {
|
|
108
|
+
* "completedAt": "2000-01-01T00:00:01Z",
|
|
109
|
+
* "recommendationType": "UnusedPermissionRecommendation",
|
|
110
|
+
* "recommendedSteps": [
|
|
111
|
+
* {
|
|
112
|
+
* "unusedPermissionsRecommendedStep": {
|
|
113
|
+
* "existingPolicyId": "policy-id",
|
|
114
|
+
* "recommendedAction": "DETACH_POLICY"
|
|
115
|
+
* }
|
|
116
|
+
* },
|
|
117
|
+
* {
|
|
118
|
+
* "unusedPermissionsRecommendedStep": {
|
|
119
|
+
* "existingPolicyId": "policy-id",
|
|
120
|
+
* "recommendedAction": "CREATE_POLICY",
|
|
121
|
+
* "recommendedPolicy": "policy-content"
|
|
122
|
+
* }
|
|
123
|
+
* }
|
|
124
|
+
* ],
|
|
125
|
+
* "resourceArn": "arn:aws:iam::111122223333:role/test",
|
|
126
|
+
* "startedAt": "2000-01-01T00:00:00Z",
|
|
127
|
+
* "status": "SUCCEEDED"
|
|
128
|
+
* }
|
|
129
|
+
* *\/
|
|
130
|
+
* // example id: example-1
|
|
131
|
+
* ```
|
|
132
|
+
*
|
|
133
|
+
* @example In progress finding recommendation
|
|
134
|
+
* ```javascript
|
|
135
|
+
* //
|
|
136
|
+
* const input = {
|
|
137
|
+
* "analyzerArn": "arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a",
|
|
138
|
+
* "id": "finding-id",
|
|
139
|
+
* "maxResults": 3
|
|
140
|
+
* };
|
|
141
|
+
* const command = new GetFindingRecommendationCommand(input);
|
|
142
|
+
* const response = await client.send(command);
|
|
143
|
+
* /* response ==
|
|
144
|
+
* {
|
|
145
|
+
* "recommendationType": "UnusedPermissionRecommendation",
|
|
146
|
+
* "resourceArn": "arn:aws:iam::111122223333:role/test",
|
|
147
|
+
* "startedAt": "2000-01-01T00:00:00Z",
|
|
148
|
+
* "status": "IN_PROGRESS"
|
|
149
|
+
* }
|
|
150
|
+
* *\/
|
|
151
|
+
* // example id: example-2
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* @example Failed finding recommendation
|
|
155
|
+
* ```javascript
|
|
156
|
+
* //
|
|
157
|
+
* const input = {
|
|
158
|
+
* "analyzerArn": "arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a",
|
|
159
|
+
* "id": "finding-id",
|
|
160
|
+
* "maxResults": 3
|
|
161
|
+
* };
|
|
162
|
+
* const command = new GetFindingRecommendationCommand(input);
|
|
163
|
+
* const response = await client.send(command);
|
|
164
|
+
* /* response ==
|
|
165
|
+
* {
|
|
166
|
+
* "completedAt": "2000-01-01T00:00:01Z",
|
|
167
|
+
* "error": {
|
|
168
|
+
* "code": "SERVICE_ERROR",
|
|
169
|
+
* "message": "Service error. Please try again."
|
|
170
|
+
* },
|
|
171
|
+
* "recommendationType": "UnusedPermissionRecommendation",
|
|
172
|
+
* "resourceArn": "arn:aws:iam::111122223333:role/test",
|
|
173
|
+
* "startedAt": "2000-01-01T00:00:00Z",
|
|
174
|
+
* "status": "FAILED"
|
|
175
|
+
* }
|
|
176
|
+
* *\/
|
|
177
|
+
* // example id: example-3
|
|
178
|
+
* ```
|
|
179
|
+
*
|
|
180
|
+
* @example Failed field validation for id value
|
|
181
|
+
* ```javascript
|
|
182
|
+
* //
|
|
183
|
+
* const input = {
|
|
184
|
+
* "analyzerArn": "arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a",
|
|
185
|
+
* "id": "!"
|
|
186
|
+
* };
|
|
187
|
+
* const command = new GetFindingRecommendationCommand(input);
|
|
188
|
+
* await client.send(command);
|
|
189
|
+
* // example id: example-4
|
|
190
|
+
* ```
|
|
191
|
+
*
|
|
95
192
|
*/
|
|
96
193
|
export declare class GetFindingRecommendationCommand extends GetFindingRecommendationCommand_base {
|
|
97
194
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-accessanalyzer",
|
|
3
3
|
"description": "AWS SDK for JavaScript Accessanalyzer Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.598.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-accessanalyzer",
|
|
@@ -18,45 +18,45 @@
|
|
|
18
18
|
"module": "./dist-es/index.js",
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@aws-crypto/sha256-browser": "
|
|
22
|
-
"@aws-crypto/sha256-js": "
|
|
23
|
-
"@aws-sdk/client-sso-oidc": "3.
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
25
|
-
"@aws-sdk/core": "3.
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
27
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
28
|
-
"@aws-sdk/middleware-logger": "3.
|
|
29
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
30
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
31
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
32
|
-
"@aws-sdk/types": "3.
|
|
33
|
-
"@aws-sdk/util-endpoints": "3.
|
|
34
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
35
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
36
|
-
"@smithy/config-resolver": "^3.0.
|
|
37
|
-
"@smithy/core": "^2.2.
|
|
38
|
-
"@smithy/fetch-http-handler": "^3.0.
|
|
39
|
-
"@smithy/hash-node": "^3.0.
|
|
40
|
-
"@smithy/invalid-dependency": "^3.0.
|
|
41
|
-
"@smithy/middleware-content-length": "^3.0.
|
|
42
|
-
"@smithy/middleware-endpoint": "^3.0.
|
|
43
|
-
"@smithy/middleware-retry": "^3.0.
|
|
44
|
-
"@smithy/middleware-serde": "^3.0.
|
|
45
|
-
"@smithy/middleware-stack": "^3.0.
|
|
46
|
-
"@smithy/node-config-provider": "^3.1.
|
|
47
|
-
"@smithy/node-http-handler": "^3.0.
|
|
48
|
-
"@smithy/protocol-http": "^4.0.
|
|
49
|
-
"@smithy/smithy-client": "^3.1.
|
|
50
|
-
"@smithy/types": "^3.
|
|
51
|
-
"@smithy/url-parser": "^3.0.
|
|
21
|
+
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
|
+
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
+
"@aws-sdk/client-sso-oidc": "3.598.0",
|
|
24
|
+
"@aws-sdk/client-sts": "3.598.0",
|
|
25
|
+
"@aws-sdk/core": "3.598.0",
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.598.0",
|
|
27
|
+
"@aws-sdk/middleware-host-header": "3.598.0",
|
|
28
|
+
"@aws-sdk/middleware-logger": "3.598.0",
|
|
29
|
+
"@aws-sdk/middleware-recursion-detection": "3.598.0",
|
|
30
|
+
"@aws-sdk/middleware-user-agent": "3.598.0",
|
|
31
|
+
"@aws-sdk/region-config-resolver": "3.598.0",
|
|
32
|
+
"@aws-sdk/types": "3.598.0",
|
|
33
|
+
"@aws-sdk/util-endpoints": "3.598.0",
|
|
34
|
+
"@aws-sdk/util-user-agent-browser": "3.598.0",
|
|
35
|
+
"@aws-sdk/util-user-agent-node": "3.598.0",
|
|
36
|
+
"@smithy/config-resolver": "^3.0.2",
|
|
37
|
+
"@smithy/core": "^2.2.1",
|
|
38
|
+
"@smithy/fetch-http-handler": "^3.0.2",
|
|
39
|
+
"@smithy/hash-node": "^3.0.1",
|
|
40
|
+
"@smithy/invalid-dependency": "^3.0.1",
|
|
41
|
+
"@smithy/middleware-content-length": "^3.0.1",
|
|
42
|
+
"@smithy/middleware-endpoint": "^3.0.2",
|
|
43
|
+
"@smithy/middleware-retry": "^3.0.4",
|
|
44
|
+
"@smithy/middleware-serde": "^3.0.1",
|
|
45
|
+
"@smithy/middleware-stack": "^3.0.1",
|
|
46
|
+
"@smithy/node-config-provider": "^3.1.1",
|
|
47
|
+
"@smithy/node-http-handler": "^3.0.1",
|
|
48
|
+
"@smithy/protocol-http": "^4.0.1",
|
|
49
|
+
"@smithy/smithy-client": "^3.1.2",
|
|
50
|
+
"@smithy/types": "^3.1.0",
|
|
51
|
+
"@smithy/url-parser": "^3.0.1",
|
|
52
52
|
"@smithy/util-base64": "^3.0.0",
|
|
53
53
|
"@smithy/util-body-length-browser": "^3.0.0",
|
|
54
54
|
"@smithy/util-body-length-node": "^3.0.0",
|
|
55
|
-
"@smithy/util-defaults-mode-browser": "^3.0.
|
|
56
|
-
"@smithy/util-defaults-mode-node": "^3.0.
|
|
57
|
-
"@smithy/util-endpoints": "^2.0.
|
|
58
|
-
"@smithy/util-middleware": "^3.0.
|
|
59
|
-
"@smithy/util-retry": "^3.0.
|
|
55
|
+
"@smithy/util-defaults-mode-browser": "^3.0.4",
|
|
56
|
+
"@smithy/util-defaults-mode-node": "^3.0.4",
|
|
57
|
+
"@smithy/util-endpoints": "^2.0.2",
|
|
58
|
+
"@smithy/util-middleware": "^3.0.1",
|
|
59
|
+
"@smithy/util-retry": "^3.0.1",
|
|
60
60
|
"@smithy/util-utf8": "^3.0.0",
|
|
61
61
|
"tslib": "^2.6.2",
|
|
62
62
|
"uuid": "^9.0.1"
|