@cloud-copilot/iam-lens 0.1.7 → 0.1.9
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/README.md +263 -1
- package/dist/cjs/cli.js +56 -8
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/collect/client.d.ts +37 -2
- package/dist/cjs/collect/client.d.ts.map +1 -1
- package/dist/cjs/collect/client.js +126 -27
- package/dist/cjs/collect/client.js.map +1 -1
- package/dist/cjs/principals.d.ts +0 -5
- package/dist/cjs/principals.d.ts.map +1 -1
- package/dist/cjs/principals.js +0 -9
- package/dist/cjs/principals.js.map +1 -1
- package/dist/cjs/resources.js +1 -1
- package/dist/cjs/resources.js.map +1 -1
- package/dist/cjs/{contextKeys.d.ts → simulate/contextKeys.d.ts} +1 -1
- package/dist/cjs/simulate/contextKeys.d.ts.map +1 -0
- package/dist/cjs/{contextKeys.js → simulate/contextKeys.js} +1 -1
- package/dist/cjs/simulate/contextKeys.js.map +1 -0
- package/dist/cjs/{simulate.d.ts → simulate/simulate.d.ts} +4 -2
- package/dist/cjs/simulate/simulate.d.ts.map +1 -0
- package/dist/cjs/{simulate.js → simulate/simulate.js} +38 -20
- package/dist/cjs/simulate/simulate.js.map +1 -0
- package/dist/cjs/test-datasets/testClient.d.ts +9 -0
- package/dist/cjs/test-datasets/testClient.d.ts.map +1 -0
- package/dist/cjs/test-datasets/testClient.js +28 -0
- package/dist/cjs/test-datasets/testClient.js.map +1 -0
- package/dist/cjs/utils/arn.d.ts +22 -0
- package/dist/cjs/utils/arn.d.ts.map +1 -0
- package/dist/cjs/utils/arn.js +49 -0
- package/dist/cjs/utils/arn.js.map +1 -0
- package/dist/cjs/utils/sts.d.ts +2 -0
- package/dist/cjs/utils/sts.d.ts.map +1 -0
- package/dist/cjs/utils/sts.js +9 -0
- package/dist/cjs/utils/sts.js.map +1 -0
- package/dist/cjs/whoCan/whoCan.d.ts +54 -0
- package/dist/cjs/whoCan/whoCan.d.ts.map +1 -0
- package/dist/cjs/whoCan/whoCan.js +320 -0
- package/dist/cjs/whoCan/whoCan.js.map +1 -0
- package/dist/esm/cli.js +56 -8
- package/dist/esm/cli.js.map +1 -1
- package/dist/esm/collect/client.d.ts +37 -2
- package/dist/esm/collect/client.d.ts.map +1 -1
- package/dist/esm/collect/client.js +125 -27
- package/dist/esm/collect/client.js.map +1 -1
- package/dist/esm/principals.d.ts +0 -5
- package/dist/esm/principals.d.ts.map +1 -1
- package/dist/esm/principals.js +0 -8
- package/dist/esm/principals.js.map +1 -1
- package/dist/esm/resources.js +1 -1
- package/dist/esm/resources.js.map +1 -1
- package/dist/esm/{contextKeys.d.ts → simulate/contextKeys.d.ts} +1 -1
- package/dist/esm/simulate/contextKeys.d.ts.map +1 -0
- package/dist/esm/{contextKeys.js → simulate/contextKeys.js} +1 -1
- package/dist/esm/simulate/contextKeys.js.map +1 -0
- package/dist/esm/{simulate.d.ts → simulate/simulate.d.ts} +4 -2
- package/dist/esm/simulate/simulate.d.ts.map +1 -0
- package/dist/esm/{simulate.js → simulate/simulate.js} +37 -20
- package/dist/esm/simulate/simulate.js.map +1 -0
- package/dist/esm/test-datasets/testClient.d.ts +9 -0
- package/dist/esm/test-datasets/testClient.d.ts.map +1 -0
- package/dist/esm/test-datasets/testClient.js +25 -0
- package/dist/esm/test-datasets/testClient.js.map +1 -0
- package/dist/esm/utils/arn.d.ts +22 -0
- package/dist/esm/utils/arn.d.ts.map +1 -0
- package/dist/esm/utils/arn.js +43 -0
- package/dist/esm/utils/arn.js.map +1 -0
- package/dist/esm/utils/sts.d.ts +2 -0
- package/dist/esm/utils/sts.d.ts.map +1 -0
- package/dist/esm/utils/sts.js +6 -0
- package/dist/esm/utils/sts.js.map +1 -0
- package/dist/esm/whoCan/whoCan.d.ts +54 -0
- package/dist/esm/whoCan/whoCan.d.ts.map +1 -0
- package/dist/esm/whoCan/whoCan.js +311 -0
- package/dist/esm/whoCan/whoCan.js.map +1 -0
- package/package.json +1 -1
- package/dist/cjs/accounts.d.ts +0 -3
- package/dist/cjs/accounts.d.ts.map +0 -1
- package/dist/cjs/accounts.js +0 -8
- package/dist/cjs/accounts.js.map +0 -1
- package/dist/cjs/contextKeys.d.ts.map +0 -1
- package/dist/cjs/contextKeys.js.map +0 -1
- package/dist/cjs/simulate.d.ts.map +0 -1
- package/dist/cjs/simulate.js.map +0 -1
- package/dist/esm/accounts.d.ts +0 -3
- package/dist/esm/accounts.d.ts.map +0 -1
- package/dist/esm/accounts.js +0 -5
- package/dist/esm/accounts.js.map +0 -1
- package/dist/esm/contextKeys.d.ts.map +0 -1
- package/dist/esm/contextKeys.js.map +0 -1
- package/dist/esm/simulate.d.ts.map +0 -1
- package/dist/esm/simulate.js.map +0 -1
package/README.md
CHANGED
|
@@ -3,5 +3,267 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@cloud-copilot/iam-lens) [](LICENSE.txt) [](https://github.com/cloud-copilot/iam-lens/actions/workflows/guarddog.yml) [](https://snyk.io/test/github/cloud-copilot/iam-lens?targetFile=package.json)
|
|
4
4
|
|
|
5
5
|
## iam-lens
|
|
6
|
-
Get visibility into your actual AWS IAM permissions.
|
|
7
6
|
|
|
7
|
+
Get visibility into the actual IAM permissions in your AWS organizations and accounts. Use your actual AWS IAM policies (downloaded via [iam-collect](https://github.com/cloud-copilot/iam-collect)) and evaluate the effective permissions.
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Install
|
|
13
|
+
npm install -g @cloud-copilot/iam-collect @cloud-copilot/iam-lens
|
|
14
|
+
|
|
15
|
+
# Download all IAM policies in your account using default credentials, run download once per account
|
|
16
|
+
iam-collect init
|
|
17
|
+
iam-collect download
|
|
18
|
+
|
|
19
|
+
# Simulate a request
|
|
20
|
+
iam-lens simulate --principal arn:aws:iam::123456789012:role/ExampleRole --resource arn:aws:s3:::example-bucket/secret-file.txt --action s3:GetObject
|
|
21
|
+
|
|
22
|
+
# Find out who can do something
|
|
23
|
+
iam-lens who-can --resource arn:aws:s3:::example-bucket --actions s3:ListBucket
|
|
24
|
+
|
|
25
|
+
# Find out who can do all actions on a resource
|
|
26
|
+
iam-lens who-can --resource arn:aws:s3:::example-bucket
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## What is iam-lens?
|
|
30
|
+
|
|
31
|
+
iam-lens uses real IAM data from your AWS accounts (collected via [iam-collect](https://github.com/cloud-copilot/iam-collect)) to quickly simulate requests and discover the real effective permissions that apply to a principal or resource.
|
|
32
|
+
|
|
33
|
+
## Why use it?
|
|
34
|
+
|
|
35
|
+
1. **Understand** what permissions are actually in place and why. See the policies that determine the outcome of a request.
|
|
36
|
+
2. **Verify** what's allowed or not after everything is deployed.
|
|
37
|
+
3. **Discover** who can take action on a sensitive resource with a single command.
|
|
38
|
+
4. **Audit** your IAM policies and ensure they are configured correctly.
|
|
39
|
+
5. **Debug** permissions by simulating requests locally and iterate quickly without needing to deploy changes to your AWS environment.
|
|
40
|
+
|
|
41
|
+
## Getting Started
|
|
42
|
+
|
|
43
|
+
1. **Download Your Policies** with [iam-collect](https://github.com/cloud-copilot/iam-collect) to get all your policies from all your AWS accounts. iam-collect is highly configurable and can be customized to collect the policies you need. It only downloads information to your file system or an S3 bucket, so you're in full control of your data.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm install -g @cloud-copilot/iam-collect
|
|
47
|
+
iam-collect init
|
|
48
|
+
iam-collect download
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
To see the effect of SCPs and RCPs, you should download data from your management account; or an account with permissions to download organization information. Download data for member accounts you want to analyze. `iam-lens` will analyze cross-account and cross-organization requests if you have the data available.
|
|
52
|
+
|
|
53
|
+
You can download information for as many accounts, organizations, and regions as you like. The more data you have, the more accurate your simulations will be.
|
|
54
|
+
|
|
55
|
+
2. **Install iam-lens**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm install -g @cloud-copilot/iam-lens
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
3. **Execute Commands** with `iam-lens` to simulate requests, discover permissions, and audit your IAM policies.
|
|
62
|
+
|
|
63
|
+
Simulate a request:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
iam-lens simulate --principal arn:aws:iam::123456789012:role/ExampleRole --resource arn:aws:s3:::example-bucket/secret-file.txt --action s3:GetObject
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
or
|
|
70
|
+
|
|
71
|
+
Discover who can perform an action on a resource:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
iam-lens who-can --resource arn:aws:iam::111111111111:role/ImportantRole --actions sts:AssumeRole iam:PassRole
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Commands
|
|
78
|
+
|
|
79
|
+
### `simulate` - Simulate an IAM request
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
iam-lens simulate [options]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Evaluates whether a principal can perform a specified action on a resource (or wildcard). Returns a decision (Allowed/ImplicitlyDenied/ExplicitlyDenied), and exits nonzero if you provided an `--expect` that doesn’t match the result.
|
|
86
|
+
|
|
87
|
+
**Options:**
|
|
88
|
+
|
|
89
|
+
| Flag | Description |
|
|
90
|
+
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
91
|
+
| `--principal <arn>` | The principal the request is from. Can be a user, role, session, or AWS service. |
|
|
92
|
+
| `--resource <arn>` | The ARN of the resource to simulate access to. Ignore for wildcard-only actions such as `s3:ListAllMyBuckets`. |
|
|
93
|
+
| `--resource-account <id>` | The account ID of the resource, only required if it cannot be determined from the resource ARN. |
|
|
94
|
+
| `--action <service:action>` | The action to simulate; must be a valid IAM service and action such as `s3:ListBucket`. |
|
|
95
|
+
| `--context <key=value>` | One or more context keys to use for the simulation. Keys are formatted as `keyA=value1,value2 keyB=value1,value2`. Multiple keys are separated by spaces. Multiple values separated by commas. See [Context Keys](#context-keys) for what keys are set automatically |
|
|
96
|
+
| `-v, --verbose` | Enable verbose output for the simulation (exactly what statements applied or not and why). |
|
|
97
|
+
| `--expect <result>` | Optional expected outcome of the simulation. Valid values are `Allowed`, `ImplicitlyDenied`, `ExplicitlyDenied`, `AnyDeny`. If the result does not match the expected value, a non-zero exit code is returned |
|
|
98
|
+
|
|
99
|
+
**Examples:**
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Simple simulate: can this role list objects in the bucket?
|
|
103
|
+
iam-lens simulate \
|
|
104
|
+
--principal arn:aws:iam::111111111111:role/MyRole \
|
|
105
|
+
--resource arn:aws:s3:::my-bucket \
|
|
106
|
+
--action s3:ListBucket
|
|
107
|
+
|
|
108
|
+
# Simulate a wildcard action (ListAllMyBuckets) – this will assume the principals account
|
|
109
|
+
iam-lens simulate \
|
|
110
|
+
--principal arn:aws:iam::222222222222:user/Alice \
|
|
111
|
+
--action s3:ListAllMyBuckets \
|
|
112
|
+
|
|
113
|
+
# Include custom context keys
|
|
114
|
+
iam-lens simulate \
|
|
115
|
+
--principal arn:aws:iam::333333333333:role/DevRole \
|
|
116
|
+
--resource arn:aws:sqs:us-east-1:333333333333:my-queue \
|
|
117
|
+
--action sqs:SendMessage \
|
|
118
|
+
--context aws:SourceVpc=vpc-1234567890abcdef0 \
|
|
119
|
+
--verbose
|
|
120
|
+
|
|
121
|
+
# Assert the result must be “Allowed”; exit code will be nonzero if not
|
|
122
|
+
iam-lens simulate \
|
|
123
|
+
--principal arn:aws:iam::444444444444:role/ReadOnly \
|
|
124
|
+
--resource arn:aws:dynamodb:us-east-1:444444444444:table/Books \
|
|
125
|
+
--action dynamodb:Query \
|
|
126
|
+
--expect Allowed
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### `who-can` - Find who can perform an action on a resource
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
iam-lens who-can [options]
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Lists all principals in your IAM data who are allowed to perform one or more specified actions on a resource (or wildcard). If applicable it will check the resource policy to find cross-account permissions and AWS service principals.
|
|
136
|
+
|
|
137
|
+
**Options:**
|
|
138
|
+
|
|
139
|
+
| Flag | Description |
|
|
140
|
+
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
141
|
+
| `--resource <arn>` | The ARN of the resource to check permissions for. Ignore for wildcard-only actions such as `iam:ListRoles` |
|
|
142
|
+
| `--resource-account <id>` | The account ID of the resource, only required if it cannot be determined from the resource ARN. Required for wildcard actions such as `ec2:DescribeInstances` |
|
|
143
|
+
| `--actions <service:action>` | One or more actions to check such as `s3:GetObject`. Specify as many actions as you want. If omitted it will analyze all valid actions for the resource. If no `--resource` is specified then actions must be entered. |
|
|
144
|
+
|
|
145
|
+
**Examples:**
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Who can get this object?
|
|
149
|
+
iam-lens who-can \
|
|
150
|
+
--resource arn:aws:s3:::my-bucket/secret-file.txt \
|
|
151
|
+
--actions s3:GetObject
|
|
152
|
+
|
|
153
|
+
# Who can list all IAM roles in any account? (wildcard action – no resource)
|
|
154
|
+
iam-lens who-can \
|
|
155
|
+
--resource-account 555555555555 \
|
|
156
|
+
--actions iam:ListRoles
|
|
157
|
+
|
|
158
|
+
# Check multiple actions at once
|
|
159
|
+
iam-lens who-can \
|
|
160
|
+
--resource arn:aws:dynamodb:us-east-1:555555555555:table/Books \
|
|
161
|
+
--actions dynamodb:Query dynamodb:UpdateItem
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Global Options:
|
|
165
|
+
|
|
166
|
+
These options are available for all commands:
|
|
167
|
+
|
|
168
|
+
| Flag | Description | Default |
|
|
169
|
+
| -------------------------- | --------------------------------------------------------------------- | ------------------- |
|
|
170
|
+
| `--collectConfigs <files>` | One or more `iam-collect` config files to use for fetching IAM data. | `iam-collect.jsonc` |
|
|
171
|
+
| `--partition <partition>` | The AWS partition (`aws`, `aws-cn`, `aws-us-gov`). Defaults to `aws`. | `aws` |
|
|
172
|
+
|
|
173
|
+
## Context Keys
|
|
174
|
+
|
|
175
|
+
Below are the context keys that iam-lens populates by default during simulation. These keys are set based on your principal, resource, and organization data. Any keys provided via `--context` will override the defaults.
|
|
176
|
+
|
|
177
|
+
### Default Context Keys
|
|
178
|
+
|
|
179
|
+
- **`aws:SecureTransport`**
|
|
180
|
+
Always set to `true` to indicate the request is using a secure channel.
|
|
181
|
+
|
|
182
|
+
- **`aws:CurrentTime`**
|
|
183
|
+
ISO 8601 timestamp of when the simulation is run (e.g., `2025-06-01T12:34:56.789Z`).
|
|
184
|
+
|
|
185
|
+
- **`aws:EpochTime`**
|
|
186
|
+
Unix epoch time in seconds (e.g., `1717290896`).
|
|
187
|
+
|
|
188
|
+
#### IAM Principal Context
|
|
189
|
+
|
|
190
|
+
- **`aws:PrincipalArn`**
|
|
191
|
+
The full ARN of the principal (user, role, role session, or federated user) being simulated.
|
|
192
|
+
|
|
193
|
+
- **`aws:PrincipalAccount`**
|
|
194
|
+
The AWS account ID extracted from the principal ARN.
|
|
195
|
+
|
|
196
|
+
- **`aws:PrincipalOrgId`** _(if the account is in an organization)_
|
|
197
|
+
The Organization ID that owns the principal’s account.
|
|
198
|
+
|
|
199
|
+
- **`aws:PrincipalOrgPaths`** _(if the account is in an organization)_
|
|
200
|
+
A list containing a single string of the form `<OrgId>/<OU1>/<OU2>/…/` indicating the account’s path in the OU hierarchy.
|
|
201
|
+
|
|
202
|
+
- **`aws:PrincipalTag/<TagKey>`**
|
|
203
|
+
For each tag on the IAM principal, a context key of the form `aws:PrincipalTag/<TagKey>` with its tag value.
|
|
204
|
+
|
|
205
|
+
- **`aws:PrincipalIsAWSService`**
|
|
206
|
+
Set to `false` for all IAM principals (users, roles, federated users).
|
|
207
|
+
|
|
208
|
+
- **`aws:PrincipalType`**
|
|
209
|
+
One of: `Account`, `User`, `FederatedUser`, `AssumedRole`, indicating the type of principal.
|
|
210
|
+
|
|
211
|
+
- **`aws:userid`**
|
|
212
|
+
The unique identifier for the principal session:
|
|
213
|
+
|
|
214
|
+
- For a root principal: the account ID
|
|
215
|
+
- For a user: the IAM user’s unique ID (or `UNKNOWN` if not found)
|
|
216
|
+
- For a federated user: `<AccountId>:<FederatedName>`
|
|
217
|
+
- For an assumed role: `<RoleUniqueId>:<SessionName>`
|
|
218
|
+
|
|
219
|
+
Setting `role-id:ec2-instance-id` for EC2 instances is not supported at this time.
|
|
220
|
+
|
|
221
|
+
- **`aws:username`** _(only for IAM users)_
|
|
222
|
+
The IAM username portion of the principal ARN (e.g. `Alice`).
|
|
223
|
+
|
|
224
|
+
#### Service Principal Context
|
|
225
|
+
|
|
226
|
+
The following context keys are set when the principal is an AWS service (e.g., `lambda.amazonaws.com`, `ec2.amazonaws.com`):
|
|
227
|
+
|
|
228
|
+
- **`aws:PrincipalServiceName`**
|
|
229
|
+
The service principal string (e.g. `lambda.amazonaws.com`).
|
|
230
|
+
|
|
231
|
+
- **`aws:SourceAccount`**
|
|
232
|
+
The account ID of the resource.
|
|
233
|
+
|
|
234
|
+
- **`aws:SourceOrgID`**
|
|
235
|
+
The organization ID of the resource’s account (if part of an organization).
|
|
236
|
+
|
|
237
|
+
- **`aws:SourceOrgPaths`**
|
|
238
|
+
The OU hierarchy path for the resource’s account (if part of an organization).
|
|
239
|
+
|
|
240
|
+
- **`aws:PrincipalIsAWSService`**
|
|
241
|
+
Set to `true` for all service principals. Set to `false` for all IAM principals (users, roles, federated users).
|
|
242
|
+
|
|
243
|
+
#### Resource Context ([unless action is excluded](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourceaccount))
|
|
244
|
+
|
|
245
|
+
- **`aws:ResourceAccount`**
|
|
246
|
+
The AWS account ID of the resource.
|
|
247
|
+
|
|
248
|
+
- **`aws:ResourceOrgID`**
|
|
249
|
+
The Organization ID for the resource’s account (if part of an organization).
|
|
250
|
+
|
|
251
|
+
- **`aws:ResourceOrgPaths`** _(if the resource account is in an organization)_
|
|
252
|
+
A list containing a single string of the form `<OrgId>/<OU1>/<OU2>/…/` for the resource’s account (if part of an organization).
|
|
253
|
+
|
|
254
|
+
- **`aws:ResourceTag/<TagKey>`**
|
|
255
|
+
For each tag on the resource ARN, a context key `aws:ResourceTag/TagKey` with its tag value. **This is only for resources that are stored in your `iam-collect` data**, such as Roles, S3 Buckets, DynamoDB Tables, etc. For resources not stored in `iam-collect`, this key should be set manually.
|
|
256
|
+
|
|
257
|
+
### Overriding Default Context Keys
|
|
258
|
+
|
|
259
|
+
Any context keys supplied via the `--context key=value[,value2,…]` option will override the defaults described above. For example:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
iam-lens simulate \
|
|
263
|
+
--principal arn:aws:iam::123456789012:user/Alice \
|
|
264
|
+
--resource arn:aws:s3:::my-bucket \
|
|
265
|
+
--action s3:GetObject \
|
|
266
|
+
--context aws:CurrentTime=2025-01-01T00:00:00Z aws:PrincipalTag/Env=staging
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
In this case, `aws:CurrentTime` and `aws:PrincipalTag/Env` will use the provided values instead of what iam-lens would normally derive.
|
package/dist/cjs/cli.js
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const cli_1 = require("@cloud-copilot/cli");
|
|
5
5
|
const collect_js_1 = require("./collect/collect.js");
|
|
6
|
-
const simulate_js_1 = require("./simulate.js");
|
|
6
|
+
const simulate_js_1 = require("./simulate/simulate.js");
|
|
7
7
|
const packageVersion_js_1 = require("./utils/packageVersion.js");
|
|
8
|
+
const whoCan_js_1 = require("./whoCan/whoCan.js");
|
|
8
9
|
const main = async () => {
|
|
9
10
|
const version = await (0, packageVersion_js_1.iamLensVersion)();
|
|
10
11
|
const cli = (0, cli_1.parseCliArguments)('iam-lens', {
|
|
@@ -21,15 +22,15 @@ const main = async () => {
|
|
|
21
22
|
values: 'single',
|
|
22
23
|
description: 'The ARN of the resource to simulate access to. Ignore for wildcard actions'
|
|
23
24
|
},
|
|
24
|
-
|
|
25
|
+
resourceAccount: {
|
|
25
26
|
type: 'string',
|
|
26
27
|
values: 'single',
|
|
27
|
-
description: 'The account ID of the resource, only required if it cannot be determined from the resource ARN.
|
|
28
|
+
description: 'The account ID of the resource, only required if it cannot be determined from the resource ARN.'
|
|
28
29
|
},
|
|
29
30
|
action: {
|
|
30
31
|
type: 'string',
|
|
31
32
|
values: 'single',
|
|
32
|
-
description: 'The action to simulate; must be a valid IAM service and action such as `s3:
|
|
33
|
+
description: 'The action to simulate; must be a valid IAM service and action such as `s3:ListBucket`'
|
|
33
34
|
},
|
|
34
35
|
context: {
|
|
35
36
|
type: 'string',
|
|
@@ -40,6 +41,32 @@ const main = async () => {
|
|
|
40
41
|
type: 'boolean',
|
|
41
42
|
description: 'Enable verbose output for the simulation',
|
|
42
43
|
character: 'v'
|
|
44
|
+
},
|
|
45
|
+
expect: {
|
|
46
|
+
type: 'enum',
|
|
47
|
+
values: 'single',
|
|
48
|
+
validValues: ['Allowed', 'ImplicitlyDenied', 'ExplicitlyDenied', 'AnyDeny'],
|
|
49
|
+
description: 'The expected result of the simulation, if the result does not match the expected response a non-zero exit code will be returned'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
'who-can': {
|
|
54
|
+
description: 'Find who can perform an action on a resource',
|
|
55
|
+
options: {
|
|
56
|
+
resource: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
values: 'single',
|
|
59
|
+
description: 'The ARN of the resource to check permissions for. Ignore for wildcard actions'
|
|
60
|
+
},
|
|
61
|
+
resourceAccount: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
values: 'single',
|
|
64
|
+
description: 'The account ID of the resource, only required if it cannot be determined from the resource ARN. Required for wildcard actions'
|
|
65
|
+
},
|
|
66
|
+
actions: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
values: 'multiple',
|
|
69
|
+
description: 'The action to check permissions for; must be a valid IAM service and action such as `s3:GetObject`'
|
|
43
70
|
}
|
|
44
71
|
}
|
|
45
72
|
}
|
|
@@ -64,22 +91,43 @@ const main = async () => {
|
|
|
64
91
|
cli.args.collectConfigs.push('./iam-collect.jsonc');
|
|
65
92
|
}
|
|
66
93
|
const thePartition = cli.args.partition || 'aws';
|
|
94
|
+
const collectConfigs = await (0, collect_js_1.loadCollectConfigs)(cli.args.collectConfigs);
|
|
95
|
+
const collectClient = (0, collect_js_1.getCollectClient)(collectConfigs, thePartition);
|
|
67
96
|
if (cli.subcommand === 'simulate') {
|
|
68
|
-
const
|
|
69
|
-
const collectClient = (0, collect_js_1.getCollectClient)(collectConfigs, thePartition);
|
|
70
|
-
const { principal, resource, resourceAccountId, action, context } = cli.args;
|
|
97
|
+
const { principal, resource, resourceAccount, action, context } = cli.args;
|
|
71
98
|
const contextKeys = convertContextKeysToMap(context);
|
|
72
99
|
const result = await (0, simulate_js_1.simulateRequest)({
|
|
73
100
|
principal: principal,
|
|
74
101
|
resourceArn: resource,
|
|
75
|
-
resourceAccount:
|
|
102
|
+
resourceAccount: resourceAccount,
|
|
76
103
|
action: action,
|
|
77
104
|
customContextKeys: contextKeys
|
|
78
105
|
}, collectClient);
|
|
106
|
+
if (result.errors) {
|
|
107
|
+
console.error('Simulation Errors:');
|
|
108
|
+
console.log(JSON.stringify(result.errors, null, 2));
|
|
109
|
+
process.exit(1);
|
|
110
|
+
}
|
|
79
111
|
console.log(`Simulation Result: ${result.analysis?.result}`);
|
|
80
112
|
if (cli.args.verbose) {
|
|
81
113
|
console.log(JSON.stringify(result, null, 2));
|
|
82
114
|
}
|
|
115
|
+
if (!(0, simulate_js_1.resultMatchesExpectation)(cli.args.expect, result.analysis?.result)) {
|
|
116
|
+
process.exit(1);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else if (cli.subcommand === 'who-can') {
|
|
120
|
+
const { resource, resourceAccount, actions } = cli.args;
|
|
121
|
+
if (!resourceAccount && !resource && actions.length === 0) {
|
|
122
|
+
console.error('Error: At least 1) resource or 2) resource-account and actions must be provided for who-can command');
|
|
123
|
+
process.exit(1);
|
|
124
|
+
}
|
|
125
|
+
const results = await (0, whoCan_js_1.whoCan)(collectClient, {
|
|
126
|
+
resource: cli.args.resource,
|
|
127
|
+
actions: cli.args.actions,
|
|
128
|
+
resourceAccount: cli.args.resourceAccount
|
|
129
|
+
});
|
|
130
|
+
console.log(JSON.stringify(results, null, 2));
|
|
83
131
|
}
|
|
84
132
|
};
|
|
85
133
|
main()
|
package/dist/cjs/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";;;AAEA,4CAAsD;AACtD,qDAA2E;AAE3E
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";;;AAEA,4CAAsD;AACtD,qDAA2E;AAE3E,wDAAkF;AAClF,iEAA0D;AAC1D,kDAA2C;AAE3C,MAAM,IAAI,GAAG,KAAK,IAAI,EAAE;IACtB,MAAM,OAAO,GAAG,MAAM,IAAA,kCAAc,GAAE,CAAA;IACtC,MAAM,GAAG,GAAG,IAAA,uBAAiB,EAC3B,UAAU,EACV;QACE,QAAQ,EAAE;YACR,WAAW,EAAE,yBAAyB;YACtC,OAAO,EAAE;gBACP,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,QAAQ;oBAChB,WAAW,EAAE,yEAAyE;iBACvF;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,QAAQ;oBAChB,WAAW,EACT,4EAA4E;iBAC/E;gBACD,eAAe,EAAE;oBACf,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,QAAQ;oBAChB,WAAW,EACT,iGAAiG;iBACpG;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ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BAAuB,CAAC,WAAqB;IACpD,MAAM,UAAU,GAAsC,EAAE,CAAA;IACxD,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QAC9B,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACvC,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YAC/B,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACtB,UAAU,CAAC,OAAO,CAAC,GAAG,MAAM,CAAA;YAC9B,CAAC;iBAAM,CAAC;gBACN,UAAU,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;YACjC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
|
@@ -55,15 +55,34 @@ interface OrganizationMetadata {
|
|
|
55
55
|
TAG_POLICY?: boolean;
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
+
interface OrgStructureNode {
|
|
59
|
+
children?: OrgStructure | undefined;
|
|
60
|
+
accounts?: string[] | undefined;
|
|
61
|
+
}
|
|
62
|
+
interface OrgStructure {
|
|
63
|
+
[key: string]: OrgStructureNode;
|
|
64
|
+
}
|
|
65
|
+
export interface IamCollectClientOptions {
|
|
66
|
+
enableCaching?: boolean;
|
|
67
|
+
}
|
|
58
68
|
export declare class IamCollectClient {
|
|
59
69
|
private storageClient;
|
|
60
|
-
|
|
70
|
+
private _cache;
|
|
71
|
+
private _enableCaching;
|
|
72
|
+
constructor(storageClient: AwsIamStore, clientOptions?: IamCollectClientOptions);
|
|
73
|
+
private withCache;
|
|
61
74
|
/**
|
|
62
75
|
* Checks if an account exists in the store.
|
|
63
76
|
* @param accountId The ID of the account to check.
|
|
64
77
|
* @returns True if the account exists, false otherwise.
|
|
65
78
|
*/
|
|
66
79
|
accountExists(accountId: string): Promise<boolean>;
|
|
80
|
+
/**
|
|
81
|
+
* Get all account IDs in the store.
|
|
82
|
+
*
|
|
83
|
+
* @returns all account IDs in the store
|
|
84
|
+
*/
|
|
85
|
+
allAccounts(): Promise<string[]>;
|
|
67
86
|
/**
|
|
68
87
|
* Checks if a principal exists in the store.
|
|
69
88
|
* @param principalArn The ARN of the principal to check.
|
|
@@ -121,7 +140,7 @@ export declare class IamCollectClient {
|
|
|
121
140
|
* @param orgId The ID of the organization.
|
|
122
141
|
* @returns The account data for the organization.
|
|
123
142
|
*/
|
|
124
|
-
getAccountDataForOrg(orgId: string): Promise<OrgAccounts>;
|
|
143
|
+
getAccountDataForOrg(orgId: string): Promise<OrgAccounts | undefined>;
|
|
125
144
|
/**
|
|
126
145
|
* Gets the org units data for an organization.
|
|
127
146
|
* @param orgId The ID of the organization.
|
|
@@ -266,6 +285,22 @@ export declare class IamCollectClient {
|
|
|
266
285
|
* @returns a unique ID for the resource, or undefined if not found
|
|
267
286
|
*/
|
|
268
287
|
getUniqueIdForIamResource(resourceArn: string): Promise<string | undefined>;
|
|
288
|
+
/**
|
|
289
|
+
* Get the account IDs for an organization.
|
|
290
|
+
*
|
|
291
|
+
* @param organizationId the ID of the organization
|
|
292
|
+
* @returns a tuple containing a boolean indicating success and an array of account IDs
|
|
293
|
+
*/
|
|
294
|
+
getAccountsForOrganization(organizationId: string): Promise<[boolean, string[]]>;
|
|
295
|
+
/**
|
|
296
|
+
* Get the organization structure or an organization.
|
|
297
|
+
*
|
|
298
|
+
* @param orgId the ID of the organization
|
|
299
|
+
* @returns returns the organization structure or undefined if not found
|
|
300
|
+
*/
|
|
301
|
+
getOrganizationStructure(orgId: string): Promise<OrgStructure | undefined>;
|
|
302
|
+
getAccountsForOrgPath(orgId: string, ouIds: string[]): Promise<[boolean, string[]]>;
|
|
303
|
+
getAllPrincipalsInAccount(accountId: string): Promise<string[]>;
|
|
269
304
|
}
|
|
270
305
|
export {};
|
|
271
306
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/collect/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAIxD,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,GAAG,CAAA;KAAE,EAAE,CAAA;CAC1C;AAED,UAAU,eAAe;IACvB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,kBAAkB,EAAE,MAAM,CAAA;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/collect/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAIxD,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,GAAG,CAAA;KAAE,EAAE,CAAA;CAC1C;AAED,UAAU,eAAe;IACvB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,kBAAkB,EAAE,MAAM,CAAA;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAWD,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,GAAG,CAAA;CACZ;AAOD,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAA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