From d42649908cf5f9f03cf9af7d3150efca39f155c7 Mon Sep 17 00:00:00 2001 From: Erwan Colin Date: Tue, 15 Feb 2022 16:27:28 +0100 Subject: [PATCH] Enable LDAP auth before connecting to VPN. --- src/OpenVpn.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/OpenVpn.php b/src/OpenVpn.php index 0ab5cbc..d98a9da 100644 --- a/src/OpenVpn.php +++ b/src/OpenVpn.php @@ -242,6 +242,9 @@ private function writeProcess($profileId, ProfileConfig $profileConfig, array $p sprintf('local %s', $processConfig['local']), ]; + if (null !== $ldapAuthPlugin = $profileConfig->ldapAuthPlugin()) { + $serverConfig[] = sprintf('plugin %s "/etc/openvpn/auth/ldap.conf"', $ldapAuthPlugin); + } if ($profileConfig->tlsOneThree()) { // for TLSv1.3 we don't care about the tls-ciphers, they are all // fine, let the client choose