Interface AccessControlProvider
-
- All Known Implementing Classes:
AbstractAccessControlProvider,AccessControlConfig,AccessControlProviderImpl
public interface AccessControlProviderThis is the interface for a provider ofAccessControls. It allows tocollectallAccessControls for an ID of aAccessControl(typically aAccessControlGroupor role). This is used to expand the groups provided by the access-manager (authentication and identity-management) to the full set ofpermissionsof theuser.
The actual authorization can then check individual permissions of the user by simply checking forcontainsin the collectedSet, what is very fast as security checks happen frequently.- See Also:
PrincipalAccessControlProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancollectAccessControlIds(String id, Set<String> permissions)This method collects theIDsof allAccessControlPermissions (or more precisely of allAccessControls) contained in theAccessControlidentifiedby the givengroupId.booleancollectAccessControls(String id, Set<AccessControl> permissions)This method collects theAccessControls contained in theAccessControlidentifiedby the givengroupId.default Set<AccessControl>expandPermissions(Collection<String> roleIds)This is a convenvience method to expand the permissions for all given roleIds.AccessControlgetAccessControl(String id)
-
-
-
Method Detail
-
getAccessControl
AccessControl getAccessControl(String id)
- Parameters:
id- is theIDof the requestedAccessControl.- Returns:
- the requested
AccessControlornullif not found.
-
collectAccessControlIds
boolean collectAccessControlIds(String id, Set<String> permissions)
This method collects theIDsof allAccessControlPermissions (or more precisely of allAccessControls) contained in theAccessControlidentifiedby the givengroupId.- Parameters:
id- is theIDof theAccessControl(typically anAccessControlGroup) to collect.permissions- is theSetwhere toaddthe collectedIDs. This will include the givengroupId.- Returns:
trueif the givengroupIdhas been found,falseotherwise.- See Also:
collectAccessControls(String, Set)
-
collectAccessControls
boolean collectAccessControls(String id, Set<AccessControl> permissions)
This method collects theAccessControls contained in theAccessControlidentifiedby the givengroupId.- Parameters:
id- is theIDof theAccessControl(typically anAccessControlGroup) to collect.permissions- is theSetwhere toaddthe collectedAccessControls. This will include theAccessControlidentifiedby the givengroupId.- Returns:
trueif the givengroupIdhas been found,falseotherwise.
-
expandPermissions
default Set<AccessControl> expandPermissions(Collection<String> roleIds)
This is a convenvience method to expand the permissions for all given roleIds. So for each provided roleId the correspondingAccessControlare collected viacollectAccessControls(String, Set).- Parameters:
roleIds- The IDs of the roles.- Returns:
- A collection of
AccessControlbelonging to the given roleIds.
-
-