Commit 2864ab7
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 7d4a8ef commit 2864ab7
File tree
2 files changed
+118
-2
lines changed- pyiceberg/catalog/rest
- tests/catalog
2 files changed
+118
-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 | | |
| |||
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
| 260 | + | |
259 | 261 | | |
260 | 262 | | |
261 | 263 | | |
| |||
391 | 393 | | |
392 | 394 | | |
393 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
394 | 416 | | |
395 | 417 | | |
396 | 418 | | |
| |||
729 | 751 | | |
730 | 752 | | |
731 | 753 | | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
732 | 758 | | |
733 | 759 | | |
734 | 760 | | |
735 | 761 | | |
736 | 762 | | |
737 | | - | |
| 763 | + | |
| 764 | + | |
738 | 765 | | |
739 | 766 | | |
740 | 767 | | |
741 | 768 | | |
742 | 769 | | |
743 | 770 | | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
744 | 775 | | |
745 | 776 | | |
746 | 777 | | |
747 | 778 | | |
748 | 779 | | |
749 | | - | |
| 780 | + | |
| 781 | + | |
750 | 782 | | |
751 | 783 | | |
752 | 784 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2351 | 2351 | | |
2352 | 2352 | | |
2353 | 2353 | | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 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 | + | |
0 commit comments