keystone.identity.backends.ldap.core.
GroupApi
(conf)[source]¶Bases: keystone.identity.backends.ldap.common.BaseLdap
DEFAULT_ID_ATTR
= 'cn'¶DEFAULT_MEMBER_ATTRIBUTE
= 'member'¶DEFAULT_OBJECTCLASS
= 'groupOfNames'¶DEFAULT_OU
= 'ou=UserGroups'¶DEFAULT_STRUCTURAL_CLASSES
= []¶NotFound
¶alias of keystone.exception.GroupNotFound
attribute_options_names
= {'description': 'desc', 'name': 'name'}¶immutable_attrs
= ['name']¶list_user_groups_filtered
(user_dn, hints)[source]¶Return a filtered list of groups for which the user is a member.
model
¶options_name
= 'group'¶keystone.identity.backends.ldap.core.
Identity
(conf=None)[source]¶Bases: keystone.identity.backends.base.IdentityDriverBase
add_user_to_group
(user_id, group_id)[source]¶Add a user to a group.
user_id (str) – User ID.
group_id (str) – Group ID.
keystone.exception.UserNotFound – If the user doesn’t exist.
keystone.exception.GroupNotFound – If the group doesn’t exist.
authenticate
(user_id, password)[source]¶Authenticate a given user and password.
user_id (str) – User ID
password (str) – Password
user. See user schema in IdentityDriverBase
.
dict
AssertionError – If user or password is invalid.
change_password
(user_id, new_password)[source]¶Self-service password change.
user_id (str) – User ID.
new_password (str) – New password.
keystone.exception.UserNotFound – If the user doesn’t exist.
keystone.exception.PasswordValidation – If password fails validation
check_user_in_group
(user_id, group_id)[source]¶Check if a user is a member of a group.
user_id (str) – User ID.
group_id (str) – Group ID.
keystone.exception.NotFound – If the user is not a member of the group.
keystone.exception.UserNotFound – If the user doesn’t exist.
keystone.exception.GroupNotFound – If the group doesn’t exist.
create_group
(group_id, group)[source]¶Create a new group.
group_id (str) – group ID. The driver can ignore this value.
group (dict) – group info. See group schema in
IdentityDriverBase
.
group, matching the group schema.
dict
keystone.exception.Conflict – If a duplicate group exists.
create_user
(user_id, user)[source]¶Create a new user.
user_id (str) – user ID. The driver can ignore this value.
user (dict) – user info. See user schema in
IdentityDriverBase
.
user, matching the user schema. The driver should not return the password.
dict
keystone.exception.Conflict – If a duplicate user exists.
delete_group
(group_id)[source]¶Delete an existing group.
group_id (str) – Group ID.
keystone.exception.GroupNotFound – If the group doesn’t exist.
delete_user
(user_id)[source]¶Delete an existing user.
keystone.exception.UserNotFound – If the user doesn’t exist.
get_group
(group_id)[source]¶Get a group by ID.
group_id (str) – group ID.
group info. See group schema in IdentityDriverBase
dict
keystone.exception.GroupNotFound – If the group doesn’t exist.
get_group_by_name
(group_name, domain_id)[source]¶Get a group by name.
group_name (str) – group name.
domain_id (str) – domain ID.
group info. See group schema in
IdentityDriverBase
.
dict
keystone.exception.GroupNotFound – If the group doesn’t exist.
get_user
(user_id)[source]¶Get a user by ID.
user_id (str) – User ID.
user. See user schema in IdentityDriverBase
.
dict
keystone.exception.UserNotFound – If the user doesn’t exist.
get_user_by_name
(user_name, domain_id)[source]¶Get a user by name.
user_ref
keystone.exception.UserNotFound – If the user doesn’t exist.
list_groups
(hints)[source]¶List groups in the system.
hints (keystone.common.driver_hints.Hints) – filter hints which the driver should implement if at all possible.
a list of group_refs or an empty list. See group schema in
IdentityDriverBase
.
list_groups_for_user
(user_id, hints)[source]¶List groups a user is in.
user_id (str) – the user in question
hints (keystone.common.driver_hints.Hints) – filter hints which the driver should implement if at all possible.
a list of group_refs or an empty list. See group schema in
IdentityDriverBase
.
keystone.exception.UserNotFound – If the user doesn’t exist.
list_users
(hints)[source]¶List users in the system.
hints (keystone.common.driver_hints.Hints) – filter hints which the driver should implement if at all possible.
a list of users or an empty list. See user schema in
IdentityDriverBase
.
list of dict
list_users_in_group
(group_id, hints)[source]¶List users in a group.
group_id (str) – the group in question
hints (keystone.common.driver_hints.Hints) – filter hints which the driver should implement if at all possible.
a list of users or an empty list. See user schema in
IdentityDriverBase
.
list of dict
keystone.exception.GroupNotFound – If the group doesn’t exist.
remove_user_from_group
(user_id, group_id)[source]¶Remove a user from a group.
user_id (str) – User ID.
group_id (str) – Group ID.
keystone.exception.NotFound – If the user is not in the group.
unset_default_project_id
(project_id)[source]¶Unset a user’s default project given a specific project ID.
project_id (str) – project ID
update_group
(group_id, group)[source]¶Update an existing group.
group_id (str) – Group ID.
group (dict) – Group modification. See group schema in
IdentityDriverBase
. Required properties cannot be
removed.
group, matching the group schema.
dict
keystone.exception.GroupNotFound – If the group doesn’t exist.
keystone.exception.Conflict – If a duplicate group exists.
update_user
(user_id, user)[source]¶Update an existing user.
user_id (str) – User ID.
user (dict) – User modification. See user schema in
IdentityDriverBase
. Properties set to None will be
removed. Required properties cannot be removed.
user. See user schema in IdentityDriverBase
.
keystone.exception.UserNotFound – If the user doesn’t exist.
keystone.exception.Conflict – If a duplicate user exists in the same domain.
keystone.identity.backends.ldap.core.
UserApi
(conf)[source]¶Bases: keystone.identity.backends.ldap.common.EnabledEmuMixIn
, keystone.identity.backends.ldap.common.BaseLdap
DEFAULT_ID_ATTR
= 'cn'¶DEFAULT_OBJECTCLASS
= 'inetOrgPerson'¶DEFAULT_OU
= 'ou=Users'¶DEFAULT_STRUCTURAL_CLASSES
= ['person']¶NotFound
¶alias of keystone.exception.UserNotFound
attribute_options_names
= {'default_project_id': 'default_project_id', 'description': 'description', 'email': 'mail', 'enabled': 'enabled', 'name': 'name', 'password': 'pass'}¶immutable_attrs
= ['id']¶model
¶options_name
= 'user'¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.