Thu, 28 Feb 2013 21:46:37 +0100
Introduce production changes, mention online lecture URL, and
integrate quick meme according to suggestion from Mike ELIAS.
michael@9 | 1 | LDAP integration, 30 minute presentation |
michael@0 | 2 | Lightweight Directory Access Protocol |
michael@0 | 3 | Audience: Network and software engineers |
michael@0 | 4 | |
michael@0 | 5 | Author and speaker |
michael@0 | 6 | ------------------ |
michael@0 | 7 | Michael Schloh von Bennewitz, Europalab Networks |
michael@0 | 8 | web: http://michael.schloh.com/ |
michael@0 | 9 | email: michael@schloh.com |
michael@0 | 10 | isdn: +49(89)44239885 |
michael@0 | 11 | voip: sips:michael@schloh.com |
michael@0 | 12 | |
michael@0 | 13 | What is LDAP? |
michael@0 | 14 | ------------- |
michael@0 | 15 | IP technology providing fast directory read access. +-------------------+ |
michael@0 | 16 | Part of most (if not all) Unix and Linux distros. | ISO Model LDAP | |
michael@0 | 17 | Good integration in Blackberry, Android, and IPhone. | Transport TCP | |
michael@0 | 18 | Standardized by the IETF in RFC 4510 and many others. +-------------------+ |
michael@0 | 19 | |
michael@0 | 20 | Typical use cases |
michael@0 | 21 | ----------------- |
michael@0 | 22 | 1) Telephone directory. |
michael@0 | 23 | 2) Corporate address book. |
michael@0 | 24 | 3) Employee ID card directory. |
michael@0 | 25 | 4) Password directory. |
michael@0 | 26 | 5) Recipe collection? |
michael@0 | 27 | X) Utility crosses boundary of SQL technology. |
michael@0 | 28 | |
michael@0 | 29 | Comparing LDAP with SQL |
michael@0 | 30 | ----------------------- |
michael@0 | 31 | LPAP is a protocol, SQL is a language. |
michael@0 | 32 | Tuned for reading, tuned for balanced use. |
michael@0 | 33 | SQL provides transactions, consistency, LDAP doesn't. |
michael@0 | 34 | |
michael@0 | 35 | LDAP and SQL round trip comparison (UML sequence diagrams) |
michael@0 | 36 | ---------------------------------------------------------- |
michael@0 | 37 | LDAP client binds to a LDAP server and stores the connection. |
michael@0 | 38 | client uses the LDAP connection to send queries to the server. |
michael@0 | 39 | The server searches a LDAP directory for the specified attributes. |
michael@0 | 40 | The server replies with the matched attributes along with values. |
michael@0 | 41 | |
michael@0 | 42 | LDAP Mainstream acceptance |
michael@0 | 43 | -------------------------- |
michael@0 | 44 | Most are enterprise use cases |
michael@0 | 45 | 1) Suse makes widespred use of LDAP |
michael@0 | 46 | 2) MS Active Directory based on LDAP |
michael@0 | 47 | 3) Apple ease of use LDAP in Addressbook |
michael@0 | 48 | 4) Email address autocompletion |
michael@0 | 49 | Kontact, Evolution, Thunderbird, iMail, Outlook |
michael@0 | 50 | 5) IP hardphones and softphones (Nokia is missing) |
michael@0 | 51 | Snom, Polycom, Cisco, Ekiga, SFLPhone |
michael@0 | 52 | |
michael@0 | 53 | LDAP Popular implementations |
michael@0 | 54 | ---------------------------- |
michael@0 | 55 | OpenLDAP (GPLv2) |
michael@0 | 56 | Mozilla C/Java |
michael@0 | 57 | Alcatel-Lucent |
michael@0 | 58 | Alot of others |
michael@0 | 59 | |
michael@0 | 60 | ------------------------ Technical chapter ------------------------ |
michael@0 | 61 | |
michael@0 | 62 | OpenLDAP Helloworld |
michael@0 | 63 | ------------------- |
michael@0 | 64 | int main(int argc, char *argv[]) { |
michael@0 | 65 | ldap_initialize(&ld, "ldaps://name.host.com:636/"); |
michael@0 | 66 | ldap_simple_bind_s(ld, "uid=username,ou=people,dc=host,dc=com", "mypasswordhere"); |
michael@0 | 67 | ldap_search_s(ld, "dc=intern,dc=host,dc=com", LDAP_SCOPE_SUBTREE, "(sn=Chambe-Eng)", NULL, 0, &result); |
michael@0 | 68 | dn = ldap_get_dn(ld, ldap_first_entry(ld, result)); |
michael@0 | 69 | printf("dn: %s\n", dn); |
michael@0 | 70 | ldap_memfree(dn); |
michael@0 | 71 | ldap_msgfree(result); |
michael@0 | 72 | ldap_unbind(ld); |
michael@0 | 73 | } |
michael@0 | 74 | |
michael@0 | 75 | $ cc -c helloldap.c && cc helloldap.o -lldap -llber && ./a.out |
michael@0 | 76 | dn: uid=Chambe-Eng,ou=scandinavia,ou=people,dc=intern,dc=host,dc=com |
michael@0 | 77 | |
michael@0 | 78 | Typical LDAP attrbutes in an addressbook |
michael@0 | 79 | ---------------------------------------- |
michael@0 | 80 | Dn (Distinguished name) |
michael@0 | 81 | Cn (common name) |
michael@0 | 82 | Uid |
michael@0 | 83 | Givenname |
michael@0 | 84 | Surname |
michael@0 | 85 | Displayname |
michael@0 | 86 | ... |
michael@0 | 87 | |
michael@0 | 88 | LDAP Glossary |
michael@0 | 89 | ------------- |
michael@0 | 90 | Directory ~= SQL database |
michael@0 | 91 | Attribute ~= SQL column |
michael@0 | 92 | Value ~= SQL value |
michael@0 | 93 | Distinguished name (DN) = The fixed primary key of any directory entry |
michael@0 | 94 | Root distinguished name (Root DN) |
michael@0 | 95 | Schema |
michael@0 | 96 | BER = Basic Encoding Rules (like ASN.1) |
michael@0 | 97 | Ldap.conf (Client part) |
michael@0 | 98 | Slapd.conf (Server part) |
michael@0 | 99 | SLAPd (OpenLDAP Server) |
michael@0 | 100 | |
michael@0 | 101 | Links |
michael@0 | 102 | ----- |
michael@0 | 103 | This presentation |
michael@0 | 104 | Wikipedia |
michael@0 | 105 | IETF RFCs |
michael@0 | 106 | OpenLDAP |
michael@0 | 107 | |
michael@0 | 108 | ------------------------ Nokia Qt specific ------------------------ |
michael@0 | 109 | |
michael@0 | 110 | Assumptions |
michael@0 | 111 | ----------- |
michael@0 | 112 | Class called QLdap (QSql), QLdapconnection (QSqlDatabase), ... |
michael@0 | 113 | |
michael@0 | 114 | Problems |
michael@0 | 115 | -------- |
michael@0 | 116 | In which Qt<Libname> module do the LDAP classes belong? |
michael@0 | 117 | 1) In their own module. |
michael@0 | 118 | 2) In libQtSQL. |