IPWorks 2020 JavaScript Edition

Questions / Feedback?

LDAP Class

Properties   Methods   Events   Configuration Settings   Errors  

The LDAP Class is used to search, manage, and maintain Internet Directory (LDAP) servers.

Syntax

ipworks.ldap()

Remarks

The LDAP Class supports both plaintext and SSL/TLS connections. When connecting over SSL/TLS the SSLServerAuthentication event allows you to check the server identity and other security attributes. The SSLStatus event provides information about the SSL handshake. Additional SSL related settings are also supported via the Config method.

The LDAP Class implements a standard LDAP client as specified in RFC 1777, 2251, and other LDAP RFCs. Support for both LDAP v2 and v3 is provided.

The first step in using the class is specifying the ServerName, a DN (Distinguished Name) to bind as, and optionally a Password. Then you can call one or more of the class methods to act upon the server. Server responses are normally received through the Result event. The only exceptions are search requests which result in one or more SearchResult events, followed by a final SearchComplete event.

Attributes are set and returned through the Attributes properties. Other command arguments are specified through other properties. These are specified in detail in each method.

Search filters are to be specified as string arguments to the Search method. The format must be a standard LDAP search string as specified in RFC 1558. Other search attributes are set in properties such as SearchScope, SearchTimeLimit, SearchSizeLimit, SearchReturnValues, and SearchDerefAliases.

The class operates synchronously by default (waits for a response before returning control to the caller), however, the class may also operate asynchronously (return control immediately), by setting Timeout to 0. Please refer to the Timeout property for more information.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

AcceptDataEnables or disables data reception from the server.
AttributesAttributes for the current entry.
AuthMechanismThe authentication mechanism to be used when connecting to the LDAP server.
ConnectedShows whether the class is connected.
DeleteOldRDNControls whether the old RDN (Relative Distinguished Name) should be deleted.
DNThe Distinguished Name used as the base for LDAP operations.
FirewallA set of properties related to firewall access.
IdleThe current status of the class.
LDAPVersionThe version of LDAP used.
LocalHostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
MessageIdThe message identifier for the next LDAP request.
PageSizeThe maximum number of results per page for the Search method.
PasswordThe password used to authenticate to the LDAP server.
ReferencesCollection of references returned from the server.
ResultCodeThe result code returned in the last server response.
ResultDescriptionThe descriptive text returned in the last server response (if any).
ResultDNThe Distinguished Name returned in the last server response (if any).
SearchDerefAliasesControls alias dereferencing during searching.
SearchReturnValuesControls whether the search operation returns values of attributes, or only types.
SearchScopeControls the scope of LDAP search operations.
SearchSizeLimitMaximum number of entries that can be returned by the next search operation.
SearchTimeLimitA time limit for the next search operation (in seconds).
ServerNameThe name or address of the LDAP server.
ServerPortThe server port for the LDAP connection (default is 389).
SortAttributesA string of attribute names to sort on with optional relative matching rules.
SSLAcceptServerCertInstructs the class to unconditionally accept the server certificate that matches the supplied certificate.
SSLCertThe certificate to be used during SSL negotiation.
SSLEnabledWhether TLS/SSL is enabled.
SSLServerCertThe server certificate for the last established connection.
SSLStartModeDetermines how the class starts the SSL negotiation.
TimeoutA timeout for the class.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

AbandonAsks the server to abandon a request.
AddAdds an entry specified by DN to the directory server using the type and value attributes defined in the Attributes properties.
AttrReturns the value of the specified LDAP attribute.
BindConnects and binds to the directory server.
ChangePasswordChanges the password for the specified user.
CompareCompares attributes and values with those of the entry specified by DN .
ConfigSets or retrieves a configuration setting.
DeleteDeletes an entry specified by DN from the directory server.
DoEventsProcesses events from the internal message queue.
ExtendedRequestPerforms an LDAP V3 Extended Operation.
InterruptInterrupt the current method.
ListComputersLists all computers in the directory.
ListGroupMembersList all members of a group.
ListGroupsList all groups in the directory.
ListUserGroupsLists all groups a user is a part of.
ModifyPerforms an LDAP 'modify' operation on the entry specified by DN .
ModifyRDNPerforms an LDAP 'modify RDN' operation an entry specified by DN .
MoveToDNPerforms an LDAP 'modify' operation on the entry specified by DN by changing its superior.
ResetReset the class.
SearchSearches the directory server using the base object specified in DN and the search filter SearchFilter .
UnbindUnbinds from the directory server.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

