Cross Tenancy Object Storage Access
Data Flow SQL Endpoints can access object storage across tenancies. They can do something in a different tenancy to the one they exist in.
- Your SQL Endpoint is
dataflow-sample-endpointin a tenancy,Tenancy-A. - The objects to be read are in a tenancy called
Tenancy-B, and the index of the objects is created in the same bucket.
tenancy-a-group to read buckets and objects in
Tenancy-B:- Apply the following policies in the root compartment of
Tenancy-A:define tenancy Tenancy-B as tenancy-b-ocid endorse any-user to read buckets in tenancy Tenancy-B where ALL {request.principal.type='dataflowsqlendpoint',request.principal.id = '<dataflow-sample-endpoint-ocid>'} endorse any-user to manage objects in tenancy Tenancy-B where ALL {request.principal.type='dataflowsqlendpoint',request.principal.id = '<dataflow-sample-endpoint-ocid>'} endorse any-user to read object-family in tenancy Tenancy-B where ALL {request.principal.type='datacatalogmetastore'}The first statement is a
definestatement that assigns a friendly label to the OCID ofTenancy-B. The second and third statements letdataflow-sample-endpointread buckets and manage objects inTenancy-B. The last statement lets the metastore read objects inTenancy-B. - Apply these policies in the root compartment of
Tenancy-B:define tenancy Tenancy_A as tenancy-a-ocid admit any-user of tenancy Tenancy-A to read buckets in compartment <compartment> where ALL {request.principal.type='dataflowsqlendpoint',request.principal.id = '<dataflow-sample-endpoint-ocid>'} admit any-user of tenancy Tenancy-A to manage objects in compartment <compartment> Tenancy-B where ALL {request.principal.type='dataflowsqlendpoint',request.principal.id = '<dataflow-sample-endpoint-ocid>'} admit any-user of tenancy Tenancy-A to read object-family in compartment <compartment> where ALL {request.principal.type='datacatalogmetastore'}The first statement is a define statement that assigns a friendly label to the OCID of Tenancy-A. The second and third statements let dataflow-sample-endpoint read the buckets and manage objects in Tenancy-B. The last statement lets metastore read objects in Tenancy-B. The word 'admit' indicates that the access applies to a dataflow-sample-endpoint outside the tenancy the buckets and objects reside in.
You can limit further, by limiting the managed objects policy to a bucket. For example, limit to a bucket called
your-bucketinyour-compartment:admit any-user of tenancy Tenancy-A to manage objects in compartment your-compartment Tenancy-B where ALL {target.bucket.name = 'your-bucket', request.principal.type='dataflowsqlendpoint',request.principal.id = '<dataflow-sample-endpoint-ocid>'}