Package org.infinispan.security
Interface AuthorizationManager
- All Known Implementing Classes:
AuthorizationManagerImpl,PermissiveAuthorizationManager
public interface AuthorizationManager
The AuthorizationManager is a cache-scoped component which verifies that the
Subject
associated with the current AccessControlContext, or explicitly specified, has the requested permissions.- Since:
- 7.0
- Author:
- Tristan Tarrant
-
Method Summary
Modifier and TypeMethodDescriptionvoidcheckPermission(Subject subject, AuthorizationPermission permission) Verifies that theSubjecthas the requested permission.voidcheckPermission(Subject subject, AuthorizationPermission permission, String role) Verifies that theSubjecthas the requested permission and role.voidcheckPermission(AuthorizationPermission permission) Verifies that theSubjectassociated with the currentAccessControlContexthas the requested permission.voidcheckPermission(AuthorizationPermission permission, String role) Verifies that theSubjectassociated with the currentAccessControlContexthas the requested permission and role.voiddoIf(Subject subject, AuthorizationPermission permission, Runnable runnable) Executes the runnable only if the current user has the specified permissiongetPermissions(Subject subject) Returns the permissions that the specifiedSubjecthas for the cacheReturns the permission required to write to the resource associated with this AuthorizationManager.boolean
-
Method Details
-
checkPermission
Verifies that theSubjectassociated with the currentAccessControlContexthas the requested permission. ASecurityExceptionis thrown otherwise. -
checkPermission
Verifies that theSubjecthas the requested permission. ASecurityExceptionis thrown otherwise. -
checkPermission
Verifies that theSubjectassociated with the currentAccessControlContexthas the requested permission and role. ASecurityExceptionis thrown otherwise. -
checkPermission
Verifies that theSubjecthas the requested permission and role. ASecurityExceptionis thrown otherwise. -
getPermissions
Returns the permissions that the specifiedSubjecthas for the cache -
getWritePermission
AuthorizationPermission getWritePermission()Returns the permission required to write to the resource associated with this AuthorizationManager. -
doIf
Executes the runnable only if the current user has the specified permission -
isPermissive
boolean isPermissive()
-