Skip to contentSkip to conversation

RFCv4: Yubikey authentication for OpenVPN

Openvpn-devel Steven Haigh 1 participant 1 message Jul 25, 2017

lore
Share & tools
lore
#0 lore raw

Hi all,

I have attached this script for comment to be considered for inclusion in the contrib section of openvpn to use the Yubico Yubicloud authentication for the Yubikey OTP.

Setup instructions are included in the top of the script file.

There is a current patch pending merging to fix client operation for auth tokens by ordex and dazo. This is slated to land in 2.4.4.

Ticket details:
https://community.openvpn.net/openvpn/ticket/904

Changes since v1:
* We now generate a completely random token by reading 128 bytes from /dev/ random and base64 encoding it - not partially created from connection attributes.
* Tokens are now stored in a token store file

Changes since v2:
* Multiple operations running at the exact same time could lead to lost tokens. The file lock (LOCK_EX) now applies from when we read in the token store until the file is closed after a write. This should stop any in-flight read/write conflicts losing tokens.

Changes since v3:
* We now generate a completely random token and store it between calls.
* We now expire tokens 2 hours after last use (default reneg-sec is 3600s)
* Requires LWP::UserAgent v6 or above and now forces SSL certificate validation for Yubikey API servers.
* Added $debug variable (set to 1 to enable debug output)

At this stage, I'm happy to submit this to the contrib area for v2.4.4 release to take advantage of the fixes in that build.

Signature · 4 lines
Steven Haigh

📧 [email protected]...       💻 http://www.crc.id.au
📞 +61 (3) 9001 6090    📱 0412 935 897