Commit 7d5c58d
API: fix: inject header prior to
<!--
Thanks for opening a pull request!
-->
<!-- In the case this PR will resolve an issue, please replace
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
Closes #2655
# Rationale for this change
Headers should be injected before creating auth manager in order for
Polaris catalog to work.
## Are these changes tested?
Yes, with following code:
```python
from pyiceberg.catalog import load_catalog
param = {
"type": "rest",
"uri": "http://localhost:8181/api/catalog",
"warehouse": "s3://...",
"s3.access-key-id": "***",
"s3.secret-access-key": "***",
"s3.path-style-access": True,
"header.X-Iceberg-Access-Delegation": "",
"scope": "PRINCIPAL_ROLE:ALL",
"credential": "***:***",
}
catalog = load_catalog("default", **param)
print(catalog.list_namespaces())
```
* With version 0.10.0 I have: `pyiceberg.exceptions.RESTError:
MissingOrInvalidRealm`
* With this development (using `poetry run ...`) I can connect to the
catalog
## Are there any user-facing changes?
No
<!-- In the case of user-facing changes, please add the changelog label.
-->
---------
Co-authored-by: Quentin FLEURENT NAMBOT <[email protected]>AuthManager (#2656)1 parent 284e479 commit 7d5c58d
File tree
2 files changed
+25
-3
lines changed- pyiceberg/catalog/rest
- tests/catalog
2 files changed
+25
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
241 | 244 | | |
242 | 245 | | |
243 | 246 | | |
| |||
265 | 268 | | |
266 | 269 | | |
267 | 270 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1899 | 1899 | | |
1900 | 1900 | | |
1901 | 1901 | | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
1902 | 1924 | | |
1903 | 1925 | | |
1904 | 1926 | | |
| |||
0 commit comments