SLAPO_OTP(5)
π
SLAPO_OTP β the slapo-otp page, bestie edition β¨
okay so you're here for the slapo-otp manual page (it lives in File Formats Manual, section 5, iykyk) and honestly? it's giving two-factor icon energy. let's go π
β¨ NAME β¨
slapo-otp β the OATH One-Time Password module, aka the thing that makes your LDAP password do a little duet with a 6-digit code πΈ
π¦ SYNOPSIS π¦
moduleload otp.la
that's it. that's the whole synopsis. slay π
π DESCRIPTION π
so the otp module lets you use time-based one-time passwords (you know, the "authenticator-style" ones) and HMAC-based one-time passwords alongside a regular LDAP password, for that sweet sweet two-factor authentication life β¨
with this module loaded, users authenticate by typing their password followed by the one-time password right there in the password prompt. one prompt, two secrets, no extra drama π
the password a user needs is calculated from a counter (the current time, in the TOTP case) plus a key that's referenced in the user's LDAP entry. and because it's based on time or on how many times it's been used, it changes periodically. once it's been used, it cannot be used again β so keyloggers and shoulder-surfers are officially thwarted, no cap π₯. a mobile phone application like Google Authenticator or YubiKey (what the page calls a prover) can crunch the current one-time password for the user, which comes out as a (usually six-digit) number π’
alternatively, the value can be calculated by some other application that has access to the user's key and then delivered to the user over SMS or some other channel π±. when the user gets prompted to authenticate, they just append the code the prover gave them to the end of their password. easy.
this implementation complies with RFC 4226 HOTP HMAC-Based One Time Passwords and RFC 6238 TOTP Time-based One Time Passwords, and it supports the SHA-1, SHA-256, and SHA-512 HMAC algorithms π§
the HMAC key used in the OTP computation lives in the oathOTPToken entry that's referenced in the user's LDAP entry, and the parameters live in the oathOTPParams LDAP entry that's referenced in the token. nesting! we love a reference chain π
π CONFIGURATION π
once the module is configured on the database, it will intercept LDAP simple binds for users whose LDAP entry has any of the oathOTPUser-derived objectclasses attached to it π. the attributes linking the user and the shared secret are:
oathTOTPToken: <dn>β mandatory foroathTOTPUser. says that the named entry is the designated holder of the time-based one-time password shared secret and the last password used πoathHOTPToken: <dn>β mandatory foroathHOTPUser. says that the named entry is the designated holder of the one-time password shared secret and the last password used πoathTOTPParams: <dn>β mandatory foroathTOTPToken. says that the named entry is the designated holder of the parameters for generating the time-based one-time password shared secret: its length, the algorithm to use, plus the length of each time step and the grace period β³oathHOTPParams: <dn>β mandatory foroathTOTPToken. says that the named entry is the designated holder of the parameters for generating the one-time password shared secret: its length, the algorithm to use, plus the permitted number of passwords to skip β³
the overlay also intercepts LDAP Compare requests against the oathSecret attribute of an oathTOTPToken or oathHOTPToken entry, and checks the asserted value against the configured secret π. this is subject to compare access to the attribute, so mind your ACLs bestie.
the following parts of the OATH-LDAP schema are implemented π«
General attributes π
oathSecret: <data>β the shared secret is stored right here, as raw bytes π§¬oathOTPLength: <length>β the password length. usually6β¨oathHMACAlgorithm: <OID>β the OID of the hash algorithm to use, as defined in RFC 8018. supported algorithms includeSHA1,SHA224,SHA256,SHA384andSHA512π
The HOTP attributes π
oathHOTPLookAhead: <number>β how many successive HOTP tokens are allowed to be skipped πoathHOTPCounter: <number>β the order of the last HOTP token the user successfully redeemed π’
The TOTP attributes β°
oathTOTPTimeStepPeriod: <seconds>β the length of the time-step period used for TOTP calculation β³oathTOTPLastTimeStep: <number>β the order of the last TOTP token the user successfully redeemed π’oathTOTPTimeStepWindow: <number>β how many time periods around the current time get tried when checking the password the user provided πoathTOTPTimeStepDrift: <number>β if the client didn't hand over the correct token but it still fit insideoathTOTPTimeStepWindowabove, this attribute records the current offset to apply, to cover slow clock drift of the client device π°οΈ
πΈ SEE ALSO πΈ
π ACKNOWLEDGEMENT π
this work was developed by OndΕej KuznΓk and Howard Chu of Symas Corporation for inclusion in OpenLDAP Software ππ«Ά
this work reuses the OATH-LDAP schema developed by Michael StrΓΆder π
ngl, that was a lot of attributes, but you ate that. go configure your two-factor era π
and that's a wrap! this page is from SLAPO-OTP, dated 2018/6/29, and it's the SLAPO_OTP(5) page β stay secure, bestie ππ
π¦ where this page comes from
- arch rolling: openldap 2.7.1-1
- arch rolling: openldap 2.7.2-2 Β· OLDAP-2.8
- Copyright 2015-2026 The OpenLDAP Foundation
- Copyright 2015 by Howard Chu, Symas Corp. All rights reserved
- Copyright 2018 by OndΕej KuznΓk, Symas Corp. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms