How do I delegate access in Okera?¶
Okera has many access levels that can be used to delegate various data management tasks down to other users. This doc contains some example scenarios on how to delegate data management permissions as per a "distributed stewardship" model. In this model distributed data stewards have as much autonomy as possible in managing access to data in their domain, but do not have access to manage data in other domains.
You can choose to customize these delegated permissions however you want, depending on the personas within your organization.
The examples below show the permissions programatically, however you create all these permissions using the policy builder on the roles page.
Who can delegate permissions?¶
Only System Admins can delegate
CATALOG level permissions to other roles.
What is ownership? (AS_OWNER)¶
You will note the
AS_OWNER post-fix on some of the object access levels.
This enables users to create those objects in the catalog and automatically be granted ownership (i.e. ALL) permission on the new object they have created.
Only the specific user that created that object will get
ALL on the object, not all users with the role.
You can view the ownership permissions a particular user has by searching for their
username on the Roles page.
Example of a user
anna who has ownership on the role
marketing_analyst and on the dataconnection
This is denoted internally by an internal user-role, with the naming convention
For example, for the user
anna the internal user role is named
Catalog scope does not cascade to all databases.
You will not be able to create datasets inside databases you have not created.
Depending on the scope (
DATABASE) the user will only ever have ownership privileges on the databases or tables that they have created, and not on objects created by other users.
Example: Domain level data steward¶
For this example we are creating a
marketing_steward role who can:
- ✅ Create databases in the catalog and become the owner of them
- ✅ Create new connections to underlying sources and be able to register datasets from those sources
- ✅ Register data from source connections they are allowed to register from
- ✅ Create new roles and be the owner of them
- ✅ Manage the
- ✅ Grant permissions on the
marketingdbdatabase to the roles they own
- ✅ Create and assign tags only within the
- ✅ View reports for databases they own
marketing_steward role is granted to the AD group
You could also grant this steward role directly to individual users, instead of a group.
-- create marketing steward role CREATE ROLE marketing_steward; -- grant marketing steward role to relevant users or groups GRANT ROLE marketing_steward to group marketing_steward_group; -- Marketing steward can create databases and be the owner of databases they create GRANT CREATE_AS_OWNER on CATALOG TO ROLE marketing_steward; -- Marketing steward can create roles and be the owner of roles they create GRANT CREATE_ROLE_AS_OWNER on CATALOG to role marketing_steward; -- Marketing steward can create dataconnections and be the owner of databases they create GRANT CREATE_DATACONNECTION_AS_OWNER on CATALOG to role marketing_steward; -- Marketing steward can create crawlers on from certain connections -- and be the owner of crawlers they create GRANT CREATE_CRAWLER_AS_OWNER on CATALOG to role marketing_steward; -- In order to register tables from object storage, steward needs to be granted access to the URI -- In this example steward will only be able to create tables under the specified path GRANT ALL ON URI 's3://acme-data/department/marketing' TO ROLE marketing_steward; -- Marketing steward can manage the marketingdb database -- WITH GRANT OPTION flag enables management of policies as well GRANT ALL ON DATABASE marketingdb TO ROLE marketing_steward WITH GRANT OPTION; -- Grant access to the marketing attribute namespace -- This means the steward can create and assign tags only from this namespace GRANT ALL on ATTRIBUTE NAMESPACE marketing TO ROLE marketing_steward; -- Grant access to the Reports feature in the UI GRANT ROLE okera_reports_role to GROUP marketing_steward_group;
Example: Governance Persona¶
For this example we are creating a
governance role who can:
- ✅ View audit logs across the Catalog
- ✅ Create tags inside the
- ✅ Assign tags from
piiAttribute Namespace on all data objects (Databases, Tables, Cols) in the Catalog
governance role is granted to the AD group
You could also grant this
governance role directly to individual users, instead of a group.
-- create governance role CREATE ROLE governance; -- grant governance role to relevant users or groups GRANT ROLE governance to group governance_group; -- grant ability to see audit logs for all catalog objects GRANT VIEW_AUDIT on CATALOG to role governance; -- Grant access to the Reports feature in the UI GRANT ROLE okera_reports_role to GROUP governance_group; -- Grant access to create tags and attribute namespaces GRANT ALL on ATTRIBUTE NAMESPACE pii to role governance; -- Grant access to assign tags across all data objects GRANT ADD_ATTRIBUTE on CATALOG to role governance; GRANT REMOVE_ATTRIBUTE on CATALOG to role governance;