shaofengshi opened a new issue, #9837:
URL: https://github.com/apache/gravitino/issues/9837

   ### What would you like to be improved?
   
   First, this is only for a testing case, as it is using a local folder as 
Iceberg storage location.
   
   Secondly, this is a limitation of PyIceberg rest client, as it hardcode the 
credential-vending in HTTP request header:
   
   `    def _config_headers(self, session: Session) -> None:
           header_properties = self._extract_headers_from_properties()
           session.headers.update(header_properties)
           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"
   `
   
   Today when I use PyIceberg's rest to access gravitino and specifying a local 
path to create table, it will reports error:
   
   `
     catalog = RestCatalog(
           name="gravitino",
           uri=iceberg_rest_endpoint
       )
       print(f"Catalog created: {catalog.name}")
   
     catalog.create_namespace(namespace_name)        
   print(f"Namespace created: {namespace_name}")
   
           # Step 3: Create table
           print(f"\n=== Creating Iceberg Table ===")
           schema = Schema(
               NestedField(field_id=1, name="id", field_type=IntegerType(), 
required=True),
               NestedField(field_id=2, name="name", field_type=StringType(), 
required=False),
               NestedField(field_id=3, name="age", field_type=IntegerType(), 
required=False),
               NestedField(field_id=4, name="score", field_type=DoubleType(), 
required=False),
           )
   
           table = catalog.create_table(
               identifier=f"{namespace_name}.{table_name}",
               schema=schema,
           )
   `
   It reports error:
   
   `E       pyiceberg.exceptions.BadRequestError: IllegalArgumentException: 
There are no credential provider for the catalog.
   `
   
   
   
   ### How should we improve?
   
   There are several ways to enhance:
   
   1. For a local path as storage, Gravitino should not check credential 
providers (ignore the header of credential-vending)
   2. or, return a mock token for client side.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to