Package org.apache.hadoop.ozone.om
Interface TenantOp
- All Known Implementing Classes:
OMMultiTenantManagerImpl.AuthorizerOp,OMMultiTenantManagerImpl.CacheOp
@Private
@Unstable
public interface TenantOp
Interface for tenant operations.
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignTenantAdmin(String accessId, boolean delegated) Given an accessId, grant that user admin privilege in the tenant.voidassignUserToTenant(String userPrincipal, String tenantId, String accessId) Creates a new user that exists for S3 API access to Ozone.voidcreateTenant(String tenantId, String userRoleName, String adminRoleName) Given a tenant name, create tenant roles and policies in the authorizer (Ranger).voiddeleteTenant(org.apache.hadoop.ozone.om.multitenant.Tenant tenant) Given a Tenant object, remove all policies and roles from Ranger that are added during tenant creation.voidrevokeTenantAdmin(String accessId) Given an accessId, revoke that user's admin privilege in that tenant.voidrevokeUserAccessId(String accessId, String tenantId) Revoke user accessId in a tenant.
-
Method Details
-
createTenant
Given a tenant name, create tenant roles and policies in the authorizer (Ranger). Then return a Tenant object.- Parameters:
tenantId- tenant nameuserRoleName- user role nameadminRoleName- admin role name- Throws:
IOException
-
deleteTenant
Given a Tenant object, remove all policies and roles from Ranger that are added during tenant creation. Note this differs from deactivateTenant() above.- Parameters:
tenant- tenant object- Throws:
IOException
-
assignUserToTenant
Creates a new user that exists for S3 API access to Ozone.- Parameters:
userPrincipal- user principaltenantId- tenant nameaccessId- access ID- Throws:
IOException
-
revokeUserAccessId
Revoke user accessId in a tenant.- Parameters:
accessId- access IDtenantId- tenant name- Throws:
IOException
-
assignTenantAdmin
Given an accessId, grant that user admin privilege in the tenant.- Parameters:
accessId- access IDdelegated- true if intending to assign as the user as the tenant's delegated admin (who can assign and revoke other tenant admins in this tenant)- Throws:
IOException
-
revokeTenantAdmin
Given an accessId, revoke that user's admin privilege in that tenant.- Parameters:
accessId- access ID- Throws:
IOException
-