# keystone.credential.backends.sql module

class keystone.credential.backends.sql.Credential

  Bases: `CredentialDriverBase`

  create_credential(credential_id, credential)

    Create a new credential.

    Raises:

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

  delete_credential(credential_id)

    Delete an existing credential.

    Raises:

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

  delete_credentials_for_project(project_id)

    Delete all credentials for a project.

  delete_credentials_for_user(user_id)

    Delete all credentials for a user.

  get_credential(credential_id)

    Get a credential by ID.

    Returns:

      credential_ref

    Raises:

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

  list_credentials(hints)

    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.

  list_credentials_for_user(user_id, type=None)

    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.

  update_credential(credential_id, credential)

    Update an existing credential.

    Raises:

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

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

class keystone.credential.backends.sql.CredentialModel(*args, **kwargs)

  Bases: `Base`, `ModelDictMixinWithExtras`

  attributes: list[str] = ['id', 'user_id', 'project_id', 'encrypted_blob', 'type', 'key_hash']
  encrypted_blob
  extra
  id
  key_hash
  project_id
  type
  user_id

this page last updated: 2026-08-17 12:45:24

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

found an error? report a bug