From 9b58f5ed458bb1cb05a7dc53876e81f3068cd53a Mon Sep 17 00:00:00 2001 From: Eduard Tudenhoefner Date: Fri, 16 Feb 2024 11:12:09 +0100 Subject: [PATCH 1/2] Send X-Iceberg-Access-Delegation header to signal support for vended credentials/remote signing Clients can optionally send this header to signal which delegated access pattern it can support. At this point the iceberg-python client can support `vended-credentials` and `remote-signing`, thus we can always send this header. Addtional details about this header can be found in the REST OpenAPI spec: https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml#L1459-L1483 --- pyiceberg/catalog/rest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyiceberg/catalog/rest.py b/pyiceberg/catalog/rest.py index b4b9f722b5..2ffd926eb3 100644 --- a/pyiceberg/catalog/rest.py +++ b/pyiceberg/catalog/rest.py @@ -237,6 +237,7 @@ def _create_session(self) -> Session: session.headers["Content-type"] = "application/json" session.headers["X-Client-Version"] = ICEBERG_REST_SPEC_VERSION session.headers["User-Agent"] = f"PyIceberg/{__version__}" + session.headers["X-Iceberg-Access-Delegation"] = "vended-credentials,remote-signing" # Configure SigV4 Request Signing if str(self.properties.get(SIGV4, False)).lower() == "true": From 9fd9b22c7e829b1448f1f0c1129eb7fb294334cb Mon Sep 17 00:00:00 2001 From: Eduard Tudenhoefner Date: Sat, 17 Feb 2024 08:08:08 +0100 Subject: [PATCH 2/2] Update rest.py --- pyiceberg/catalog/rest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyiceberg/catalog/rest.py b/pyiceberg/catalog/rest.py index 2ffd926eb3..8560668a0d 100644 --- a/pyiceberg/catalog/rest.py +++ b/pyiceberg/catalog/rest.py @@ -237,7 +237,7 @@ def _create_session(self) -> Session: session.headers["Content-type"] = "application/json" session.headers["X-Client-Version"] = ICEBERG_REST_SPEC_VERSION session.headers["User-Agent"] = f"PyIceberg/{__version__}" - session.headers["X-Iceberg-Access-Delegation"] = "vended-credentials,remote-signing" + session.headers["X-Iceberg-Access-Delegation"] = "vended-credentials" # Configure SigV4 Request Signing if str(self.properties.get(SIGV4, False)).lower() == "true":