]> git.sur5r.net Git - openldap/blob - contrib/slapd-modules/passwd/totp/README
Happy New Year
[openldap] / contrib / slapd-modules / passwd / totp / README
1 TOTP OpenLDAP support
2 ----------------------
3
4 slapd-totp.c provides support for RFC 6238 TOTP Time-based One
5 Time Passwords in OpenLDAP using SHA-1, SHA-256, and SHA-512.
6 For instance, one could have the LDAP attribute:
7
8 userPassword: {TOTP1}GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ
9
10 which encodes the key '12345678901234567890'.
11
12
13 Building
14 --------
15
16 1) Customize the LDAP_SRC variable in Makefile to point to the OpenLDAP
17 source root.
18
19 2) Run 'make' to produce slapd-totp.so
20
21 3) Copy slapd-totp.so somewhere permanent.
22
23 4) Edit your slapd.conf (eg. /etc/ldap/slapd.conf), and add:
24
25 moduleload ...path/to/slapd-totp.so
26
27 5) This module replaces the function of the slapo-lastbind overlay. You
28 cannot use that overlay on the same database as this one.
29
30 6) Restart slapd.
31
32
33 Configuring
34 -----------
35
36 The {TOTP1}, {TOTP256}, and {TOTP512} password schemes should now be recognised.
37
38 You can also tell OpenLDAP to use one of these new schemes when processing LDAP
39 Password Modify Extended Operations, thanks to the password-hash option in
40 slapd.conf. For example:
41
42 password-hash   {TOTP1}
43
44 TOTP password schemes will only work on databases that have a rootdn and the
45 totp overlay configured:
46
47 database mdb
48 rootdn "..."
49 ...
50
51 overlay totp
52
53
54
55 Testing
56 -------
57
58 The TOTP1 algorithm is compatible with Google Authenticator.
59
60 ---
61
62 This work is part of OpenLDAP Software <http://www.openldap.org/>.
63
64 Copyright 2015-2018 The OpenLDAP Foundation.
65 Portions Copyright 2015 by Howard Chu, Symas Corp.
66 All rights reserved.
67
68 Redistribution and use in source and binary forms, with or without
69 modification, are permitted only as authorized by the OpenLDAP
70 Public License.
71
72 A copy of this license is available in the file LICENSE in the
73 top-level directory of the distribution or, alternatively, at
74 <http://www.OpenLDAP.org/license.html>.
75