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