From b776003cf55e1035ac83186e44f72764e52e9e0d Mon Sep 17 00:00:00 2001 From: goodNETnick Date: Mon, 7 Feb 2022 02:04:28 -0500 Subject: ocserv: T4231: Added OTP support for Openconnect 2FA --- .../include/auth-local-users.xml.i | 69 ++++++++++++++++++++++ interface-definitions/vpn_openconnect.xml.in | 50 +++++++++++----- 2 files changed, 103 insertions(+), 16 deletions(-) (limited to 'interface-definitions') diff --git a/interface-definitions/include/auth-local-users.xml.i b/interface-definitions/include/auth-local-users.xml.i index 8ef09554e..add2fc8e1 100644 --- a/interface-definitions/include/auth-local-users.xml.i +++ b/interface-definitions/include/auth-local-users.xml.i @@ -7,6 +7,10 @@ Username used for authentication + + txt + Username used for authentication + #include @@ -15,6 +19,71 @@ Password used for authentication + + + 2FA OTP authentication parameters + + + + + Token Key Secret key for the token algorithm (see RFC 4226) + + txt + OTP key in hex-encoded format + + + [a-fA-F0-9]{20,10000} + + Key name must in hex be alphanumerical only (min. 20 hex characters) + + + + + Optional. Number of digits in OTP code (default: 6) + + u32:6-8 + Number of digits in OTP code (default: 6) + + + + + Number of digits in OTP code must be between 6 and 8 + + + + + Optional. Time tokens interval in seconds (for time tokens) (default: 30) + + u32:5-86400 + Time tokens interval in seconds (for time tokens). (default: 30) + + + + + Time token interval must be between 5 and 86400 seconds + + + + + Optional. Token type (default: hotp-time) + + hotp-time + time-based OTP algorithm + + + hotp-event + event-based OTP algorithm + + + (hotp-time|hotp-event) + + + hotp-time hotp-event + + + + + diff --git a/interface-definitions/vpn_openconnect.xml.in b/interface-definitions/vpn_openconnect.xml.in index 0db5e79d0..a3862647c 100644 --- a/interface-definitions/vpn_openconnect.xml.in +++ b/interface-definitions/vpn_openconnect.xml.in @@ -13,25 +13,43 @@ Authentication for remote access SSL VPN Server - + Authentication mode used by this server - - local - Use local username/password configuration - - - radius - Use RADIUS server for user autentication - - - ^(local|radius)$ - - - local radius - - + + + + Use local username/password configuration (OTP supported) + + password + Password-only local authentication (default) + + + otp + OTP-only local authentication + + + password-otp + Password (first) + OTP local authentication + + + ^(password|otp|password-otp)$ + + Invalid authentication mode + + otp password password-otp + + + + + + Use RADIUS server for user autentication + + + + + #include #include -- cgit v1.2.3