Repository navigation
Commit 77c84da
Put the node's IAM role out of a Bot's reach in the EKS recipe (#620)
* Put the node's IAM role out of a Bot's reach in the EKS recipe
A Bot's computer runs a shell, and a shell reaches whatever its pod
reaches. On EKS that includes 169.254.169.254, which hands out the node's
IAM role, and it is one `run_command` away: OpenBot's policy engine
decides browser navigation and tool calls, and the shell reaches the
network directly.
The NetworkPolicy already excepts `169.254.0.0/16` and is the better
control where it is enforced. It is off by default, for the reason the
chart README gives, and on EKS it does nothing until the VPC CNI is told
to enforce it, so the exception is not what holds in the configuration a
cluster actually starts in.
The two node-group lines are one control rather than two.
`disablePodIMDS` sets the hop limit to 1, which governs the IMDSv2 token
PUT; IMDSv1 is a bare GET with no PUT to limit, so the hop limit stops
nothing until `disableIMDSv1` makes a token mandatory. Written out
because the first alone does not work. Covers pods on the cluster
network; `hostNetwork: true` is on the node and is not covered.
Nothing in OpenBot wants pod-level IMDS: the chart reaches AWS through
IRSA, a ServiceAccount annotation and a projected token.
Documentation only. No chart template changes, and an existing cluster is
unaffected until its node group is recreated.
* Say what disableIMDSv1 actually does here, and what the hop limit costs
The text had `disablePodIMDS` doing nothing until `disableIMDSv1` made a token
mandatory. eksctl's own documentation says otherwise: `disableIMDSv1` defaults
to true, and either flag sets `httpTokens: required`. So `disablePodIMDS` is the
line that does the work and the other one states a default rather than changing
it, which is worth writing out but not worth describing as the thing that makes
the first one work.
It also gave the control with no cost attached. A hop limit of 1 is exactly what
the EBS CSI driver asks you not to set: its FAQ wants 2 or greater in a
containerized environment, and `MutableCSINodeAllocatableCount` requires IMDS to
be the driver's metadata source. Somebody following this recipe on a cluster
using either should know before their volumes do.
---------
Co-authored-by: David McKay <david@copilotkit.ai>1 parent 5b730ff commit 77c84da
2 files changed
Lines changed: 61 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
159 | 181 | | |
160 | 182 | | |
161 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
87 | 123 | | |
88 | 124 | | |
89 | 125 | | |
| |||
401 | 437 | | |
402 | 438 | | |
403 | 439 | | |
404 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
405 | 443 | | |
406 | 444 | | |
407 | 445 | | |
| |||
0 commit comments