Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
James Lowden
OpenLDAP
Commits
0ad73f87
Commit
0ad73f87
authored
Mar 31, 2021
by
Quanah Gibson-Mount
Browse files
ITS#9437 - Fix slapo-otp overlay name
parent
fcc1410f
Changes
10
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
0ad73f87
...
@@ -2880,10 +2880,10 @@ if test "$ol_enable_otp" != no ; then
...
@@ -2880,10 +2880,10 @@ if test "$ol_enable_otp" != no ; then
BUILD_OTP=$ol_enable_otp
BUILD_OTP=$ol_enable_otp
if test "$ol_enable_otp" = mod ; then
if test "$ol_enable_otp" = mod ; then
MFLAG=SLAPD_MOD_DYNAMIC
MFLAG=SLAPD_MOD_DYNAMIC
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS otp
_2fa
.la"
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS otp.la"
else
else
MFLAG=SLAPD_MOD_STATIC
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS otp
_2fa
.o"
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS otp.o"
fi
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_OTP,$MFLAG,[define for OTP 2-factor Authentication overlay])
AC_DEFINE_UNQUOTED(SLAPD_OVER_OTP,$MFLAG,[define for OTP 2-factor Authentication overlay])
fi
fi
...
...
doc/man/man5/slapd.overlays.5
View file @
0ad73f87
...
@@ -85,11 +85,11 @@ This overlay maintains automatic reverse group membership values,
...
@@ -85,11 +85,11 @@ This overlay maintains automatic reverse group membership values,
typically stored in an attribute called memberOf. This overlay
typically stored in an attribute called memberOf. This overlay
is deprecated and should be replaced with dynlist.
is deprecated and should be replaced with dynlist.
.TP
.TP
.B otp
_2fa
.B otp
Two factor authentication
module.
OATH One-Time Password
module.
This module allows time-based one-time password, AKA "authenticator-style",
This module allows time-based one-time password, AKA "authenticator-style",
and HMAC-based one-time password authentication to be used in
applica
tion
s
and HMAC-based one-time password authentication to be used in
conjunc
tion
that use LDAP f
or authentication.
with a standard LDAP password for two fact
or authentication.
.TP
.TP
.B pbind
.B pbind
Proxybind.
Proxybind.
...
...
doc/man/man5/slapo-otp
_2fa
.5
→
doc/man/man5/slapo-otp.5
View file @
0ad73f87
.TH
PW-T
OTP 5 "2018/6/29" "SLAPO-OTP
_2FA
"
.TH
SLAPO_
OTP 5 "2018/6/29" "SLAPO-OTP"
.\" Copyright 2015-2021 The OpenLDAP Foundation.
.\" Copyright 2015-2021 The OpenLDAP Foundation.
.\" Portions Copyright 2015 by Howard Chu, Symas Corp. All rights reserved.
.\" Portions Copyright 2015 by Howard Chu, Symas Corp. All rights reserved.
.\" Portions Copyright 2018 by Ondřej Kuzník, Symas Corp. All rights reserved.
.\" Portions Copyright 2018 by Ondřej Kuzník, Symas Corp. All rights reserved.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.SH NAME
.SH NAME
slapo-otp
_2fa \- Two factor authentication
module
slapo-otp
\- OATH One-Time Password
module
.SH SYNOPSIS
.SH SYNOPSIS
.B moduleload
.B moduleload
.I otp
_2fa
.la
.I otp.la
.SH DESCRIPTION
.SH DESCRIPTION
The
The
.B otp
_2fa
.B otp
module allows time-based one-time password, AKA "authenticator-style", and
module allows time-based one-time password, AKA "authenticator-style", and
HMAC-based one-time password authentication to be used in applications that use
HMAC-based one-time password authentication to be used in conjunction with
LDAP for authentication. In most cases no changes to the applications are
a standard LDAP password for two-factor authentication.
needed to switch to this type of authentication.
With this module, users would use their password, followed with the one-time
With this module, users would use their password, followed with the one-time
password in the password prompt to authenticate.
password in the password prompt to authenticate.
...
...
servers/slapd/overlays/Makefile.in
View file @
0ad73f87
...
@@ -24,7 +24,7 @@ SRCS = overlays.c \
...
@@ -24,7 +24,7 @@ SRCS = overlays.c \
dynlist.c
\
dynlist.c
\
homedir.c
\
homedir.c
\
memberof.c
\
memberof.c
\
otp
_2fa
.c
\
otp.c
\
pcache.c
\
pcache.c
\
collect.c
\
collect.c
\
ppolicy.c
\
ppolicy.c
\
...
@@ -96,8 +96,8 @@ homedir.la : homedir.lo
...
@@ -96,8 +96,8 @@ homedir.la : homedir.lo
memberof.la
:
memberof.lo
memberof.la
:
memberof.lo
$(LTLINK_MOD)
-module
-o
$@
memberof.lo version.lo
$(LINK_LIBS)
$(LTLINK_MOD)
-module
-o
$@
memberof.lo version.lo
$(LINK_LIBS)
otp
_2fa
.la
:
otp
_2fa
.lo
otp.la
:
otp.lo
$(LTLINK_MOD)
-module
-o
$@
otp
_2fa
.lo version.lo
$(LINK_LIBS)
$(LTLINK_MOD)
-module
-o
$@
otp.lo version.lo
$(LINK_LIBS)
pcache.la
:
pcache.lo
pcache.la
:
pcache.lo
$(LTLINK_MOD)
-module
-o
$@
pcache.lo version.lo
$(LINK_LIBS)
$(LTLINK_MOD)
-module
-o
$@
pcache.lo version.lo
$(LINK_LIBS)
...
...
servers/slapd/overlays/otp
_2fa
.c
→
servers/slapd/overlays/otp.c
View file @
0ad73f87
/* otp
_2fa
.c - OATH 2-factor authentication module */
/* otp.c - OATH 2-factor authentication module */
/* $OpenLDAP$ */
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
*
...
@@ -927,11 +927,11 @@ otp_initialize( void )
...
@@ -927,11 +927,11 @@ otp_initialize( void )
char
*
argv
[
4
];
char
*
argv
[
4
];
int
i
;
int
i
;
otp
.
on_bi
.
bi_type
=
"otp
_2fa
"
;
otp
.
on_bi
.
bi_type
=
"otp"
;
otp
.
on_bi
.
bi_op_bind
=
otp_op_bind
;
otp
.
on_bi
.
bi_op_bind
=
otp_op_bind
;
ca
.
argv
=
argv
;
ca
.
argv
=
argv
;
argv
[
0
]
=
"otp
_2fa
"
;
argv
[
0
]
=
"otp"
;
ca
.
argv
=
argv
;
ca
.
argv
=
argv
;
ca
.
argc
=
3
;
ca
.
argc
=
3
;
ca
.
fname
=
argv
[
0
];
ca
.
fname
=
argv
[
0
];
...
...
tests/data/otp
_2fa
/hotp.ldif
→
tests/data/otp/hotp.ldif
View file @
0ad73f87
File moved
tests/data/otp
_2fa
/test001-out.ldif
→
tests/data/otp/test001-out.ldif
View file @
0ad73f87
File moved
tests/data/otp
_2fa
/totp.ldif
→
tests/data/otp/totp.ldif
View file @
0ad73f87
File moved
tests/scripts/test080-hotp
View file @
0ad73f87
...
@@ -22,7 +22,7 @@ if test $OTP = otpno; then
...
@@ -22,7 +22,7 @@ if test $OTP = otpno; then
exit
0
exit
0
fi
fi
OTP_DATA
=
$DATADIR
/otp
_2fa
/hotp.ldif
OTP_DATA
=
$DATADIR
/otp/hotp.ldif
# OTPs for this token
# OTPs for this token
TOKEN_0
=
818800
TOKEN_0
=
818800
...
@@ -88,7 +88,7 @@ dn: cn=module,cn=config
...
@@ -88,7 +88,7 @@ dn: cn=module,cn=config
objectClass: olcModuleList
objectClass: olcModuleList
cn: module
cn: module
olcModulePath:
$TESTWD
/../servers/slapd/overlays
olcModulePath:
$TESTWD
/../servers/slapd/overlays
olcModuleLoad: otp
_2fa
.la
olcModuleLoad: otp.la
EOMOD
EOMOD
RC
=
$?
RC
=
$?
if
test
$RC
!=
0
;
then
if
test
$RC
!=
0
;
then
...
@@ -98,10 +98,10 @@ if test $RC != 0 ; then
...
@@ -98,10 +98,10 @@ if test $RC != 0 ; then
fi
fi
fi
fi
echo
"Loading test otp
_2fa
configuration..."
echo
"Loading test otp configuration..."
$LDAPMODIFY
-v
-D
cn
=
config
-H
$URI1
-y
$CONFIGPWF
\
$LDAPMODIFY
-v
-D
cn
=
config
-H
$URI1
-y
$CONFIGPWF
\
>>
$TESTOUT
2>&1
<<
EOMOD
>>
$TESTOUT
2>&1
<<
EOMOD
dn: olcOverlay={0}otp
_2fa
,olcDatabase={1}
$BACKEND
,cn=config
dn: olcOverlay={0}otp,olcDatabase={1}
$BACKEND
,cn=config
changetype: add
changetype: add
objectClass: olcOverlayConfig
objectClass: olcOverlayConfig
EOMOD
EOMOD
...
@@ -274,7 +274,7 @@ fi
...
@@ -274,7 +274,7 @@ fi
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
LDIF
=
$DATADIR
/otp
_2fa
/test001-out.ldif
LDIF
=
$DATADIR
/otp/test001-out.ldif
echo
"Filtering ldapsearch results..."
echo
"Filtering ldapsearch results..."
$LDIFFILTER
<
$SEARCHOUT
>
$SEARCHFLT
$LDIFFILTER
<
$SEARCHOUT
>
$SEARCHFLT
...
...
tests/scripts/test081-totp
View file @
0ad73f87
...
@@ -44,7 +44,7 @@ done
...
@@ -44,7 +44,7 @@ done
export
URI1 MANAGERDN PASSWD BABSDN BJORNSDN
export
URI1 MANAGERDN PASSWD BABSDN BJORNSDN
OTP_DATA
=
$DATADIR
/otp
_2fa
/totp.ldif
OTP_DATA
=
$DATADIR
/otp/totp.ldif
mkdir
-p
$TESTDIR
$DBDIR1
mkdir
-p
$TESTDIR
$DBDIR1
...
@@ -93,7 +93,7 @@ dn: cn=module,cn=config
...
@@ -93,7 +93,7 @@ dn: cn=module,cn=config
objectClass: olcModuleList
objectClass: olcModuleList
cn: module
cn: module
olcModulePath:
$TESTWD
/../servers/slapd/overlays
olcModulePath:
$TESTWD
/../servers/slapd/overlays
olcModuleLoad: otp
_2fa
.la
olcModuleLoad: otp.la
EOMOD
EOMOD
RC
=
$?
RC
=
$?
if
test
$RC
!=
0
;
then
if
test
$RC
!=
0
;
then
...
@@ -103,10 +103,10 @@ if test $RC != 0 ; then
...
@@ -103,10 +103,10 @@ if test $RC != 0 ; then
fi
fi
fi
fi
echo
"Loading test otp
_2fa
configuration..."
echo
"Loading test otp configuration..."
$LDAPMODIFY
-v
-D
cn
=
config
-H
$URI1
-y
$CONFIGPWF
\
$LDAPMODIFY
-v
-D
cn
=
config
-H
$URI1
-y
$CONFIGPWF
\
>>
$TESTOUT
2>&1
<<
EOMOD
>>
$TESTOUT
2>&1
<<
EOMOD
dn: olcOverlay={0}otp
_2fa
,olcDatabase={1}
$BACKEND
,cn=config
dn: olcOverlay={0}otp,olcDatabase={1}
$BACKEND
,cn=config
changetype: add
changetype: add
objectClass: olcOverlayConfig
objectClass: olcOverlayConfig
EOMOD
EOMOD
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment