keystone.policy.backends.base module

keystone.policy.backends.base module

class keystone.policy.backends.base.PolicyDriverBase[source]

Bases: object

abstract create_policy(policy_id, policy)[source]

Store a policy blob.

Raises:

keystone.exception.Conflict – If a duplicate policy exists.

abstract delete_policy(policy_id)[source]

Remove a policy blob.

Raises:

keystone.exception.PolicyNotFound – If the policy doesn’t exist.

abstract enforce(context, credentials, action, target)[source]

Verify that a user is authorized to perform action.

For more information on a full implementation of this see: keystone.policy.backends.rules.Policy.enforce

abstract get_policy(policy_id)[source]

Retrieve a specific policy blob.

Raises:

keystone.exception.PolicyNotFound – If the policy doesn’t exist.

abstract list_policies()[source]

List all policies.

abstract update_policy(policy_id, policy)[source]

Update a policy blob.

Raises:

keystone.exception.PolicyNotFound – If the policy doesn’t exist.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.