You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The arguments may also be specified in an INI file located at `~/.iamlive/config`.
82
+
83
+
### CSM Mode
84
+
85
+
Client-side monitoring mode is the default behaviour and will use [metrics](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/metrics.html) delivered locally via UDP to capture policy statements with the `Action` key only (`Resource` is only available in proxy mode).
54
86
55
87
#### CLI
56
88
@@ -76,16 +108,49 @@ export AWS_CSM_PORT=31000
76
108
export AWS_CSM_HOST=127.0.0.1
77
109
```
78
110
111
+
### Proxy Mode
112
+
113
+
Proxy mode will serve a local HTTP(S) server (by default at `http://127.0.0.1:10080`) that will MITM requests sent to the AWS endpoints and generate IAM policy statements with both `Action` and `Resource` keys. The CA key/certificate pair will be automatically generated and stored within `~/.iamlive/` by default.
114
+
115
+
#### CLI
116
+
117
+
To set the appropriate CA bundle in the AWS CLI, you should either use the `--set-ini` option or add the following to the relevant profile in `.aws/config`:
118
+
119
+
```
120
+
ca_bundle = ~/.iamlive/ca.pem
121
+
```
122
+
123
+
Alternatively, you can run the following in the window executing your CLI commands:
124
+
125
+
```
126
+
export AWS_CA_BUNDLE=~/.iamlive/ca.pem
127
+
```
128
+
129
+
You must also set the proxy settings for your session by running the following in the window executing your CLI commands:
130
+
131
+
```
132
+
export HTTP_PROXY=http://127.0.0.1:10080
133
+
export HTTPS_PROXY=http://127.0.0.1:10080
134
+
```
135
+
136
+
#### SDKs
137
+
138
+
To enable CSM in the various AWS SDKs, you can run the following in the window executing your application prior to it starting:
139
+
140
+
```
141
+
export HTTP_PROXY=http://127.0.0.1:10080
142
+
export HTTPS_PROXY=http://127.0.0.1:10080
143
+
export AWS_CA_BUNDLE=~/.iamlive/ca.pem
144
+
```
145
+
146
+
Check the [official docs](https://docs.aws.amazon.com/credref/latest/refdocs/setting-global-ca_bundle.html) for further details on setting the CA bundle.
147
+
79
148
## FAQs
80
149
81
150
_I get a message "package embed is not in GOROOT" when attempting to build myself_
82
151
83
152
This project requires Go 1.16 or above to be built correctly (due to embedding feature).
84
153
85
-
_Can we include specifics for the Resource and Condition fields?_
86
-
87
-
No, the CSM protocol does not support it and cannot be changed.
88
-
89
154
## Acknowledgements
90
155
91
-
This project makes heavy use of [Parliament](https://github.com/duo-labs/parliament) and was assisted by Scott Piper's [CSM explainer](https://summitroute.com/blog/2020/05/25/client_side_monitoring/).
156
+
This project makes heavy use of [Parliament](https://github.com/duo-labs/parliament) and was assisted by Scott Piper's [CSM explainer](https://summitroute.com/blog/2020/05/25/client_side_monitoring/). Thanks also to Noam Dahan's [research](https://ermetic.com/whats-new/blog/auditing-passrole-a-problematic-privilege-escalation-permission/) into missing `iam:PassRole` dependant actions.
0 commit comments