Skip to content

Conversation

@rinzool
Copy link
Contributor

@rinzool rinzool commented Oct 23, 2025

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:

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

@rinzool rinzool changed the title API: fix: inject header before creating auth manager - Closes #2655 API: fix: inject header before creating auth manager - Closes https://github.com/apache/iceberg-python/issues/2655 Oct 23, 2025
@rinzool rinzool changed the title API: fix: inject header before creating auth manager - Closes https://github.com/apache/iceberg-python/issues/2655 API: fix: inject header before creating auth manager - Closes 2655 Oct 23, 2025
@rinzool rinzool marked this pull request as ready for review October 23, 2025 08:57
@Fokko Fokko changed the title API: fix: inject header before creating auth manager - Closes 2655 API: fix: inject header prior to AuthManager Oct 23, 2025
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch @rinzool 🙌

@Fokko Fokko merged commit 7d5c58d into apache:main Oct 23, 2025
8 checks passed
@rinzool rinzool deleted the fix/rest-header-before-auth-issue-2655 branch October 23, 2025 11:34
@rinzool
Copy link
Contributor Author

rinzool commented Oct 23, 2025

Great catch @rinzool 🙌

Thanks @Fokko!

Do you know where the next version of pyiceberg will be published on pypi?

@kevinjqliu
Copy link
Contributor

Do you know where the next version of pyiceberg will be published on pypi?

you can follow #2574 for updates on the next version.

we also have https://test.pypi.org/project/pyiceberg/ for nightly builds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to create polaris catalog due to missing headers

3 participants