Skip to content

LDAPRouter

gzip_b64(string) gzip an arbitrary string, base64 encode it, and return it
deleteConfiguration(id) @type id: string
@param id: identifier of the plugin we wish to delete
deleteNode() Deletes a node from the tree.

B{NOTE}: You can not delete a root node of a tree

@type uid: string
@param uid: Unique identifier of the node we wish to delete
@rtype: DirectResponse
@return: B{Properties}:
- msg: (string) Status message
asyncGetTree(**additionalKeys, **id) Server side method for asynchronous tree calls. Retrieves
the immediate children of the node specified by "id"

NOTE: our convention on the UI side is if we are asking
for the root node then return the root and its children
otherwise just return the children

@type id: string
@param id: The uid of the node we are getting the children for
@rtype: [dictionary]
@return: Object representing the immediate children
clearCache() Will clear the cache from all of the ldap plugins as well as the
groups stored in Memcached.
addNode() Add a node to the existing tree underneath the node specified
by the context UID

@type type: string
@param type: Either 'class' or 'organizer'
@type contextUid: string
@param contextUid: Path to the node that will
be the new node's parent (ex. /zport/dmd/Devices)
@type id: string
@param id: Identifier of the new node, must be unique in the
parent context
@type description: string
@param description: (optional) Describes this new node (default: None)
@rtype: dictionary
@return: Marshaled form of the created node
objectExists(uid) @rtype: DirectResponse
@return:
- Properties:
- B{exists} - Returns true if we can find the object specified by the uid
getAvailableLDAPGroups(host, port, ssl, groupBaseDN, managerDN, managerPassword, **query, **ldapId, **extraGroupFilter) This attempts to connect to the ldap server and gather the properties available
on each user object. This is done by querying the ldap server for users and
then selecting what is available on the first found user.
@type host: string
@param host: primary ldap server location
@type port: integer
@param port: port of the primary ldap server
@type groupBaseDN: string
@param groupBaseDN: where in the ldap server we are starting our group search
@type managerDN: string
@param managerDN: The DN of the manager of the server (used to connect)
@type managerPassword: string
@param managerPassword: The password for the managerDN
addLDAPConfiguration(**mapLDAPGroupsToZenossRoles, **extraUserFilter, **defaultUserRoles, **userBaseDN, **activeDirectory, **managerPassword, **servers, **loginNameAttr, **newId, **managerDN, **groupMappings, **schemaMappings, **extraGroupFilter, **userObjClasses, **groupBaseDN)
findUsers(id, searchParameter, searchTerm) @type id: string
@param id: Identifier of the plugin
@type searchParameter: string
@param searchParameter: the schema item used as the key in the search
@type searchTerm: string
@param searchTerm: The wildcard term we are searching for
deleteSSLCertificate(filename) @type filename: string
@param filename: The name of the certificate we wish to delete
@rtype: DirectResponse
getSSLCertificates() @rtype: DirectResponse
@return: B{Properties}:
- success: (bool) Success of router request
- data: (dictionary) metadata about each certificate
setInfo() Sets the properties of an ldap configuration
All of the properties map directly to the info object except the following:
id or newId: identifies which
servers: Array of server objects
getLoginNameAttr(**query, **id) Gets the available login name attributes based on the id sent in
The id can either be ldap, active_directory or the id of the plugin.
@rtype: DirectResponse
@return: B{Properties}:
- success: (bool) Success of router request
- data: (dictionary) Name/Value store of the login name attributes
getLDAPUserSchemaKeys(host, port, ssl, userBaseDN, managerDN, managerPassword) This attempts to connect to the ldap server and gather the properties available
on each user object. This is done by querying the ldap server for users and
then selecting what is available on the first found user.
@type host: string
@param host: primary ldap server location
@type port: integer
@param port: port of the primary ldap server
@type userBaseDN: string
@param userBaseDN: where in the ldap server we are starting our user search
@type managerDN: string
@param managerDN: The DN of the manager of the server (used to connect)
@type managerPassword: string
@param managerPassword: The password for the managerDN
testLDAPConnection(hosts, **managerPassword, **managerDN) Given a list of host/ports and a user name and password, this method tries to connect to the
ldap server and displays the results.
@type hosts: List of Dictionaries
@param hosts: Each item in the array should have the following properties:
1. host - string of the host name
2. port - int of the port
3. ssl - boolean
@type managerDN: sting
@param managerDN: Distinguished name of the manager (bind) account
@type managerPassword: string
@param managerPassword: password of the manager DN
@rtype: list of strings
@return: for each host passed in this returns the result and if the connection was successful or not
moveOrganizer(targetUid, organizerUid) Move the organizer uid to be underneath the organizer
specified by the targetUid.

@type targetUid: string
@param targetUid: New parent of the organizer
@type organizerUid: string
@param organizerUid: The organizer to move
@rtype: DirectResponse
@return: B{Properties}:
- data: (dictionary) Moved organizer
gunzip_b64(string) Base 64 decode a string, then gunzip it and return the result as JSON.
The input to this method should be gzipped, base 64 encoded JSON. Base
64 encoded strings are allowed to have up to 2 '='s of padding. The zenoss
Ext router eats these, so there is some logic to try padding them back into
the string should initial decoding fail.
getLDAPConfigurations() Returns every ldap configured on this system
@return: B{Properties}:
- success: (bool) Success of node creation
- data: (dictionary) The ldap configuration (serialized as json)