Commit f8e17f6
Harden Redis, InstanceHA, Memcached, DNSMasq, and RabbitMQ workload security
Address anyuid SCC and overly permissive RBAC findings
across all infra-operator workloads.
Redis:
- Remove sudo -E kolla_set_configs from startup scripts — eliminates
the only blocker for nonroot-v2. Config files are now read directly
from the generated path (/var/lib/config-data/generated/), and TLS
certs reference the volume-mounted paths instead of /etc/pki/tls/.
- Change SCC from anyuid to nonroot-v2
- Remove kolla-config volumes and mounts (config.json files deleted)
- Reduce workload SA pod verbs from full CRUD to get/list/watch/patch
- Add full SecurityContext via pod.RestrictiveSecurityContext helper
- Set AutomountServiceAccountToken: false with projected SA token volume
InstanceHA:
- Change SCC from anyuid to nonroot-v2
- Add SeccompProfile RuntimeDefault
- Set AutomountServiceAccountToken: false with projected SA token volume
- Use lib-common pod.RestrictiveSecurityContext helper
Memcached:
- Bypass kolla_start entrypoint — run memcached directly by sourcing
/etc/sysconfig/memcached (volume-mounted) instead of going through
kolla_set_configs which requires sudo. Delete kolla config.json and
remove kolla-config volume/mount.
- Change SCC from anyuid to nonroot-v2
- Remove full pod CRUD from workload SA (no SA token usage)
- Set AutomountServiceAccountToken: false
- Add full SecurityContext via pod.RestrictiveSecurityContext helper
DNSMasq:
- Change SCC from anyuid to nonroot-v2
- Remove full pod CRUD from workload SA (no SA token usage)
- Set AutomountServiceAccountToken: false
- Add DnsmasqUID constant (42435, neutron UID from kolla)
- Add full SecurityContext via pod.RestrictiveSecurityContext helper
RabbitMQ:
- Change SCC from anyuid to nonroot-v2 (bypasses kolla entrypoint,
runs rabbitmq-server directly as UID 999, no sudo needed)
- Set AutomountServiceAccountToken: false with projected SA token volume
- Add full SecurityContext via pod.RestrictiveSecurityContext on both
rabbitmq and amqp-proxy containers
- Keep FSGroup=0 to avoid chown overhead on existing PVCs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent b5154b6 commit f8e17f6
29 files changed
Lines changed: 292 additions & 262 deletions
File tree
- config/rbac
- internal
- controller
- instanceha
- memcached
- network
- rabbitmq
- redis
- dnsmasq
- instanceha
- memcached
- rabbitmq
- redis
- templates
- memcached/config
- redis
- bin
- config
- test/functional
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
| 348 | + | |
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
119 | | - | |
120 | | - | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
| 106 | + | |
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
| |||
225 | 224 | | |
226 | 225 | | |
227 | 226 | | |
228 | | - | |
| 227 | + | |
229 | 228 | | |
230 | 229 | | |
231 | 230 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | 231 | | |
238 | 232 | | |
239 | 233 | | |
| |||
496 | 490 | | |
497 | 491 | | |
498 | 492 | | |
499 | | - | |
500 | | - | |
| 493 | + | |
| 494 | + | |
501 | 495 | | |
502 | 496 | | |
503 | 497 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
| 100 | + | |
102 | 101 | | |
103 | 102 | | |
104 | 103 | | |
| |||
205 | 204 | | |
206 | 205 | | |
207 | 206 | | |
208 | | - | |
| 207 | + | |
209 | 208 | | |
210 | 209 | | |
211 | 210 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | 211 | | |
218 | 212 | | |
219 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
| |||
577 | 580 | | |
578 | 581 | | |
579 | 582 | | |
580 | | - | |
| 583 | + | |
581 | 584 | | |
582 | 585 | | |
583 | 586 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
| 109 | + | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
0 commit comments