From 88ea9b8ab3d56db51d32b418046b1387dcbe93c3 Mon Sep 17 00:00:00 2001 From: Jaime Perez Crespo <jaime.perez@uninett.no> Date: Thu, 18 Feb 2016 15:57:16 +0100 Subject: [PATCH] Mark the old Auth MemCookie implementation as deprecated. --- docs/simplesamlphp-advancedfeatures.txt | 86 +------------------------ lib/SimpleSAML/AuthMemCookie.php | 2 + www/authmemcookie.php | 2 + 3 files changed, 7 insertions(+), 83 deletions(-) diff --git a/docs/simplesamlphp-advancedfeatures.txt b/docs/simplesamlphp-advancedfeatures.txt index 355e741b7..e9ecdb5e1 100644 --- a/docs/simplesamlphp-advancedfeatures.txt +++ b/docs/simplesamlphp-advancedfeatures.txt @@ -78,89 +78,9 @@ The default is not to use a proxy ('proxy' = null) and no username and password Auth MemCookie -------------- -It is possible to integrate SimpleSAMLphp with [Auth MemCookie](http://authmemcookie.sourceforge.net/). This allows you to integrate SimpleSAMLphp with web applications written in another language than PHP. - -Auth MemCookie works by reading authentication data from a memcache server and setting environment variables based on attributes in this data. It also allows you to use the default Apache access control features to restrict access to your site. - -The SimpleSAMLphp Auth MemCookie module can be found in `www/authmemcookie.php` and the configuration should be stored in `config/authmemcookie.php`. You may have to copy this file from `config-template/authmemcookie.php`. - -To use Auth MemCookie, you need to do the following steps: - -1. Install and configure SimpleSAMLphp for running as an SP. -2. Install and configure a memcache server. -3. Install and configure Auth MemCookie. Go to the - [Auth MemCookie homepage](http://authmemcookie.sourceforge.net/) - for downloads and installation instructions. The following example - (from `extra/auth_memcookie.conf`) may be useful when configuring - Auth MemCookie: - - <Location /> - # This is a list of memcache servers which Auth MemCookie - # should use. It is a ','-separated list of - # host:port-pairs. - # Note that this list must list the same servers as the - # 'authmemcookie.servers'-option in config.php in the - # configuration for SimpleSAMLphp. - Auth_memCookie_Memcached_AddrPort "127.0.0.1:11211" - - # This must be set to 'on' to enable Auth MemCookie for - # this directory. - Auth_memCookie_Authoritative on - - # This adjusts the maximum number of data elements in the - # session data. The default is 10, which can be to low. - Auth_memCookie_SessionTableSize "40" - - # These two commands are required to enable access control - # in Apache. - AuthType Cookie - AuthName "My Login" - - # This command causes apache to redirect to the given - # URL when we receive a '401 Authorization Required' - # error. We redirect to "/simplesaml/authmemcookie.php", - # which initializes a login to the IdP. - ErrorDocument 401 "/simplesaml/authmemcookie.php" - - </Location> - - <Location /secret> - # This allows all authenticated users to access the - # directory. To learn more about the 'Require' command, - # please look at: - # http://httpd.apache.org/docs/2.0/mod/core.html#require - Require valid-user - </Location> - -4. - Configure the SimpleSAMLphp Auth MemCookie module by editing - `config/authmemcookie.php`. You must set the `username` option to a - valid attribute name. All other can most likely be left at their - default values. - -5. - Enable the SimpleSAMLphp Auth MemCookie module by setting - `enable.authmemcookie` to *`true`* in `config/config.php`. - -6. - To test the installation, you can add the following script as your - `/secret/index.php` directory: - - <html><body><table> - <?php - foreach($_SERVER as $key=>$value) { - echo('<tr><td>' . htmlspecialchars($key) . '</td><td>' . htmlspecialchars($value) . '</td></tr>'); - } - ?> - </table></body></html> - - You should now be able to go to `http://yourserver/secret/` to test - the configuration. You should be redirected to your IdP, and after - entering your username and password you should be taken back to - `http://yourserver/secret/`. The resulting page should list all - environment variables set by Apache, including the ones set by Auth - MemCookie. - +[Auth MemCookie](http://authmemcookie.sourceforge.net/) support is deprecated in the standard code base of SimpleSAMLphp + and will no longer be available starting in SimpleSAMLphp 2.0. Please use the new + [memcookie module](https://github.com/simplesamlphp/simplesamlphp-module-memcookie) instead. diff --git a/lib/SimpleSAML/AuthMemCookie.php b/lib/SimpleSAML/AuthMemCookie.php index c8966564e..ab69515ef 100644 --- a/lib/SimpleSAML/AuthMemCookie.php +++ b/lib/SimpleSAML/AuthMemCookie.php @@ -7,6 +7,8 @@ * * @author Olav Morken, UNINETT AS. * @package SimpleSAMLphp + * + * @deprecated This class has been deprecated and will be removed in SSP 2.0. Use the memcookie module instead. */ class SimpleSAML_AuthMemCookie { diff --git a/www/authmemcookie.php b/www/authmemcookie.php index 02aedc49a..77379f64d 100644 --- a/www/authmemcookie.php +++ b/www/authmemcookie.php @@ -8,6 +8,8 @@ * * The file extra/auth_memcookie.conf contains an example of how Auth Memcookie can be configured * to use SimpleSAMLphp. + * + * @deprecated This file has been deprecated and will be removed in SSP 2.0. Use the memcookie module instead. */ require_once('_include.php'); -- GitLab