diff --git a/docker-compose.yml.example b/docker-compose.yml.example index 38a2f53cbeb2240b5f9caf8031ffae256b25e189..89801246870465a1b4dc6702eed63f023cdd2eee 100644 --- a/docker-compose.yml.example +++ b/docker-compose.yml.example @@ -33,11 +33,11 @@ services: - ./nginx/conf.d/app.conf:/etc/nginx/conf.d/app.conf - ./nginx/dhparam/:/run/dhparam # Saml config - - ./simplesamlphp-1.18.5:/var/simplesamlphp + - ./simplesamlphp-1.18.7:/var/simplesamlphp - ./simple-saml/cert:/var/simplesamlphp/cert - ./simple-saml/config:/var/simplesamlphp/config - ./simple-saml/metadata:/var/simplesamlphp/metadata - - ./simplesamlphp-1.18.5:/var/simplesamlphp-idp + - ./simplesamlphp-1.18.7:/var/simplesamlphp-idp - ./simple-saml-idp/cert:/var/simplesamlphp-idp/cert - ./simple-saml-idp/config:/var/simplesamlphp-idp/config - ./simple-saml-idp/metadata:/var/simplesamlphp-idp/metadata @@ -83,11 +83,11 @@ services: - ./src:/var/www - ./php/dev.ini:/usr/local/etc/php/conf.d/local.ini # Map saml files to the php-fpm server so it has access to them as well - - ./simplesamlphp-1.18.5:/var/simplesamlphp + - ./simplesamlphp-1.18.7:/var/simplesamlphp - ./simple-saml/cert:/var/simplesamlphp/cert - ./simple-saml/config:/var/simplesamlphp/config - ./simple-saml/metadata:/var/simplesamlphp/metadata - - ./simplesamlphp-1.18.5:/var/simplesamlphp-idp + - ./simplesamlphp-1.18.7:/var/simplesamlphp-idp - ./simple-saml-idp/cert:/var/simplesamlphp-idp/cert - ./simple-saml-idp/config:/var/simplesamlphp-idp/config - ./simple-saml-idp/metadata:/var/simplesamlphp-idp/metadata diff --git a/docker-compose.yml.prod b/docker-compose.yml.prod index 23c71e9f26ba7f5f87b6b694fc092dede4431706..c06c3a1e9e0e46643b19d146d8e9d745e8b38e20 100644 --- a/docker-compose.yml.prod +++ b/docker-compose.yml.prod @@ -35,7 +35,7 @@ services: - ./nginx/conf.d/prod.conf:/etc/nginx/conf.d/prod.conf - ./nginx/dhparam/:/run/dhparam # Saml config - - ./simplesamlphp-1.18.5:/var/simplesamlphp + - ./simplesamlphp-1.18.7:/var/simplesamlphp - ./simple-saml-prod/cert:/var/simplesamlphp/cert - ./simple-saml-prod/config:/var/simplesamlphp/config - ./simple-saml-prod/metadata:/var/simplesamlphp/metadata @@ -78,7 +78,7 @@ services: - ./src:/var/www - ./php/prod.ini:/usr/local/etc/php/conf.d/local.ini # Map saml files to the php-fpm server so it has access to them as well - - ./simplesamlphp-1.18.5:/var/simplesamlphp + - ./simplesamlphp-1.18.7:/var/simplesamlphp - ./simple-saml-prod/cert:/var/simplesamlphp/cert - ./simple-saml-prod/config:/var/simplesamlphp/config - ./simple-saml-prod/metadata:/var/simplesamlphp/metadata diff --git a/simplesamlphp-1.18.7/scoper.inc.php b/simplesamlphp-1.18.7/scoper.inc.php new file mode 100644 index 0000000000000000000000000000000000000000..b4753011e42e1ec84d65e88f2d9d3e6d73210707 --- /dev/null +++ b/simplesamlphp-1.18.7/scoper.inc.php @@ -0,0 +1,77 @@ + 'ScopedSimpleSamlPHP', + // By default when running php-scoper add-prefix, it will prefix all relevant code found in the current working + // directory. You can however define which files should be scoped by defining a collection of Finders in the + // following configuration key. + // + // For more see: https://github.com/humbug/php-scoper#finders-and-paths + 'finders' => [ + \Isolated\Symfony\Component\Finder\Finder::create() + ->files() + ->ignoreVCS(\true) + ->notName('/LICENSE|.*\\.md|.*\\.dist|Makefile|composer\\.json|composer\\.lock/') + ->exclude([ + 'cert', + 'cache', + 'config', + 'config-templates', + 'metadata', + 'metadata-templates', + 'vendor-bin', + 'locales', + 'docs', + 'www', + 'lib/SimpleSAML/Auth', + 'templates', + ])->in('.'), + \Isolated\Symfony\Component\Finder\Finder::create()->append(['composer.json']) + ], + // PHP-Scoper's goal is to make sure that all code for a project lies in a distinct PHP namespace. However, you + // may want to share a common API between the bundled code of your PHAR and the consumer code. For example if + // you have a PHPUnit PHAR with isolated code, you still want the PHAR to be able to understand the + // PHPUnit\Framework\TestCase class. + // + // A way to achieve this is by specifying a list of classes to not prefix with the following configuration key. Note + // that this does not work with functions or constants neither with classes belonging to the global namespace. + // + // Fore more see https://github.com/humbug/php-scoper#whitelist + 'whitelist' => [ + // 'PHPUnit\Framework\TestCase', // A specific class + // 'PHPUnit\Framework\*', // The whole namespace + 'SimpleSAML\\*', + 'SimpleSAML*', + 'SimpleSAML', + 'SAML2\\*', + 'SAML2', + 'SimpleSamlPhp\\*', + 'SimpleSamlPhp*', + 'SimpleSamlPhp', + ], + + 'files-whitelist' => [ + 'vendor/simplesamlphp/saml2/src/_autoload.php', + 'scoper.inc.php', + 'lib/_autoload.php', + 'lib/_autoload_modules.php', + 'tests/_autoload_modules.php', + 'lib/SimpleSAML/Stats.php', + ], + + // If `true` then the user defined constants belonging to the global namespace will not be prefixed. + // + // For more see https://github.com/humbug/php-scoper#constants--constants--functions-from-the-global-namespace + 'whitelist-global-constants' => \true, + // If `true` then the user defined classes belonging to the global namespace will not be prefixed. + // + // For more see https://github.com/humbug/php-scoper#constants--constants--functions-from-the-global-namespace + 'whitelist-global-classes' => \true, + // If `true` then the user defined functions belonging to the global namespace will not be prefixed. + // + // For more see https://github.com/humbug/php-scoper#constants--constants--functions-from-the-global-namespace + 'whitelist-global-functions' => \true, +]; diff --git a/src/backend/src/Gateways/Saml/SimpleSamlPhpSamlRepository.php b/src/backend/src/Gateways/Saml/SimpleSamlPhpSamlRepository.php index fc20b71e292b452ebf8548c499bc06b154cb800f..87c8e9663cfa70e2fa5100ecb39e2a8c43cdc8dc 100644 --- a/src/backend/src/Gateways/Saml/SimpleSamlPhpSamlRepository.php +++ b/src/backend/src/Gateways/Saml/SimpleSamlPhpSamlRepository.php @@ -17,7 +17,7 @@ class SimpleSamlPhpSamlRepository implements SamlRepository protected string $logoutUrl; /** - * Found in simplesamlphp-1.18.5/lib/SimpleSAML/Auth/Simple.php + * Found in simplesamlphp-1.18.7/lib/SimpleSAML/Auth/Simple.php * * See https://simplesamlphp.org/docs/stable/simplesamlphp-sp-api for information on these methods *