Interface PartialEvaluationPolicyProvider
- All Known Implementing Classes:
GroupPolicyProvider,RolePolicyProvider,UserPolicyProvider
public interface PartialEvaluationPolicyProvider
PolicyProvider types can implement this interface if they support to partially evaluate the permissions
that should apply to a given subject, a UserModel, when calculating the realm resources they have access in the context of the
Profile.Feature.ADMIN_FINE_GRAINED_AUTHZ feature.-
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate(KeycloakSession session, Policy policy, UserModel subject) Evaluate if the givenpolicygrants access to the givensubject.getPermissions(KeycloakSession session, ResourceType resourceType, UserModel subject) Returns a list ofPolicyinstances representing the permissions that apply to a givensubjectwhen partially evaluating the realm resources that can be accessed.booleanIf partial evaluation is supported for the givenpolicy.
-
Method Details
-
getPermissions
Stream<Policy> getPermissions(KeycloakSession session, ResourceType resourceType, UserModel subject) Returns a list ofPolicyinstances representing the permissions that apply to a givensubjectwhen partially evaluating the realm resources that can be accessed.- Parameters:
session- the sessionresourceType- the type of the resourcesubject- the subject- Returns:
- the permissions that apply to the given
subject
-
supports
If partial evaluation is supported for the givenpolicy.- Parameters:
policy- the policy- Returns:
trueif supported. Otherwise, returnsfalse
-
evaluate
Evaluate if the givenpolicygrants access to the givensubject.- Parameters:
session- the sessionpolicy- the policysubject- the subject- Returns:
trueif access is granted. Otherwise, returnsfalse
-