public class NoOpAuthorizer extends AbstractAuthorizer
ALLOW_ALL| Constructor and Description |
|---|
NoOpAuthorizer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRoleToPrincipal(Role role,
Principal principal)
Add a role to the specified
Principal. |
Predicate<EntityId> |
createFilter(Principal principal)
|
void |
createRole(Role role)
Create a role.
|
void |
dropRole(Role role)
Drop a role.
|
void |
enforce(EntityId entity,
Principal principal,
Set<Action> actions)
|
void |
grant(EntityId entity,
Principal principal,
Set<Action> actions)
|
Set<Role> |
listAllRoles()
Returns all available
Role. |
Set<Privilege> |
listPrivileges(Principal principal)
|
Set<Role> |
listRoles(Principal principal)
|
void |
removeRoleFromPrincipal(Role role,
Principal principal)
Delete a role from the specified
Principal. |
void |
revoke(EntityId entity)
|
void |
revoke(EntityId entity,
Principal principal,
Set<Action> actions)
|
destroy, enforce, initializepublic void enforce(EntityId entity, Principal principal, Set<Action> actions) throws Exception
AuthorizationEnforcerPrincipal for the specified actions on the
specified EntityId.entity - the EntityId on which authorization is to be enforcedprincipal - the Principal that performs the actionsactions - the actions being performedUnauthorizedException - if the principal is not authorized to perform the specified actions on the entityException - if any other errors occurred while performing the authorization enforcement checkpublic Predicate<EntityId> createFilter(Principal principal) throws Exception
AuthorizationEnforcerPredicate that can be used to filter a set of entities to only return the entities that the
specified Principal has access (READ/WRITE/ADMIN/ALL) to.createFilter in interface AuthorizationEnforcercreateFilter in class AbstractAuthorizerprincipal - the Principal for which to filterentities that the specified user has access toExceptionpublic void grant(EntityId entity, Principal principal, Set<Action> actions)
PrivilegesManagerpublic void revoke(EntityId entity, Principal principal, Set<Action> actions)
PrivilegesManagerpublic void revoke(EntityId entity)
PrivilegesManagerpublic void createRole(Role role)
Authorizerrole - the Role to createpublic void dropRole(Role role)
Authorizerrole - the Role to droppublic void addRoleToPrincipal(Role role, Principal principal)
AuthorizerPrincipal.public void removeRoleFromPrincipal(Role role, Principal principal)
AuthorizerPrincipal.public Set<Role> listRoles(Principal principal)
Authorizerpublic Set<Role> listAllRoles()
AuthorizerRole. Only a super user can perform this operation.Role in the system.Copyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.