Repository navigation
Commit e0ef16e
fix: Authorize registry server writes before deserializing UDFs
ApplyValidationReference and ApplyMaterialization built the full domain
object inside the argument list of their permission check:
assert_permissions(
resource=FeatureView.from_proto(request.feature_view),
actions=[AuthzedAction.WRITE_ONLINE],
)
Python evaluates arguments first, so from_proto() — which dill-loads the
caller-supplied UDF — always ran before assert_permissions() could reject
the request. Unpickling executes arbitrary code, so an unauthorized caller
achieved code execution and only then received a permission error.
Load metadata first, authorize, and deserialize only after the check
passes. The permission check needs just name/project/tags, never the
callable itself.
FeatureView.from_proto() already accepted skip_udf; this adds the same
parameter to ValidationReference.from_proto(), gating both the GEProfiler
and GEProfile dill payloads. As a result profiler may now legitimately be
unset, so it becomes Optional and the profile property raises a clear
error rather than failing on None.
This covers the registry server paths only. Deserialization on the
feature server is not addressed here.
Signed-off-by: Chaitany Patel <[email protected]>1 parent a03e323 commit e0ef16e
2 files changed
Lines changed: 55 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1358 | 1358 | | |
1359 | 1359 | | |
1360 | 1360 | | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | | - | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
1368 | 1375 | | |
1369 | 1376 | | |
1370 | 1377 | | |
| |||
1453 | 1460 | | |
1454 | 1461 | | |
1455 | 1462 | | |
1456 | | - | |
| 1463 | + | |
1457 | 1464 | | |
1458 | 1465 | | |
1459 | 1466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
319 | 325 | | |
320 | 326 | | |
321 | 327 | | |
322 | 328 | | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
331 | 333 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
341 | 362 | | |
342 | 363 | | |
343 | 364 | | |
| |||
0 commit comments