keystone.credential.backends.base module

class keystone.credential.backends.base.CredentialDriverBase[source]

Bases: object

abstract create_credential(credential_id, credential)[source]

Create a new credential.

Raises

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

abstract delete_credential(credential_id)[source]

Delete an existing credential.

Raises

keystone.exception.CredentialNotFound – If credential doesn’t exist.

abstract delete_credentials_for_project(project_id)[source]

Delete all credentials for a project.

abstract delete_credentials_for_user(user_id)[source]

Delete all credentials for a user.

abstract get_credential(credential_id)[source]

Get a credential by ID.

Returns

credential_ref

Raises

keystone.exception.CredentialNotFound – If credential doesn’t exist.

abstract list_credentials(hints)[source]

List all credentials.

Parameters

hints – contains the list of filters yet to be satisfied. Any filters satisfied here will be removed so that the caller will know if any filters remain.

Returns

a list of credential_refs or an empty list.

abstract list_credentials_for_user(user_id, type=None)[source]

List credentials for a user.

Parameters
  • user_id – ID of a user to filter credentials by.

  • type – type of credentials to filter on.

Returns

a list of credential_refs or an empty list.

abstract update_credential(credential_id, credential)[source]

Update an existing credential.

Raises