The synaps.auth.ldapdriver Module

Auth driver for ldap. Includes FakeLdapDriver.

It should be easy to create a replacement for this driver supporting other backends by creating another class that exposes the same public methods.

class FakeLdapDriver

Bases: synaps.auth.ldapdriver.LdapDriver

Fake Ldap Auth driver

class LDAPWrapper(ldap, url, user, password)

Bases: object

add_s(*args, **kwargs)
connect()
delete_s(*args, **kwargs)
modify_s(*args, **kwargs)
search_s(*args, **kwargs)
class LdapDriver

Bases: object

Ldap Auth driver

Defines enter and exit and therefore supports the with/as syntax.

add_role(*args, **kwargs)

Add role for user (or user and project)

add_to_project(*args, **kwargs)

Add user to project

conn = None
create_project(*args, **kwargs)

Create a project

create_user(*args, **kwargs)

Create a user

delete_project(*args, **kwargs)

Delete a project

delete_user(*args, **kwargs)

Delete a user

get_project(*args, **kwargs)

Retrieve project by id

get_projects(*args, **kwargs)

Retrieve list of projects

get_user(*args, **kwargs)

Retrieve user by id

get_user_from_access_key(*args, **kwargs)

Retrieve user by access key

get_user_roles(*args, **kwargs)

Retrieve list of roles for user (or user and project)

get_users(*args, **kwargs)

Retrieve list of users

has_role(*args, **kwargs)

Check if user has role

If project is specified, it checks for local role, otherwise it checks for global role

is_in_project(*args, **kwargs)

Check if user is in project

isadmin_attribute = 'isSynapsAdmin'
mc = None
modify_project(*args, **kwargs)

Modify an existing project

modify_user(*args, **kwargs)

Modify an existing user

project_attribute = 'owner'
project_objectclass = 'groupOfNames'
project_pattern = '(owner=*)'
remove_from_project(*args, **kwargs)

Remove user from project

remove_role(*args, **kwargs)

Remove role for user (or user and project)

sanitize(fn)

Decorator to sanitize all args

Previous topic

The synaps.auth.fakeldap Module

Next topic

The synaps.auth.manager Module

This Page