threerings / openvpn-auth-ldap

Implements username/password authentication via LDAP for OpenVPN 2.x.
Other
135 stars 62 forks source link

Support OpenVPN Challenge/Response protocol #62

Closed guywyers closed 5 years ago

guywyers commented 6 years ago

Hi,

This is a feature request to allow openvpn-auth-ldap to be compatible with one-time-passwords. I had been looking for this for a while and then saw the issue mentioned for another OpenVPN plugin, openvpn-otp. The issue is described here.
What I (and several other people who contacted me in the meantime) were looking for was a way to do LDAP authentication and add an additional layer of protection on top of that with OTP, using openvpn-otp.
As it happens, OpenVPN has a feature to do this which is called the “Challenge/Response Protocol” described here (scroll down to the bottom of the page to find the relevant section). This protocol seperates the password authentication from the OTP part.

There are three side to this:

To have authentication plug-ins support this, they require a small change to inform them that that they need to parse the password string and only look at the part that is relevant for them. This is a simple boolean flag, which it is set to true, triggers the parsing and extraction of the relevant bits.

I have already issued a pull request for openvpn-otp to do this and I am planning to do the same with openvpn-auth-ldap.