ComputerListFired for each computer entry returned.
ConnectedFired immediately after a connection completes (or fails).
ConnectionStatusFired to indicate changes in connection state.
DisconnectedFired when a connection is closed.
ErrorInformation about errors during data delivery.
ExtendedResponseFired for LDAP V3 Extended Responses.
GroupListFired for each group entry returned.
PITrailProvides detailed information about the interaction with the server.
ResultFired for every server response, except search responses.
SearchCompleteFired upon completion of a search operation.
SearchPageFired for every page returned from a search operation.
SearchResultFired for every entry returned from a search operation.
SearchResultReferenceFired for every result reference returned from a search operation.
SSLServerAuthenticationFired after the server presents its certificate to the client.
SSLStatusShows the progress of the secure connection.
UserListFired once for each user entry returned.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

DomainControllerReturns the name of the domain controller.
FriendlyGUIDWhether to return GUID attribute values in a human readable format.
FriendlySIDWhether to return SID attribute values in a human readable format.
RequestControlsControls to include in the request.
ResponseControlsControls present in the response.
SingleResultModeDetermines how ResultDN behaves.
UseDefaultDCWhether to connect to the default Domain Controller when calling Bind.
ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the class whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the class binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
ProxyExceptionsListA semicolon separated list of hosts and IPs to bypass when using a proxy.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
TcpNoDelayWhether or not to delay when sending packets.
UseIPv6Whether to use IPv6.
LogSSLPacketsControls whether SSL packets are logged when using the internal security API.
OpenSSLCADirThe path to a directory containing CA certificates.
OpenSSLCAFileName of the file containing the list of CA's trusted by your application.
OpenSSLCipherListA string that controls the ciphers to be used by SSL.
OpenSSLPrngSeedDataThe data to seed the pseudo random number generator (PRNG).
ReuseSSLSessionDetermines if the SSL session is reused.
SSLAcceptAnyServerCertWhether to trust any certificate presented by the server.
SSLCACertsA newline separated list of CA certificate to use during SSL client authentication.
SSLCipherStrengthThe minimum cipher strength used for bulk encryption.
SSLEnabledCipherSuitesThe cipher suite to be used in an SSL negotiation.
SSLEnabledProtocolsUsed to enable/disable the supported security protocols.
SSLEnableRenegotiationWhether the renegotiation_info SSL extension is supported.
SSLIncludeCertChainWhether the entire certificate chain is included in the SSLServerAuthentication event.
SSLNegotiatedCipherReturns the negotiated ciphersuite.
SSLNegotiatedCipherStrengthReturns the negotiated ciphersuite strength.
SSLNegotiatedCipherSuiteReturns the negotiated ciphersuite.
SSLNegotiatedKeyExchangeReturns the negotiated key exchange algorithm.
SSLNegotiatedKeyExchangeStrengthReturns the negotiated key exchange algorithm strength.
SSLNegotiatedVersionReturns the negotiated protocol version.
SSLProviderThe name of the security provider to use.
SSLSecurityFlagsFlags that control certificate verification.
SSLServerCACertsA newline separated list of CA certificate to use during SSL server certificate validation.
TLS12SignatureAlgorithmsDefines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True.
TLS12SupportedGroupsThe supported groups for ECC.
TLS13KeyShareGroupsThe groups for which to pregenerate key shares.
TLS13SignatureAlgorithmsThe allowed certificate signature algorithms.
TLS13SupportedGroupsThe supported groups for (EC)DHE key exchange.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 JavaScript Edition - Version 20.0 [Build 8292]