sachinnn99 commented on PR #10800:
URL: https://github.com/apache/gravitino/pull/10800#issuecomment-4952122179

   @roryqi Tested the federated interface by hand. Setup: upstream IRC (memory 
backend + S3TokenCredential provider) on port 9001, federated IRC 
(`catalog-backend = rest`) on port 9002 pointing at upstream.
   
   **Federated — planTableScan without credential vending:**
   
   ```bash
   curl -s -X POST 
http://127.0.0.1:9002/iceberg/v1/federated/namespaces/db/tables/test_tbl/plan \
     -H 'Content-Type: application/json' -d '{}'
   ```
   
   ```json
   {
       "status": "completed",
       "file-scan-tasks": []
   }
   ```
   
   **Federated — planTableScan with credential vending:**
   
   ```bash
   curl -s -X POST 
http://127.0.0.1:9002/iceberg/v1/federated/namespaces/db/tables/test_tbl/plan \
     -H 'Content-Type: application/json' \
     -H 'X-Iceberg-Access-Delegation: vended-credentials' -d '{}'
   ```
   
   ```json
   {
       "status": "completed",
       "storage-credentials": [
           {
               "prefix": "s3://test-bucket/warehouse/db/test_tbl",
               "config": {
                   "s3.session-token-expires-at-ms": "1783865183269",
                   "s3.access-key-id": "AKIA_DUMMY_TEST_KEY",
                   "s3.secret-access-key": "dummy-secret-access-key-12345",
                   "s3.session-token": "dummy-session-token-xyz",
                   "client.refresh-credentials-endpoint": 
"v1/federated/namespaces/db/tables/test_tbl/credentials"
               }
           }
       ],
       "file-scan-tasks": []
   }
   ```
   
   Scan planning is delegated to the remote catalog. 
`client.refresh-credentials-endpoint` is rewritten from 
`v1/default_catalog/...` (upstream) to `v1/federated/...` (this IRC instance).


-- 
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