From 00a82fdf05c83bb2bd2814d1b72ad6b8407c1e0c Mon Sep 17 00:00:00 2001 From: mbugeia Date: Wed, 27 Apr 2016 20:45:49 +0200 Subject: [PATCH] Remove ReverseProxyLdap plugin --- conf/config.php | 2 +- sources/.htaccess | 26 -------- .../Auth/ReverseProxyLdapAuth.php | 66 ------------------- sources/plugins/ReverseProxyLdap/LICENSE | 21 ------ sources/plugins/ReverseProxyLdap/Makefile | 3 - sources/plugins/ReverseProxyLdap/Plugin.php | 40 ----------- sources/plugins/ReverseProxyLdap/README.md | 23 ------- 7 files changed, 1 insertion(+), 180 deletions(-) delete mode 100644 sources/.htaccess delete mode 100644 sources/plugins/ReverseProxyLdap/Auth/ReverseProxyLdapAuth.php delete mode 100644 sources/plugins/ReverseProxyLdap/LICENSE delete mode 100644 sources/plugins/ReverseProxyLdap/Makefile delete mode 100644 sources/plugins/ReverseProxyLdap/Plugin.php delete mode 100644 sources/plugins/ReverseProxyLdap/README.md diff --git a/conf/config.php b/conf/config.php index a531b6e..272b14e 100644 --- a/conf/config.php +++ b/conf/config.php @@ -127,7 +127,7 @@ define('LDAP_GROUP_FILTER', ''); define('LDAP_GROUP_ATTRIBUTE_NAME', 'cn'); // Enable/disable the reverse proxy authentication -define('REVERSE_PROXY_AUTH', false); +define('REVERSE_PROXY_AUTH', true); // Header name to use for the username define('REVERSE_PROXY_USER_HEADER', 'REMOTE_USER'); diff --git a/sources/.htaccess b/sources/.htaccess deleted file mode 100644 index 45123a9..0000000 --- a/sources/.htaccess +++ /dev/null @@ -1,26 +0,0 @@ - - Options -MultiViews - - SetEnv HTTP_MOD_REWRITE On - - RewriteEngine On - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^ index.php [QSA,L] - - - - - = 2.3> - Require all denied - - - Order allow,deny - Deny from all - - - - - Order allow,deny - Deny from all - - diff --git a/sources/plugins/ReverseProxyLdap/Auth/ReverseProxyLdapAuth.php b/sources/plugins/ReverseProxyLdap/Auth/ReverseProxyLdapAuth.php deleted file mode 100644 index 466f761..0000000 --- a/sources/plugins/ReverseProxyLdap/Auth/ReverseProxyLdapAuth.php +++ /dev/null @@ -1,66 +0,0 @@ -request->getRemoteUser(); - - if (! empty($username)) { - - $client = LdapClient::connect(); - $user = LdapUser::getUser($client, $username); - - if ($user === null) { - $this->logger->info('User not found in LDAP server'); - return false; - } - - if ($user->getUsername() === '') { - throw new LogicException('Username not found in LDAP profile, check the parameter LDAP_USER_ATTRIBUTE_USERNAME'); - } - - $this->userInfo = $user; - - return true; - } - - } catch (LdapException $e) { - $this->logger->error($e->getMessage()); - } - - return false; - } -} diff --git a/sources/plugins/ReverseProxyLdap/LICENSE b/sources/plugins/ReverseProxyLdap/LICENSE deleted file mode 100644 index 95e5a2e..0000000 --- a/sources/plugins/ReverseProxyLdap/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Frédéric Guillot - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/sources/plugins/ReverseProxyLdap/Makefile b/sources/plugins/ReverseProxyLdap/Makefile deleted file mode 100644 index e10760a..0000000 --- a/sources/plugins/ReverseProxyLdap/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -all: - @ echo "Build archive for plugin ${plugin} version=${version}" - @ git archive HEAD --prefix=${plugin}/ --format=zip -o ${plugin}-${version}.zip diff --git a/sources/plugins/ReverseProxyLdap/Plugin.php b/sources/plugins/ReverseProxyLdap/Plugin.php deleted file mode 100644 index c440e92..0000000 --- a/sources/plugins/ReverseProxyLdap/Plugin.php +++ /dev/null @@ -1,40 +0,0 @@ -authenticationManager->register(new ReverseProxyLdapAuth($this->container)); - } - - public function getPluginDescription() - { - return 'Authenticate users with Reverse-Proxy method but populate user information from the LDAP directory'; - } - - public function getPluginAuthor() - { - return 'Frédéric Guillot'; - } - - public function getPluginVersion() - { - return '1.0.0'; - } - - public function getPluginHomepage() - { - return 'https://github.com/kanboard/plugin-reverse-proxy-ldap'; - } -} diff --git a/sources/plugins/ReverseProxyLdap/README.md b/sources/plugins/ReverseProxyLdap/README.md deleted file mode 100644 index f9557cf..0000000 --- a/sources/plugins/ReverseProxyLdap/README.md +++ /dev/null @@ -1,23 +0,0 @@ -Reverse-Proxy Authentication plugin with LDAP support for Kanboard -================================================================== - -Authenticate users with Reverse-Proxy method but populate user information from the LDAP directory. - -Author ------- - -- Frédéric Guillot -- License MIT - -Installation ------------- - -- Create a folder **plugins/ReverseProxyLdap** or uncompress the latest archive in the folder **plugins** -- Copy all files under this directory - -Configuration -------------- - -- You must have LDAP configured in proxy mode in Kanboard -- Reverse-Proxy server configured correctly, the config parameter `REVERSE_PROXY_USER_HEADER` must be defined -- You **don't need** to set to `true` those constants: `LDAP_AUTH` and `REVERSE_PROXY_AUTH`