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

   ### Describe the feature
   
   Let a metalake share tables with external parties without copying data and 
without making them
   Gravitino users:
   
   - **Shares**: named, owned sets of tables, each exposed under an alias.
   - **Recipients**: external parties that authenticate with Gravitino-issued 
bearer tokens and can
     only call share endpoints.
   - **Grants**: a share given to a recipient, with an optional expiry, 
revocable at any time.
   - A read-only Iceberg REST endpoint where each share is a warehouse, so any 
Iceberg client
     (Spark, Trino, Flink, PyIceberg and others) reads shared tables unchanged, 
using short-lived,
     path-scoped read credentials.
   
   ### Motivation
   
   Sharing a table outside the organization today means one of three things:
   
   - copying files to a partner bucket
   - adding the partner to the organization's IdP and granting roles, which 
exposes the whole API
     and has no expiry
   - handing out static storage keys
   
   None of these has a table boundary, expiry, a revocation story and an audit 
trail all at once.
   
   Gravitino already has the pieces a sharing feature needs:
   
   - the Iceberg REST service with snapshot filtering and scan planning
   - path-scoped token credential providers
   - audit events
   
   It has no model for what is shared, with whom, and until when.
   
   ### Describe the solution
   
   - `SHARE` and `RECIPIENT` entities in the relational store, with management 
endpoints for shares,
     recipients, tokens and grants under `/api/metalakes/{metalake}`.
   - New `CREATE_SHARE` and `CREATE_RECIPIENT` privileges.
     - Adding a table to a share requires ownership of the table or an ancestor.
     - Granting a share requires owning both the share and the recipient.
   - `/iceberg-share/` on the Iceberg REST auxiliary service: config, 
namespaces, tables, load,
     credential refresh and scan planning. All writes are rejected.
   - Requests a recipient is not entitled to return `404`, so shares and tables 
cannot be probed.
   - Revocation rejects the next request on every node. Access through 
already-vended credentials is
     bounded by a configured maximum credential lifetime.
   - `GET /objects/{type}/{fullName}/shares`, so table owners can see where 
their data is shared.
   - Audit events for every recipient request.
   
   Off by default. A design document will follow in a PR.
   
   ### Additional context
   
   - Row filters and column masks for recipients are out of scope, because the 
recipient's engine
     cannot be trusted to enforce them.
   - A Delta Sharing adapter can be added later on the same share model.
   - Recipient events become queryable through the audit store proposed in 
#14922.
   


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