This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-python.git


The following commit(s) were added to refs/heads/main by this push:
     new f2aee48  Send X-Iceberg-Access-Delegation header to signal support for 
vended credentials/remote signing (#436)
f2aee48 is described below

commit f2aee48438731c0624207c62c62fff402981ad76
Author: Eduard Tudenhoefner <[email protected]>
AuthorDate: Tue Feb 20 22:06:30 2024 +0100

    Send X-Iceberg-Access-Delegation header to signal support for vended 
credentials/remote signing (#436)
    
    * 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
    
    * Update rest.py
---
 pyiceberg/catalog/rest.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pyiceberg/catalog/rest.py b/pyiceberg/catalog/rest.py
index b4b9f72..8560668 100644
--- a/pyiceberg/catalog/rest.py
+++ b/pyiceberg/catalog/rest.py
@@ -237,6 +237,7 @@ class RestCatalog(Catalog):
         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"
 
         # Configure SigV4 Request Signing
         if str(self.properties.get(SIGV4, False)).lower() == "true":

Reply via email to