Interface AccessControlProvider
-
- All Known Implementing Classes:
AbstractAccessControlProvider
,AccessControlConfig
,AccessControlProviderImpl
public interface AccessControlProvider
This is the interface for a provider ofAccessControl
s. It allows tocollect
allAccessControl
s for an ID of aAccessControl
(typically aAccessControlGroup
or role). This is used to expand the groups provided by the access-manager (authentication and identity-management) to the full set ofpermissions
of theuser
.
The actual authorization can then check individual permissions of the user by simply checking forcontains
in 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 boolean
collectAccessControlIds(String id, Set<String> permissions)
This method collects theIDs
of allAccessControlPermission
s (or more precisely of allAccessControl
s) contained in theAccessControl
identified
by the givengroupId
.boolean
collectAccessControls(String id, Set<AccessControl> permissions)
This method collects theAccessControl
s contained in theAccessControl
identified
by the givengroupId
.default Set<AccessControl>
expandPermissions(Collection<String> roleIds)
This is a convenvience method to expand the permissions for all given roleIds.AccessControl
getAccessControl(String id)
-
-
-
Method Detail
-
getAccessControl
AccessControl getAccessControl(String id)
- Parameters:
id
- is theID
of the requestedAccessControl
.- Returns:
- the requested
AccessControl
ornull
if not found.
-
collectAccessControlIds
boolean collectAccessControlIds(String id, Set<String> permissions)
This method collects theIDs
of allAccessControlPermission
s (or more precisely of allAccessControl
s) contained in theAccessControl
identified
by the givengroupId
.- Parameters:
id
- is theID
of theAccessControl
(typically anAccessControlGroup
) to collect.permissions
- is theSet
where toadd
the collectedIDs
. This will include the givengroupId
.- Returns:
true
if the givengroupId
has been found,false
otherwise.- See Also:
collectAccessControls(String, Set)
-
collectAccessControls
boolean collectAccessControls(String id, Set<AccessControl> permissions)
This method collects theAccessControl
s contained in theAccessControl
identified
by the givengroupId
.- Parameters:
id
- is theID
of theAccessControl
(typically anAccessControlGroup
) to collect.permissions
- is theSet
where toadd
the collectedAccessControl
s. This will include theAccessControl
identified
by the givengroupId
.- Returns:
true
if the givengroupId
has been found,false
otherwise.
-
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 correspondingAccessControl
are collected viacollectAccessControls(String, Set)
.- Parameters:
roleIds
- The IDs of the roles.- Returns:
- A collection of
AccessControl
belonging to the given roleIds.
-
-