Interface MultiTenantAccessController
- All Known Implementing Classes:
InMemoryMultiTenantAccessController
public interface MultiTenantAccessController
Defines the operations needed for multi-tenant access control.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classDefine an acl.static classDefine a policy to be created.static classDefine a role to be created. -
Method Summary
Modifier and TypeMethodDescriptionstatic MultiTenantAccessControllercreate(org.apache.hadoop.hdds.conf.ConfigurationSource conf) CreateMultiTenantAccessControllerimplementation.This operation will fail if a policy with the same name already exists, or a policy for the same set of resources already exists.This operation will fail if a role with the same name already exists.voiddeletePolicy(String policyName) voiddeleteRole(String roleName) getLabeledPolicies(String label) longupdateRole(long roleId, MultiTenantAccessController.Role role) Replaces the role given byroleIdwith the contents ofrole.
-
Method Details
-
createPolicy
MultiTenantAccessController.Policy createPolicy(MultiTenantAccessController.Policy policy) throws IOException This operation will fail if a policy with the same name already exists, or a policy for the same set of resources already exists. Roles defined in this policy that do not already exist will be created.- Throws:
IOException
-
getPolicy
- Throws:
IOException
-
getLabeledPolicies
- Throws:
IOException
-
updatePolicy
MultiTenantAccessController.Policy updatePolicy(MultiTenantAccessController.Policy policy) throws IOException - Throws:
IOException
-
deletePolicy
- Throws:
IOException
-
createRole
MultiTenantAccessController.Role createRole(MultiTenantAccessController.Role role) throws IOException This operation will fail if a role with the same name already exists.- Returns:
- Role ID returned from remote server.
- Throws:
IOException
-
getRole
- Throws:
IOException
-
updateRole
MultiTenantAccessController.Role updateRole(long roleId, MultiTenantAccessController.Role role) throws IOException Replaces the role given byroleIdwith the contents ofrole. IfroleIddoes not correspond to a role, an exception is thrown. The roleId of a given role can be retrieved from thegetRolemethod.- Throws:
IOException
-
deleteRole
- Throws:
IOException
-
getRangerServicePolicyVersion
- Throws:
IOException
-
getRangerAclStrings
-
create
CreateMultiTenantAccessControllerimplementation.
-