findAllDomains(connection)
create()
update()
delete()
getDomain()
getAdminCN()
getAuthorizedGroupDN()
getBindUserAccount()
getDisplayName()
getDistinguishedName()
getGroupName()
getGroupsSearchBase()
getGroupsUniqueIdentifier()
getHost()
getMailName()
getMapAccessGroups()
getSearchBase()
getUniqueIdentifier()
setDomain(domainName)
setAdminCN(adminCN)
setAuthorizedGroupDN(authGroupDN)
setBindUserAccount(bindUserAccount)
setDisplayName(displayName)
setDistinguishedName(distinguishedName)
setEncryptedPassword(password)
setGroupName(groupName)
setGroupsSearchBase(groupSearchBase)
setGroupsUniqueIdentifier(groupUniqueIdentifier)
setHost(host)
setMailName(mailName)
setMapAccessGroups(mapAccessGroups)
setSearchBase(searchBase)
setUniqueIdentifier(uniqueIdentifier)
BuildForge::Services::DBO::LDAP
use BuildForge::Services;
$conn = new BuildForge::Services::Connection($hostname); $token = $conn->authUser($user, $pass); # Getting existing domains $allDomains = BuildForge::Services::DBO::LDAP->findAllDomains($conn); $olddomain = BuildForge::Services::DBO::LDAP->findByDomain($conn, 'DomainName');
# Getter / setter functions $id = $olddomain->getDomain(); $adminCN = $olddomain->getAdminCN(); $authGroupDN = $olddomain->getAuthorizedGroupDN(); $bindUserAccount = $olddomain->getBindUserAccount(); $displayName = $olddomain->getDisplayName(); $distinguishedName = $olddomain->getDistinguishedName(); $groupName = $olddomain->getGroupName(); $groupSearchBase = $olddomain->getGroupsSearchBase(); $groupUniqueIdentifier = $olddomain->getGroupsUniqueIdentifier(); $hostName = $olddomain->getHost(); $mailName = $olddomain->getMailName(); $mapAccessGroups = $olddomain->getMapAccessGroups(); $searchBase = $olddomain->getSearchBase(); $uniqueIdentifier = $olddomain->getUniqueIdentifier(); $olddomain->setDomain('New Name For Domain'); $olddomain->setAdminCN('cn=Administrator,cn=users,dc=example,dc=com'); $olddomain->setAuthorizedGroupDN(''); $olddomain->setBindUserAccount(1); $olddomain->setDisplayName('displayname'); $olddomain->setDistinguishedName('distinguishedname'); $olddomain->setEncryptedPassword($password); $olddomain->setGroupName('memberof'); $olddomain->setGroupsSearchBase(''); $olddomain->setGroupsUniqueIdentifier(''); $olddomain->setHost('ldap.example.com:389'); $olddomain->setMailName('mail'); $olddomain->setMapAccessGroups(1); $olddomain->setSearchBase(''); $olddomain->setUniqueIdentifier('sAMAccountName=%'); $olddomain->update(); # Domain creation, updating, deletion $newdomain = new BuildForge::Services::DBO::LDAP($conn); $newdomain->setDomain('New Build Domain'); $newdomain->create();
$newdomain->setDomain('Different Name'); $newdomain->update(); $newdomain->delete(); BuildForge::Services::DBO::LDAP->deleteByDomain($conn, $olddomain->getDomain()); $conn->logout; $conn->close;
LDAP allows you to create, access, and delete BuildForge LDAP domains.
Returns a new instance of an LDAP object.
A connected BuildForge::Services::Connection object.
An optional reference to a hash containing any or all of the following fields.
The name/ID for this LDAP domain.
The account to use when searching the LDAP server database for this LDAP domain.
The distinguished name of an LDAP group that should be allowed to log in to the Management Console.
This determines whether the system attempts to validate the user's credentials. When this parameter evaluates to true (the default), the system uses the credentials supplied at login to re-bind with the LDAP server and validate the credentials. Otherwise, the system assumes that the username passed in has already been validated (as in a single-signon environment) or that some external password validation mechanism has been supplied to the Management Console.
The keyname in the LDAP schema that holds the user's full name for this LDAP domain.
The keyname in the LDAP schema that holds the Distinguished Name for a user account in this LDAP domain.
The password for logging in to this LDAP domain.
The keyname in the LDAP schema that holds the list of groups the user is a member of. This group list drives the authentication permissions and access permissions.
The search string used to query LDAP records for group data.
The field in the LDAP database that should be compared against the user login to uniquely identify the user, used to filter the user's data from the group table(s).
The hostname (and, optionally, port, separated by a ':') for the LDAP server.
The keyname in the LDAP schema that holds the user's email address.
Whether or not to whether or not the system tries to map group information from the LDAP server to access groups in the Management Console to determine what groups an LDAP user should be a member of. Yes if this evaluates to true, no otherwise (the default).
Identifies the protocol Build Forge uses to read and write data from the directory service for the purpose of authenticating Build Forge users. The default is 'ldap'.
The search string used to query LDAP records for users.
The field in the LDAP database that should be compared against the user login.
findAllDomains(connection)
Returns a reference to an array of the names of all LDAP domains in the database that the user has access to.
A connected BuildForge::Services::Connection object.
Returns the BuildForge::Services::DBO::LDAP domain that has the given domain name or undef if no such LDAP domain is found.
A connected BuildForge::Services::Connection object.
The name of the given domain.
create()
Creates the LDAP domain within the database.
update()
Updates the LDAP domain record within the database.
delete()
Deletes the LDAP domain record from the database.
Deletes the LDAP domain record from the database that has the given domain name (from $ldap->getDomain()).
A connected BuildForge::Services::Connection object.
The name / ID of the LDAP domain record to be deleted.
getDomain()
Returns the name / ID of the LDAP domain.
getAdminCN()
Returns the account to use when searching the LDAP server database for this LDAP domain.
getAuthorizedGroupDN()
Returns the distinguished name of an LDAP group that should be allowed to log in to the Management Console.
getBindUserAccount()
Returns whether the system attempts to validate the user's credentials. When it returns 1, the system uses the credentials supplied at login to re-bind with the LDAP server and validate the credentials. If it returns 0, the system assumes that the username passed in has already been validated (as in a single-signon environment) or that some external password validation mechanism has been supplied to the Management Console.
getDisplayName()
Returns the keyname in the LDAP schema that holds the user's full name for this LDAP domain.
getDistinguishedName()
Returns the keyname in the LDAP schema that holds the Distinguished Name for a user account in this LDAP domain.
getGroupName()
Returns the keyname in the LDAP schema that holds the list of groups the user is a member of. This group list drives the authentication permissions and access permissions.
getGroupsSearchBase()
Returns the search string used to query LDAP records for group data.
getGroupsUniqueIdentifier()
Returns the field in the LDAP database that should be compared against the user login to uniquely identify the user, used to filter the user's data from the group table(s).
getHost()
Returns the hostname (and, optionally, port, separated by a ':') for the LDAP server.
getMailName()
Returns the keyname in the LDAP schema that holds the user's email address.
getMapAccessGroups()
Returns whether or not to whether or not the system tries to map group information from the LDAP server to access groups in the Management Console to determine what groups an LDAP user should be a member of. Yes if this returns 1, no if it returns 0.
getSearchBase()
Returns the search string used to query LDAP records for users.
getUniqueIdentifier()
Returns the field in the LDAP database that should be compared against the user login.
setDomain(domainName)
Sets the name / ID of the LDAP domain. $ldap->update()
must be run
before changes are replicated in the database.
The new name.
setAdminCN(adminCN)
Sets the account to use when searching the LDAP server database for this LDAP domain.
$ldap->update()
must be run before changes are replicated in the database.
The new administration account login.
setAuthorizedGroupDN(authGroupDN)
Sets the distinguished name of an LDAP group that should be allowed to log
in to the Management Console. $ldap->update()
must be run
before changes are replicated in the database.
The new authorized group DN.
setBindUserAccount(bindUserAccount)
Sets whether the system attempts to validate the user's credentials. $ldap->update()
must be run
before changes are replicated in the database.
If this evaluates to true, the system uses the credentials supplied at login to re-bind with the LDAP server and validate the credentials. If it evaluates to false, the system assumes that the username passed in has already been validated (as in a single-signon environment) or that some external password validation mechanism has been supplied to the Management Console.
setDisplayName(displayName)
Sets the keyname in the LDAP schema that holds the user's full name for this LDAP domain.
$ldap->update()
must be run before changes are replicated in the database.
The new display name.
setDistinguishedName(distinguishedName)
Sets the keyname in the LDAP schema that holds the Distinguished Name for a
user account in this LDAP domain. $ldap->update()
must be run
before changes are replicated in the database.
The new distinguished name.
setEncryptedPassword(password)
Sets the administration password used to log in to the LDAP server. $ldap->update()
must be run
before changes are replicated in the database.
The new password.
setGroupName(groupName)
Sets the keyname in the LDAP schema that holds the list of groups the user is a
member of. This group list drives the authentication permissions and access
permissions. $ldap->update()
must be run
before changes are replicated in the database.
The new group name.
setGroupsSearchBase(groupSearchBase)
Sets the search string used to query LDAP records for group data. $ldap->update()
must be run
before changes are replicated in the database.
The new group search string.
setGroupsUniqueIdentifier(groupUniqueIdentifier)
Sets the field in the LDAP database that should be compared against the user
login to uniquely identify the user, used to filter the user's data from the
group table(s). $ldap->update()
must be run
before changes are replicated in the database.
The new group unique identifier.
setHost(host)
Sets the hostname for the LDAP server. $ldap->update()
must be run
before changes are replicated in the database.
The hostname of the LDAP server with an optional port separated by ':'.
setMailName(mailName)
Sets the keyname in the LDAP schema that holds the user's email address. $ldap->update()
must be run
before changes are replicated in the database.
The new keyname.
setMapAccessGroups(mapAccessGroups)
Sets whether or not to whether or not the system tries to map group information
from the LDAP server to access groups in the Management Console to determine
what groups an LDAP user should be a member of. $ldap->update()
must be run
before changes are replicated in the database.
If this evaluates to true, it does map group information, and not if this evaluates to false.
setSearchBase(searchBase)
Sets the search string used to query LDAP records for users. $ldap->update()
must be run
before changes are replicated in the database.
The new search string.
setUniqueIdentifier(uniqueIdentifier)
Sets the field in the LDAP database that should be compared against the user login.
$ldap->update()
must be run before changes are replicated in the database.
The new field name.
Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.