Commit 822854f
authored
Fix masking of ironic_osism_* secrets in kernel_append_params (#2120)
When ironic_osism_* values in the Netbox secrets custom field are
vault-encrypted and decryption fails in the API context, deep_decrypt
silently removes the keys, so no secret values are collected for
string replacement. This leaves passwords exposed in the API response.
Add a regex-based fallback: before decryption, collect ironic_osism_*
key names and derive kernel parameter names (ironic_osism_aa -> osism-aa).
After value-based replacement, also mask param=value patterns by name,
ensuring secrets are masked even when vault decryption is unavailable.
AI-assisted: Claude Code
Signed-off-by: Christian Berendt <berendt@osism.tech>1 parent 1747170 commit 822854f
1 file changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
263 | 275 | | |
264 | 276 | | |
265 | 277 | | |
| |||
280 | 292 | | |
281 | 293 | | |
282 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
283 | 305 | | |
284 | 306 | | |
285 | 307 | | |
| |||
0 commit comments