Commit e183ed2
feat: support storage-credentials in REST catalog LoadTableResult
The Iceberg REST spec's LoadTableResult includes a storage-credentials
field for vended credentials (prefix-scoped temporary STS tokens).
PyIceberg was only reading the config field and silently dropping
storage-credentials, so vended credentials never reached the FileIO.
Per the spec: "Clients must first check whether the respective
credentials exist in the storage-credentials field before checking
the config for credentials."
This adds:
- storage_credentials field to TableResponse
- Longest-prefix credential resolution (mirroring Java's S3FileIO)
- Merging resolved credentials into FileIO with highest precedence
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 09de790 commit e183ed2
File tree
2 files changed
+116
-2
lines changed- pyiceberg/catalog/rest
- tests/catalog
2 files changed
+116
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
| 265 | + | |
264 | 266 | | |
265 | 267 | | |
266 | 268 | | |
| |||
396 | 398 | | |
397 | 399 | | |
398 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
399 | 421 | | |
400 | 422 | | |
401 | 423 | | |
| |||
734 | 756 | | |
735 | 757 | | |
736 | 758 | | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
737 | 763 | | |
738 | 764 | | |
739 | 765 | | |
740 | 766 | | |
741 | 767 | | |
742 | | - | |
| 768 | + | |
| 769 | + | |
743 | 770 | | |
744 | 771 | | |
745 | 772 | | |
746 | 773 | | |
747 | 774 | | |
748 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
749 | 780 | | |
750 | 781 | | |
751 | 782 | | |
752 | 783 | | |
753 | 784 | | |
754 | | - | |
| 785 | + | |
| 786 | + | |
755 | 787 | | |
756 | 788 | | |
757 | 789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2390 | 2390 | | |
2391 | 2391 | | |
2392 | 2392 | | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
0 commit comments