Sat, 09 Jul 2011 18:00:08 +0200
Import initial draft of concepts for the LDAP integration lecture.
ldapint/whatisldap.txt | file | annotate | diff | comparison | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ldapint/whatisldap.txt Sat Jul 09 18:00:08 2011 +0200 1.3 @@ -0,0 +1,118 @@ 1.4 +LDAP integration, 15 minute presentation 1.5 +Lightweight Directory Access Protocol 1.6 +Audience: Network and software engineers 1.7 + 1.8 +Author and speaker 1.9 +------------------ 1.10 +Michael Schloh von Bennewitz, Europalab Networks 1.11 +web: http://michael.schloh.com/ 1.12 +email: michael@schloh.com 1.13 +isdn: +49(89)44239885 1.14 +voip: sips:michael@schloh.com 1.15 + 1.16 +What is LDAP? 1.17 +------------- 1.18 +IP technology providing fast directory read access. +-------------------+ 1.19 +Part of most (if not all) Unix and Linux distros. | ISO Model LDAP | 1.20 +Good integration in Blackberry, Android, and IPhone. | Transport TCP | 1.21 +Standardized by the IETF in RFC 4510 and many others. +-------------------+ 1.22 + 1.23 +Typical use cases 1.24 +----------------- 1.25 +1) Telephone directory. 1.26 +2) Corporate address book. 1.27 +3) Employee ID card directory. 1.28 +4) Password directory. 1.29 +5) Recipe collection? 1.30 +X) Utility crosses boundary of SQL technology. 1.31 + 1.32 +Comparing LDAP with SQL 1.33 +----------------------- 1.34 +LPAP is a protocol, SQL is a language. 1.35 +Tuned for reading, tuned for balanced use. 1.36 +SQL provides transactions, consistency, LDAP doesn't. 1.37 + 1.38 +LDAP and SQL round trip comparison (UML sequence diagrams) 1.39 +---------------------------------------------------------- 1.40 +LDAP client binds to a LDAP server and stores the connection. 1.41 +client uses the LDAP connection to send queries to the server. 1.42 +The server searches a LDAP directory for the specified attributes. 1.43 +The server replies with the matched attributes along with values. 1.44 + 1.45 +LDAP Mainstream acceptance 1.46 +-------------------------- 1.47 +Most are enterprise use cases 1.48 +1) Suse makes widespred use of LDAP 1.49 +2) MS Active Directory based on LDAP 1.50 +3) Apple ease of use LDAP in Addressbook 1.51 +4) Email address autocompletion 1.52 + Kontact, Evolution, Thunderbird, iMail, Outlook 1.53 +5) IP hardphones and softphones (Nokia is missing) 1.54 + Snom, Polycom, Cisco, Ekiga, SFLPhone 1.55 + 1.56 +LDAP Popular implementations 1.57 +---------------------------- 1.58 +OpenLDAP (GPLv2) 1.59 +Mozilla C/Java 1.60 +Alcatel-Lucent 1.61 +Alot of others 1.62 + 1.63 +------------------------ Technical chapter ------------------------ 1.64 + 1.65 +OpenLDAP Helloworld 1.66 +------------------- 1.67 +int main(int argc, char *argv[]) { 1.68 + ldap_initialize(&ld, "ldaps://name.host.com:636/"); 1.69 + ldap_simple_bind_s(ld, "uid=username,ou=people,dc=host,dc=com", "mypasswordhere"); 1.70 + ldap_search_s(ld, "dc=intern,dc=host,dc=com", LDAP_SCOPE_SUBTREE, "(sn=Chambe-Eng)", NULL, 0, &result); 1.71 + dn = ldap_get_dn(ld, ldap_first_entry(ld, result)); 1.72 + printf("dn: %s\n", dn); 1.73 + ldap_memfree(dn); 1.74 + ldap_msgfree(result); 1.75 + ldap_unbind(ld); 1.76 +} 1.77 + 1.78 +$ cc -c helloldap.c && cc helloldap.o -lldap -llber && ./a.out 1.79 +dn: uid=Chambe-Eng,ou=scandinavia,ou=people,dc=intern,dc=host,dc=com 1.80 + 1.81 +Typical LDAP attrbutes in an addressbook 1.82 +---------------------------------------- 1.83 + Dn (Distinguished name) 1.84 + Cn (common name) 1.85 + Uid 1.86 + Givenname 1.87 + Surname 1.88 + Displayname 1.89 + ... 1.90 + 1.91 +LDAP Glossary 1.92 +------------- 1.93 +Directory ~= SQL database 1.94 +Attribute ~= SQL column 1.95 +Value ~= SQL value 1.96 +Distinguished name (DN) = The fixed primary key of any directory entry 1.97 +Root distinguished name (Root DN) 1.98 +Schema 1.99 +BER = Basic Encoding Rules (like ASN.1) 1.100 +Ldap.conf (Client part) 1.101 +Slapd.conf (Server part) 1.102 +SLAPd (OpenLDAP Server) 1.103 + 1.104 +Links 1.105 +----- 1.106 +This presentation 1.107 +Wikipedia 1.108 +IETF RFCs 1.109 +OpenLDAP 1.110 + 1.111 +------------------------ Nokia Qt specific ------------------------ 1.112 + 1.113 +Assumptions 1.114 +----------- 1.115 +Class called QLdap (QSql), QLdapconnection (QSqlDatabase), ... 1.116 + 1.117 +Problems 1.118 +-------- 1.119 +In which Qt<Libname> module do the LDAP classes belong? 1.120 + 1) In their own module. 1.121 + 2) In libQtSQL.