Bases: object
Interface description for an Identity driver.
The schema for users and groups is different depending on whether the driver is domain aware or not (as returned by self.is_domain_aware()).
If the driver is not domain aware:
The password_expires_at in the user schema is a read-only attribute, meaning that it is expected in the response, but not in the request.
User schema (if driver is domain aware):
type: object
properties:
id:
type: string
name:
type: string
domain_id:
type: string
password:
type: string
password_expires_at:
type: datetime
enabled:
type: boolean
default_project_id:
type: string
required: [id, name, domain_id, enabled]
additionalProperties: True
User schema (if driver is not domain aware):
type: object
properties:
id:
type: string
name:
type: string
password:
type: string
password_expires_at:
type: datetime
enabled:
type: boolean
default_project_id:
type: string
required: [id, name, enabled]
additionalProperties: True
# Note that domain_id is not allowed as a property
Group schema (if driver is domain aware):
type: object
properties:
id:
type: string
name:
type: string
domain_id:
type: string
description:
type: string
required: [id, name, domain_id]
additionalProperties: True
Group schema (if driver is not domain aware):
type: object
properties:
id:
type: string
name:
type: string
description:
type: string
required: [id, name]
additionalProperties: True
# Note that domain_id is not allowed as a property
Add a user to a group.
Parameters: |
|
---|---|
Raises: |
|
Authenticate a given user and password.
Parameters: |
|
---|---|
Returns: | user. See user schema in IdentityDriverV8. |
Return type: | dict |
Raises AssertionError: | |
If user or password is invalid. |
Self-service password change.
Parameters: |
|
---|---|
Raises: |
|
Check if a user is a member of a group.
Parameters: |
|
---|---|
Raises: |
|
Create a new group.
Parameters: |
|
---|---|
Returns: | group, matching the group schema. |
Return type: | dict |
Raises keystone.exception.Conflict: | |
If a duplicate group exists. |
Create a new user.
Parameters: |
|
---|---|
Returns: | user, matching the user schema. The driver should not return the password. |
Return type: | dict |
Raises keystone.exception.Conflict: | |
If a duplicate user exists. |
Delete an existing group.
Parameters: | group_id (str) – Group ID. |
---|---|
Raises keystone.exception.GroupNotFound: | |
If the group doesn’t exist. |
Delete an existing user.
Raises keystone.exception.UserNotFound: | |
---|---|
If the user doesn’t exist. |
Get a group by ID.
Parameters: | group_id (str) – group ID. |
---|---|
Returns: | group info. See group schema in IdentityDriverV8. |
Return type: | dict |
Raises keystone.exception.GroupNotFound: | |
If the group doesn’t exist. |
Get a group by name.
Parameters: |
|
---|---|
Returns: | group info. See group schema in IdentityDriverV8. |
Return type: | dict |
Raises keystone.exception.GroupNotFound: | |
If the group doesn’t exist. |
Get a user by ID.
Parameters: | user_id (str) – User ID. |
---|---|
Returns: | user. See user schema in IdentityDriverV8. |
Return type: | dict |
Raises keystone.exception.UserNotFound: | |
If the user doesn’t exist. |
Get a user by name.
Returns: | user_ref |
---|---|
Raises keystone.exception.UserNotFound: | |
If the user doesn’t exist. |
List groups in the system.
Parameters: | hints (keystone.common.driver_hints.Hints) – filter hints which the driver should implement if at all possible. |
---|---|
Returns: | a list of group_refs or an empty list. See group schema in IdentityDriverV8. |
List groups a user is in.
Parameters: |
|
---|---|
Returns: | a list of group_refs or an empty list. See group schema in IdentityDriverV8. |
Raises keystone.exception.UserNotFound: | |
If the user doesn’t exist. |
List users in the system.
Parameters: | hints (keystone.common.driver_hints.Hints) – filter hints which the driver should implement if at all possible. |
---|---|
Returns: | a list of users or an empty list. See user schema in IdentityDriverV8. |
Return type: | list of dict |
List users in a group.
Parameters: |
|
---|---|
Returns: | a list of users or an empty list. See user schema in IdentityDriverV8. |
Return type: | list of dict |
Raises keystone.exception.GroupNotFound: | |
If the group doesn’t exist. |
Remove a user from a group.
Parameters: |
|
---|---|
Raises keystone.exception.NotFound: | |
If the user is not in the group. |
Update an existing group.
Parameters: |
|
---|---|
Returns: | group, matching the group schema. |
Return type: | dict |
Raises: |
|
Update an existing user.
Parameters: |
|
---|---|
Returns: | user. See user schema in IdentityDriverV8. |
Raises: |
|
Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.ModelDictMixin
Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.DictBase
Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.DictBase
Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.ModelDictMixin
SQL data model for nonlocal users (LDAP and custom).
Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.DictBase
Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.DictBase
Override from_dict to remove password_expires_at attribute.
Overriding this method to remove password_expires_at attribute to support update_user and unit tests where password_expires_at inadvertently gets added by calling to_dict followed by from_dict.
Parameters: | user_dict – User entity dictionary |
---|---|
Returns User: | User object |
Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.DictBase
Group membership join table.