diff --git a/Dockerfile b/Dockerfile index ec614245..08d8c8ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,6 @@ ENV REFRESHED_AT 2021-06-14 RUN apt-get update -y \ && apt-get install -y \ php-gmp \ - php-memcached \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/composer.json b/composer.json index da7c6d39..d40e19e6 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,6 @@ "php": ">=8.1", "ext-gmp": "*", "ext-json": "*", - "ext-memcached": "*", "codemix/yii2-streamlog": "^1.3", "simplesamlphp/simplesamlphp": "^1.19.6", "simplesamlphp/composer-module-installer": "1.1.8", diff --git a/composer.lock b/composer.lock index d1ae0584..41b9cdaf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "edb95cf120b3b42f8ba23bebd6b0f62a", + "content-hash": "03d85826c06d84fb2d637696e16bc4b8", "packages": [ { "name": "aws/aws-crt-php", @@ -9629,8 +9629,7 @@ "platform": { "php": ">=8.1", "ext-gmp": "*", - "ext-json": "*", - "ext-memcached": "*" + "ext-json": "*" }, "platform-dev": [], "plugin-api-version": "2.6.0" diff --git a/development/idp-local/config/config.php b/development/idp-local/config/config.php index 3511775c..f0eb5350 100644 --- a/development/idp-local/config/config.php +++ b/development/idp-local/config/config.php @@ -57,10 +57,6 @@ $SECURE_COOKIE = Env::get('SECURE_COOKIE', true); $SESSION_DURATION = (int)(Env::get('SESSION_DURATION', (60 * 60 * 10))); // 10 hours. $SESSION_STORE_TYPE = Env::get('SESSION_STORE_TYPE', 'phpsession'); -$MEMCACHE_HOST1 = Env::get('MEMCACHE_HOST1', null); -$MEMCACHE_HOST2 = Env::get('MEMCACHE_HOST2', null); -$MEMCACHE_HOST1_PORT = Env::get('MEMCACHE_HOST1_PORT', 11211); -$MEMCACHE_HOST2_PORT = Env::get('MEMCACHE_HOST2_PORT', 11211); $MYSQL_HOST = Env::get('MYSQL_HOST', ''); $MYSQL_DATABASE = Env::get('MYSQL_DATABASE', ''); $MYSQL_USER = Env::get('MYSQL_USER', ''); @@ -806,20 +802,13 @@ * ], * */ - 'memcache_store.servers' => [ - [ - [ - 'hostname' => $MEMCACHE_HOST1, - 'port' => $MEMCACHE_HOST1_PORT, - ], - ], - [ - [ - 'hostname' => $MEMCACHE_HOST2, - 'port' => $MEMCACHE_HOST2_PORT, - ], - ], - ], +// 'memcache_store.servers' => [ +// [ +// [ +// 'hostname' => 'localhost', +// ], +// ], +// ], /* * This value allows you to set a prefix for memcache-keys. The default @@ -829,7 +818,7 @@ * than one instance is using memcache, you probably want to assign * a unique value per instance to this setting to avoid data collision. */ - //'memcache_store.prefix' => '', +// 'memcache_store.prefix' => '', /* * This value is the duration data should be stored in memcache. Data @@ -846,7 +835,7 @@ * Note: The oldest data will always be deleted if the memcache server * runs out of storage space. */ - 'memcache_store.expires' => $SESSION_DURATION + 3600, // Session duration plus an hour for clock skew +// 'memcache_store.expires' => 36 * (60 * 60), // 36 hours. diff --git a/development/idp2-local/config/config.php b/development/idp2-local/config/config.php index 3511775c..f0eb5350 100644 --- a/development/idp2-local/config/config.php +++ b/development/idp2-local/config/config.php @@ -57,10 +57,6 @@ $SECURE_COOKIE = Env::get('SECURE_COOKIE', true); $SESSION_DURATION = (int)(Env::get('SESSION_DURATION', (60 * 60 * 10))); // 10 hours. $SESSION_STORE_TYPE = Env::get('SESSION_STORE_TYPE', 'phpsession'); -$MEMCACHE_HOST1 = Env::get('MEMCACHE_HOST1', null); -$MEMCACHE_HOST2 = Env::get('MEMCACHE_HOST2', null); -$MEMCACHE_HOST1_PORT = Env::get('MEMCACHE_HOST1_PORT', 11211); -$MEMCACHE_HOST2_PORT = Env::get('MEMCACHE_HOST2_PORT', 11211); $MYSQL_HOST = Env::get('MYSQL_HOST', ''); $MYSQL_DATABASE = Env::get('MYSQL_DATABASE', ''); $MYSQL_USER = Env::get('MYSQL_USER', ''); @@ -806,20 +802,13 @@ * ], * */ - 'memcache_store.servers' => [ - [ - [ - 'hostname' => $MEMCACHE_HOST1, - 'port' => $MEMCACHE_HOST1_PORT, - ], - ], - [ - [ - 'hostname' => $MEMCACHE_HOST2, - 'port' => $MEMCACHE_HOST2_PORT, - ], - ], - ], +// 'memcache_store.servers' => [ +// [ +// [ +// 'hostname' => 'localhost', +// ], +// ], +// ], /* * This value allows you to set a prefix for memcache-keys. The default @@ -829,7 +818,7 @@ * than one instance is using memcache, you probably want to assign * a unique value per instance to this setting to avoid data collision. */ - //'memcache_store.prefix' => '', +// 'memcache_store.prefix' => '', /* * This value is the duration data should be stored in memcache. Data @@ -846,7 +835,7 @@ * Note: The oldest data will always be deleted if the memcache server * runs out of storage space. */ - 'memcache_store.expires' => $SESSION_DURATION + 3600, // Session duration plus an hour for clock skew +// 'memcache_store.expires' => 36 * (60 * 60), // 36 hours. diff --git a/development/idp3-local/config/config.php b/development/idp3-local/config/config.php index 6673268b..0911a43f 100644 --- a/development/idp3-local/config/config.php +++ b/development/idp3-local/config/config.php @@ -27,7 +27,6 @@ $SESSION_COOKIE_LIFETIME = (int)(Env::get('SESSION_COOKIE_LIFETIME', 0)); $SESSION_REMEMBERME_LIFETIME = (int)(Env::get('SESSION_REMEMBERME_LIFETIME', (14 * 86400))); // 14 days $SECURE_COOKIE = Env::get('SECURE_COOKIE', true); -$MEMCACHE_STORE_EXPIRES = (int)(Env::get('MEMCACHE_STORE_EXPIRES', (36 * 60 * 60))); // 36 hours. $SAML20_IDP_ENABLE = Env::get('SAML20_IDP_ENABLE', true); $GOOGLE_ENABLE = Env::get('GOOGLE_ENABLE', false); $FORCE_DISCOVERY = Env::get('FORCE_DISCOVERY', false); @@ -721,12 +720,21 @@ * ), * */ - 'memcache_store.servers' => [ - [ - ['hostname' => 'localhost'], - ], - ], +// 'memcache_store.servers' => [ +// [ +// ['hostname' => 'localhost'], +// ], +// ], + /* + * This value allows you to set a prefix for memcache-keys. The default + * for this value is 'simpleSAMLphp', which is fine in most cases. + * + * When running multiple instances of SSP on the same host, and more + * than one instance is using memcache, you probably want to assign + * a unique value per instance to this setting to avoid data collision. + */ +// 'memcache_store.prefix' => '', /* * This value is the duration data should be stored in memcache. Data @@ -743,7 +751,7 @@ * Note: The oldest data will always be deleted if the memcache server * runs out of storage space. */ - 'memcache_store.expires' => 36 * (60 * 60), // 36 hours. +// 'memcache_store.expires' => 36 * (60 * 60), // 36 hours. /* diff --git a/dockerbuild/config/config.php b/dockerbuild/config/config.php index 74da5399..fce86a2b 100644 --- a/dockerbuild/config/config.php +++ b/dockerbuild/config/config.php @@ -57,10 +57,6 @@ $SECURE_COOKIE = Env::get('SECURE_COOKIE', true); $SESSION_DURATION = (int)(Env::get('SESSION_DURATION', (60 * 60 * 10))); // 10 hours. $SESSION_STORE_TYPE = Env::get('SESSION_STORE_TYPE', 'phpsession'); -$MEMCACHE_HOST1 = Env::get('MEMCACHE_HOST1', null); -$MEMCACHE_HOST2 = Env::get('MEMCACHE_HOST2', null); -$MEMCACHE_HOST1_PORT = Env::get('MEMCACHE_HOST1_PORT', 11211); -$MEMCACHE_HOST2_PORT = Env::get('MEMCACHE_HOST2_PORT', 11211); $MYSQL_HOST = Env::get('MYSQL_HOST', ''); $MYSQL_DATABASE = Env::get('MYSQL_DATABASE', ''); $MYSQL_USER = Env::get('MYSQL_USER', ''); @@ -813,20 +809,13 @@ * ], * */ - 'memcache_store.servers' => [ - [ - [ - 'hostname' => $MEMCACHE_HOST1, - 'port' => $MEMCACHE_HOST1_PORT, - ], - ], - [ - [ - 'hostname' => $MEMCACHE_HOST2, - 'port' => $MEMCACHE_HOST2_PORT, - ], - ], - ], +// 'memcache_store.servers' => [ +// [ +// [ +// 'hostname' => 'localhost', +// ], +// ], +// ], /* * This value allows you to set a prefix for memcache-keys. The default diff --git a/local.env.dist b/local.env.dist index fc8485c6..5198c7f7 100644 --- a/local.env.dist +++ b/local.env.dist @@ -38,13 +38,9 @@ LOGGING_LEVEL= # LOGGING_HANDLER default is stderr, or may be one of: syslog, file, errlog, stderr LOGGING_HANDLER= -# Session store configuration. SESSION_STORE_TYPE can be "sql" or "memcache" +# Session store configuration. SESSION_STORE_TYPE can be "sql" or "phpsession" SESSION_STORE_TYPE= SESSION_DURATION= -MEMCACHE_HOST1= -MEMCACHE_HOST1_PORT= -MEMCACHE_HOST2= -MEMCACHE_HOST2_PORT= MYSQL_HOST= MYSQL_DATABASE= MYSQL_USER=