A policy defines the conditions that must be satisfied to grant access to an object.
- class keycloak.authorization.policy.Policy(name, type, logic, decision_strategy)¶
A policy defines the conditions that must be satisfied to grant access to an object. Unlike permissions, you do not specify the object being protected but rather the conditions that must be satisfied for access to a given object (for example, resource, scope, or both). Policies are strongly related to the different access control mechanisms (ACMs) that you can use to protect your resources. With policies, you can implement strategies for attribute-based access control (ABAC), role-based access control (RBAC), context-based access control, or any combination of these.
- property name(self)¶
- property type(self)¶
- property logic(self)¶
- property decision_strategy(self)¶
- property roles(self)¶
- property permissions(self)¶
- add_role(self, role)¶
Add keycloak role in policy.
role – keycloak role.
- add_permission(self, permission)¶
Add keycloak permission in policy.
permission – keycloak permission.