When a tenant is created, Ozone will create a set of Ranger policies on the tenant’s volume which allow the following:
Ranger admin is responsible for manually adding new policies to grant or deny any other access patterns. For example:
Roles = tenantName-UserRole, Permissions = READ,LIST
It is recommended to add new policies instead of editing the default tenant policies created by Ozone. DO NOT remove the Policy Label on those default tenant policies, or else the Ozone Manager might fail to sync with Ranger for those policies.
These new Ranger policies would have the corresponding Ranger roles added in their Allow Conditions.
Namely, tenantName-UserRole
and tenantName-AdminRole
Ranger roles are created when a tenant is created by an Ozone administrator under the CLI.
tenantName-UserRole
contains a list of all user names that are assigned to this tenant.
tenantName-AdminRole
contains a list of all tenant admins that are assigned to this tenant.
We leverage Ranger roles mainly for the advantage of easier user management in a tenant:
tenantName-UserRole
Ranger role.tenantName-AdminRole
Ranger role. Delegated tenant admins will have the “Role Admin” checkbox checked, while non-delegated tenant admins won’t.
tenantName-AdminRole
is the “Role Admin” of tenantName-UserRole
, whichever user in the tenantName-AdminRole
automatically has the permission to add new users to the tenant, meaning all tenant admins (whether delegated or not) has the permission to assign and revoke users in this tenant.A Ranger Sync thread has been implemented to keep the Ranger policy and role states in-sync with Ozone Manager database in case of Ozone Manager crashes during tenant administrative operations.
The Ranger Sync thread does the following:
By default, only the bucket owners have full access to the buckets they created. Other regular users won’t be able to access the content of buckets they don’t own.
So in order to share a bucket with other users without relaxing the default bucket policy (e.g. allow all tenant users LIST and READ access to all buckets), a cluster admin or tenant admin will needs to manually create a new Ozone policy in Ranger for that bucket.
Further, if a cluster admin or tenant admin wants the bucket owner (who is a regular tenant user without any superuser privileges) to be able to edit that bucket’s policy, when manually creating a new Ozone policy in Ranger for that bucket, an admin will need to explicitly grant the bucket owner user ALL permission on the bucket AND tick the bucket owner user’s “Delegated Admin” checkbox for that policy.
Note:
hive
) need to be specified here. The flexible {OWNER}
tag will not work with Ranger’s “Delegated Admin” checkbox. For more Technical details:{OWNER}
tag is only meaningful when Ozone Manager (OM) is performing a permission check. And in that permission check process OM fills in what this {OWNER}
tag actually stands for.
{OWNER}
will become user hive
during a bucket list permission check in OM, assuming hive
is the bucket owner;
{OWNER}
will become user om
during a volume read permission check before this bucket permission check, assuming om
is the bucket’s parent volume’s owner.With this new Ranger policy, as long as the bucket owners can log in to the Ranger Web UI, they could edit the bucket policies on their own, for example, to share the bucket with others without an administrator’s manual intervention.