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