michael@9: LDAP integration, 30 minute presentation michael@0: Lightweight Directory Access Protocol michael@0: Audience: Network and software engineers michael@0: michael@0: Author and speaker michael@0: ------------------ michael@0: Michael Schloh von Bennewitz, Europalab Networks michael@0: web: http://michael.schloh.com/ michael@0: email: michael@schloh.com michael@0: isdn: +49(89)44239885 michael@0: voip: sips:michael@schloh.com michael@0: michael@0: What is LDAP? michael@0: ------------- michael@0: IP technology providing fast directory read access. +-------------------+ michael@0: Part of most (if not all) Unix and Linux distros. | ISO Model LDAP | michael@0: Good integration in Blackberry, Android, and IPhone. | Transport TCP | michael@0: Standardized by the IETF in RFC 4510 and many others. +-------------------+ michael@0: michael@0: Typical use cases michael@0: ----------------- michael@0: 1) Telephone directory. michael@0: 2) Corporate address book. michael@0: 3) Employee ID card directory. michael@0: 4) Password directory. michael@0: 5) Recipe collection? michael@0: X) Utility crosses boundary of SQL technology. michael@0: michael@0: Comparing LDAP with SQL michael@0: ----------------------- michael@0: LPAP is a protocol, SQL is a language. michael@0: Tuned for reading, tuned for balanced use. michael@0: SQL provides transactions, consistency, LDAP doesn't. michael@0: michael@0: LDAP and SQL round trip comparison (UML sequence diagrams) michael@0: ---------------------------------------------------------- michael@0: LDAP client binds to a LDAP server and stores the connection. michael@0: client uses the LDAP connection to send queries to the server. michael@0: The server searches a LDAP directory for the specified attributes. michael@0: The server replies with the matched attributes along with values. michael@0: michael@0: LDAP Mainstream acceptance michael@0: -------------------------- michael@0: Most are enterprise use cases michael@0: 1) Suse makes widespred use of LDAP michael@0: 2) MS Active Directory based on LDAP michael@0: 3) Apple ease of use LDAP in Addressbook michael@0: 4) Email address autocompletion michael@0: Kontact, Evolution, Thunderbird, iMail, Outlook michael@0: 5) IP hardphones and softphones (Nokia is missing) michael@0: Snom, Polycom, Cisco, Ekiga, SFLPhone michael@0: michael@0: LDAP Popular implementations michael@0: ---------------------------- michael@0: OpenLDAP (GPLv2) michael@0: Mozilla C/Java michael@0: Alcatel-Lucent michael@0: Alot of others michael@0: michael@0: ------------------------ Technical chapter ------------------------ michael@0: michael@0: OpenLDAP Helloworld michael@0: ------------------- michael@0: int main(int argc, char *argv[]) { michael@0: ldap_initialize(&ld, "ldaps://name.host.com:636/"); michael@0: ldap_simple_bind_s(ld, "uid=username,ou=people,dc=host,dc=com", "mypasswordhere"); michael@0: ldap_search_s(ld, "dc=intern,dc=host,dc=com", LDAP_SCOPE_SUBTREE, "(sn=Chambe-Eng)", NULL, 0, &result); michael@0: dn = ldap_get_dn(ld, ldap_first_entry(ld, result)); michael@0: printf("dn: %s\n", dn); michael@0: ldap_memfree(dn); michael@0: ldap_msgfree(result); michael@0: ldap_unbind(ld); michael@0: } michael@0: michael@0: $ cc -c helloldap.c && cc helloldap.o -lldap -llber && ./a.out michael@0: dn: uid=Chambe-Eng,ou=scandinavia,ou=people,dc=intern,dc=host,dc=com michael@0: michael@0: Typical LDAP attrbutes in an addressbook michael@0: ---------------------------------------- michael@0: Dn (Distinguished name) michael@0: Cn (common name) michael@0: Uid michael@0: Givenname michael@0: Surname michael@0: Displayname michael@0: ... michael@0: michael@0: LDAP Glossary michael@0: ------------- michael@0: Directory ~= SQL database michael@0: Attribute ~= SQL column michael@0: Value ~= SQL value michael@0: Distinguished name (DN) = The fixed primary key of any directory entry michael@0: Root distinguished name (Root DN) michael@0: Schema michael@0: BER = Basic Encoding Rules (like ASN.1) michael@0: Ldap.conf (Client part) michael@0: Slapd.conf (Server part) michael@0: SLAPd (OpenLDAP Server) michael@0: michael@0: Links michael@0: ----- michael@0: This presentation michael@0: Wikipedia michael@0: IETF RFCs michael@0: OpenLDAP michael@0: michael@0: ------------------------ Nokia Qt specific ------------------------ michael@0: michael@0: Assumptions michael@0: ----------- michael@0: Class called QLdap (QSql), QLdapconnection (QSqlDatabase), ... michael@0: michael@0: Problems michael@0: -------- michael@0: In which Qt module do the LDAP classes belong? michael@0: 1) In their own module. michael@0: 2) In libQtSQL.