From 34a4e8057e4e544d2ca44c7a32f03b882ea6eb5e Mon Sep 17 00:00:00 2001 From: Paul Rijke Date: Thu, 13 Jun 2024 09:22:17 +0200 Subject: [PATCH] Update tiqr lib and monitor bundle Add two implementations of storage checks Add state storage check Ran phpcbf Make phpstan happy again --- composer.json | 7 +- composer.lock | 941 +++++------------- config/routes.yaml | 7 +- src/HealthCheck/StateStorageHealthCheck.php | 43 + .../UserSecretStorageHealthCheck.php | 46 + src/HealthCheck/UserStorageHealthCheck.php | 47 + src/Tiqr/Legacy/TiqrService.php | 7 + src/Tiqr/Legacy/TiqrUserRepository.php | 14 + 8 files changed, 400 insertions(+), 712 deletions(-) create mode 100644 src/HealthCheck/StateStorageHealthCheck.php create mode 100644 src/HealthCheck/UserSecretStorageHealthCheck.php create mode 100644 src/HealthCheck/UserStorageHealthCheck.php diff --git a/composer.json b/composer.json index 9151d962..e6655040 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "ext-libxml": "*", "ext-zlib": "*", "incenteev/composer-parameter-handler": "^2.2", - "openconext/monitor-bundle": "^4.1", + "openconext/monitor-bundle": "^4.3.0", "surfnet/stepup-bundle": "^6.0", "surfnet/stepup-gssp-bundle": "^5.0", "surfnet/stepup-saml-bundle": "^6.0", @@ -35,7 +35,7 @@ "symfony/validator": "^6.4", "symfony/webpack-encore-bundle": "^2.1", "symfony/yaml": "^6.4", - "tiqr/tiqr-server-libphp": "^4.2", + "tiqr/tiqr-server-libphp": "^4.3.0-beta1", "twig/extra-bundle": "^3.0", "twig/twig": "^3.0" }, @@ -116,7 +116,8 @@ "allow-plugins": { "symfony/flex": true, "symfony/runtime": true, - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "endroid/installer": false } }, "extra": { diff --git a/composer.lock b/composer.lock index 1cfa6a9b..6ef5ef5e 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": "023b4775868e7b43a5c67ddb18b24481", + "content-hash": "19e13415c7d91e005e4991131085c0f4", "packages": [ { "name": "beberlei/assert", @@ -469,623 +469,47 @@ "time": "2023-12-12T13:50:01+00:00" }, { - "name": "doctrine/collections", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "420480fc085bc65f3c956af13abe8e7546f94813" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/420480fc085bc65f3c956af13abe8e7546f94813", - "reference": "420480fc085bc65f3c956af13abe8e7546f94813", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1", - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^12", - "ext-json": "*", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^10.5", - "vimeo/psalm": "^5.11" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Collections\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", - "homepage": "https://www.doctrine-project.org/projects/collections.html", - "keywords": [ - "array", - "collections", - "iterators", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/collections/issues", - "source": "https://github.com/doctrine/collections/tree/2.2.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcollections", - "type": "tidelift" - } - ], - "time": "2024-03-05T22:28:45+00:00" - }, - { - "name": "doctrine/dbal", - "version": "4.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/dbal.git", - "reference": "9e588fe1f38a443cb17de6b86b803d9e028e2156" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/9e588fe1f38a443cb17de6b86b803d9e028e2156", - "reference": "9e588fe1f38a443cb17de6b86b803d9e028e2156", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^0.5.3|^1", - "php": "^8.1", - "psr/cache": "^1|^2|^3", - "psr/log": "^1|^2|^3" - }, - "require-dev": { - "doctrine/coding-standard": "12.0.0", - "fig/log-test": "^1", - "jetbrains/phpstorm-stubs": "2023.2", - "phpstan/phpstan": "1.10.58", - "phpstan/phpstan-phpunit": "1.3.15", - "phpstan/phpstan-strict-rules": "^1.5", - "phpunit/phpunit": "10.5.9", - "psalm/plugin-phpunit": "0.18.4", - "slevomat/coding-standard": "8.13.1", - "squizlabs/php_codesniffer": "3.9.0", - "symfony/cache": "^6.3.8|^7.0", - "symfony/console": "^5.4|^6.3|^7.0", - "vimeo/psalm": "5.21.1" - }, - "suggest": { - "symfony/console": "For helpful console commands such as SQL execution and import of files." - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\DBAL\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - } - ], - "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", - "homepage": "https://www.doctrine-project.org/projects/dbal.html", - "keywords": [ - "abstraction", - "database", - "db2", - "dbal", - "mariadb", - "mssql", - "mysql", - "oci8", - "oracle", - "pdo", - "pgsql", - "postgresql", - "queryobject", - "sasql", - "sql", - "sqlite", - "sqlserver", - "sqlsrv" - ], - "support": { - "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/4.0.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", - "type": "tidelift" - } - ], - "time": "2024-03-03T15:59:11+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.3" - }, - "time": "2024-01-30T19:34:25+00:00" - }, - { - "name": "doctrine/event-manager", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/event-manager.git", - "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/750671534e0241a7c50ea5b43f67e23eb5c96f32", - "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "conflict": { - "doctrine/common": "<2.9" - }, - "require-dev": { - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.8", - "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^4.28" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", - "homepage": "https://www.doctrine-project.org/projects/event-manager.html", - "keywords": [ - "event", - "event dispatcher", - "event manager", - "event system", - "events" - ], - "support": { - "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/2.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", - "type": "tidelift" - } - ], - "time": "2022-10-12T20:59:15+00:00" - }, - { - "name": "doctrine/inflector", - "version": "2.0.10", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", - "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^11.0", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.3", - "phpunit/phpunit": "^8.5 || ^9.5", - "vimeo/psalm": "^4.25 || ^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", - "homepage": "https://www.doctrine-project.org/projects/inflector.html", - "keywords": [ - "inflection", - "inflector", - "lowercase", - "manipulation", - "php", - "plural", - "singular", - "strings", - "uppercase", - "words" - ], - "support": { - "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.10" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", - "type": "tidelift" - } - ], - "time": "2024-02-18T20:23:39+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:23:10+00:00" - }, - { - "name": "doctrine/lexer", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^12", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.21" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2024-02-05T11:56:58+00:00" - }, - { - "name": "doctrine/orm", - "version": "3.1.1", + "name": "doctrine/dbal", + "version": "4.0.1", "source": { "type": "git", - "url": "https://github.com/doctrine/orm.git", - "reference": "9c560713925ac5859342e6ff370c4c997acf2fd4" + "url": "https://github.com/doctrine/dbal.git", + "reference": "9e588fe1f38a443cb17de6b86b803d9e028e2156" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/9c560713925ac5859342e6ff370c4c997acf2fd4", - "reference": "9c560713925ac5859342e6ff370c4c997acf2fd4", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/9e588fe1f38a443cb17de6b86b803d9e028e2156", + "reference": "9e588fe1f38a443cb17de6b86b803d9e028e2156", "shasum": "" }, "require": { - "composer-runtime-api": "^2", - "doctrine/collections": "^2.2", - "doctrine/dbal": "^3.8.2 || ^4", - "doctrine/deprecations": "^0.5.3 || ^1", - "doctrine/event-manager": "^1.2 || ^2", - "doctrine/inflector": "^1.4 || ^2.0", - "doctrine/instantiator": "^1.3 || ^2", - "doctrine/lexer": "^3", - "doctrine/persistence": "^3.3.1", - "ext-ctype": "*", + "doctrine/deprecations": "^0.5.3|^1", "php": "^8.1", - "psr/cache": "^1 || ^2 || ^3", - "symfony/console": "^5.4 || ^6.0 || ^7.0", - "symfony/var-exporter": "^6.3.9 || ^7.0" + "psr/cache": "^1|^2|^3", + "psr/log": "^1|^2|^3" }, "require-dev": { - "doctrine/coding-standard": "^12.0", - "phpbench/phpbench": "^1.0", - "phpstan/phpstan": "1.10.59", - "phpunit/phpunit": "^10.4.0", - "psr/log": "^1 || ^2 || ^3", - "squizlabs/php_codesniffer": "3.7.2", - "symfony/cache": "^5.4 || ^6.2 || ^7.0", - "vimeo/psalm": "5.22.2" + "doctrine/coding-standard": "12.0.0", + "fig/log-test": "^1", + "jetbrains/phpstorm-stubs": "2023.2", + "phpstan/phpstan": "1.10.58", + "phpstan/phpstan-phpunit": "1.3.15", + "phpstan/phpstan-strict-rules": "^1.5", + "phpunit/phpunit": "10.5.9", + "psalm/plugin-phpunit": "0.18.4", + "slevomat/coding-standard": "8.13.1", + "squizlabs/php_codesniffer": "3.9.0", + "symfony/cache": "^6.3.8|^7.0", + "symfony/console": "^5.4|^6.3|^7.0", + "vimeo/psalm": "5.21.1" }, "suggest": { - "ext-dom": "Provides support for XSD validation for XML mapping files", - "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0" + "symfony/console": "For helpful console commands such as SQL execution and import of files." }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\ORM\\": "src" + "Doctrine\\DBAL\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1108,121 +532,96 @@ { "name": "Jonathan Wage", "email": "jonwage@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" } ], - "description": "Object-Relational-Mapper for PHP", - "homepage": "https://www.doctrine-project.org/projects/orm.html", + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "homepage": "https://www.doctrine-project.org/projects/dbal.html", "keywords": [ + "abstraction", "database", - "orm" + "db2", + "dbal", + "mariadb", + "mssql", + "mysql", + "oci8", + "oracle", + "pdo", + "pgsql", + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlite", + "sqlserver", + "sqlsrv" ], "support": { - "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/3.1.1" + "issues": "https://github.com/doctrine/dbal/issues", + "source": "https://github.com/doctrine/dbal/tree/4.0.1" }, - "time": "2024-03-21T11:37:52+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2024-03-03T15:59:11+00:00" }, { - "name": "doctrine/persistence", - "version": "3.3.2", + "name": "doctrine/deprecations", + "version": "1.1.3", "source": { "type": "git", - "url": "https://github.com/doctrine/persistence.git", - "reference": "477da35bd0255e032826f440b94b3e37f2d56f42" + "url": "https://github.com/doctrine/deprecations.git", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/477da35bd0255e032826f440b94b3e37f2d56f42", - "reference": "477da35bd0255e032826f440b94b3e37f2d56f42", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", "shasum": "" }, "require": { - "doctrine/event-manager": "^1 || ^2", - "php": "^7.2 || ^8.0", - "psr/cache": "^1.0 || ^2.0 || ^3.0" - }, - "conflict": { - "doctrine/common": "<2.10" + "php": "^7.1 || ^8.0" }, "require-dev": { - "composer/package-versions-deprecated": "^1.11", - "doctrine/coding-standard": "^11", - "doctrine/common": "^3.0", - "phpstan/phpstan": "1.9.4", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1.1", - "phpunit/phpunit": "^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6.0", - "vimeo/psalm": "4.30.0 || 5.3.0" + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Persistence\\": "src/Persistence" + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", - "homepage": "https://www.doctrine-project.org/projects/persistence.html", - "keywords": [ - "mapper", - "object", - "odm", - "orm", - "persistence" - ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", "support": { - "issues": "https://github.com/doctrine/persistence/issues", - "source": "https://github.com/doctrine/persistence/tree/3.3.2" + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fpersistence", - "type": "tidelift" - } - ], - "time": "2024-03-12T14:54:36+00:00" + "time": "2024-01-30T19:34:25+00:00" }, { "name": "edamov/pushok", @@ -1292,6 +691,66 @@ }, "time": "2024-02-26T10:34:34+00:00" }, + { + "name": "endroid/installer", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/endroid/installer.git", + "reference": "308051404c8370b9641cd61d86a464f2c6938265" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/installer/zipball/308051404c8370b9641cd61d86a464f2c6938265", + "reference": "308051404c8370b9641cd61d86a464f2c6938265", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "php": "^8.1" + }, + "require-dev": { + "composer/composer": "^2.0", + "endroid/quality": "dev-main" + }, + "suggest": { + "roave/security-advisories": "Avoids installation of package versions with vulnerabilities" + }, + "type": "composer-plugin", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "class": "Endroid\\Installer\\Installer" + }, + "autoload": { + "psr-4": { + "Endroid\\Installer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeroen van den Enden", + "email": "info@endroid.nl" + } + ], + "description": "Composer plugin for installing configuration files", + "support": { + "issues": "https://github.com/endroid/installer/issues", + "source": "https://github.com/endroid/installer/tree/1.4.5" + }, + "funding": [ + { + "url": "https://github.com/endroid", + "type": "github" + } + ], + "time": "2023-11-07T12:11:36+00:00" + }, { "name": "firebase/php-jwt", "version": "v6.10.0", @@ -2161,33 +1620,31 @@ }, { "name": "openconext/monitor-bundle", - "version": "4.1.2", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/OpenConext/Monitor-bundle.git", - "reference": "9fad7f1c77c53fdc1fd4040a34ad4a4e0073f225" + "reference": "8a2d0b0915a699485d542f47d68950f4c7034c93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenConext/Monitor-bundle/zipball/9fad7f1c77c53fdc1fd4040a34ad4a4e0073f225", - "reference": "9fad7f1c77c53fdc1fd4040a34ad4a4e0073f225", + "url": "https://api.github.com/repos/OpenConext/Monitor-bundle/zipball/8a2d0b0915a699485d542f47d68950f4c7034c93", + "reference": "8a2d0b0915a699485d542f47d68950f4c7034c93", "shasum": "" }, "require": { - "doctrine/orm": "^2.9|^3.0", + "doctrine/dbal": "^3.1|^4.0", + "endroid/installer": "^1.4", "php": ">=8.2, <9.0-dev", - "symfony/dependency-injection": "^5.4|^6.3|^7.0", - "symfony/framework-bundle": "^5.4|^6.3|^7.0", + "symfony/dependency-injection": "^6.3|^7.0", + "symfony/framework-bundle": "^6.3|^7.0", "webmozart/assert": "^1.10" }, "require-dev": { "malukenho/docheader": "^1.0", - "matthiasnoback/symfony-config-test": "^4.3", "mockery/mockery": "^1.3.5|^1.4.4", "php-parallel-lint/php-parallel-lint": "^1.3", - "phpdocumentor/reflection-docblock": "^5.2", "phpmd/phpmd": "^2.13", - "phpunit/php-token-stream": "^3.1.3|^4.0.4", "phpunit/phpunit": "^9.6|^10.4", "sebastian/phpcpd": "^4.1|^5.0|^6.0", "squizlabs/php_codesniffer": "^3.6" @@ -2195,14 +1652,14 @@ "type": "symfony-bundle", "autoload": { "psr-4": { - "OpenConext\\MonitorBundle\\": "src" + "OpenConext\\MonitorBundle\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], - "description": "A Symfony 5/6/7 bundle that facilitates health and info endpoints to a Symfony application.", + "description": "A Symfony 6/7 bundle that facilitates health and info endpoints to a Symfony application.", "keywords": [ "OpenConext", "health", @@ -2212,9 +1669,9 @@ ], "support": { "issues": "https://github.com/OpenConext/Monitor-bundle/issues", - "source": "https://github.com/OpenConext/Monitor-bundle/tree/4.1.2" + "source": "https://github.com/OpenConext/Monitor-bundle/tree/4.3.0" }, - "time": "2024-02-28T14:23:16+00:00" + "time": "2024-05-30T11:10:17+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -7644,16 +7101,16 @@ }, { "name": "tiqr/tiqr-server-libphp", - "version": "4.2.0", + "version": "4.3.0-beta1", "source": { "type": "git", "url": "https://github.com/Tiqr/tiqr-server-libphp.git", - "reference": "63c666bb369ed91f90ea64666098c7013e377602" + "reference": "b91facd58df81c383d85dd054e481c38a5a85e66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Tiqr/tiqr-server-libphp/zipball/63c666bb369ed91f90ea64666098c7013e377602", - "reference": "63c666bb369ed91f90ea64666098c7013e377602", + "url": "https://api.github.com/repos/Tiqr/tiqr-server-libphp/zipball/b91facd58df81c383d85dd054e481c38a5a85e66", + "reference": "b91facd58df81c383d85dd054e481c38a5a85e66", "shasum": "" }, "require": { @@ -7693,9 +7150,9 @@ "description": "php library for tiqr authentication.", "support": { "issues": "https://github.com/Tiqr/tiqr-server-libphp/issues", - "source": "https://github.com/Tiqr/tiqr-server-libphp/tree/4.2.0" + "source": "https://github.com/Tiqr/tiqr-server-libphp/tree/4.3.0-beta1" }, - "time": "2024-03-22T15:01:30+00:00" + "time": "2024-06-13T07:07:28+00:00" }, { "name": "twig/extra-bundle", @@ -8618,6 +8075,76 @@ }, "time": "2023-01-05T11:28:13+00:00" }, + { + "name": "doctrine/instantiator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:23:10+00:00" + }, { "name": "friends-of-behat/mink-extension", "version": "v2.7.5", @@ -12234,7 +11761,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "tiqr/tiqr-server-libphp": 10 + }, "prefer-stable": true, "prefer-lowest": false, "platform": { diff --git a/config/routes.yaml b/config/routes.yaml index 6f053e8c..85fc703f 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -5,6 +5,7 @@ controllers: gssp_saml: resource: '@SurfnetGsspBundle/Resources/config/routing.yml' -openconext_monitor: - resource: "@OpenConextMonitorBundle/Resources/config/routing.yml" - prefix: / +open_conext_monitor: + resource: "@OpenConextMonitorBundle/src/Controller" + type: attribute + prefix: / diff --git a/src/HealthCheck/StateStorageHealthCheck.php b/src/HealthCheck/StateStorageHealthCheck.php new file mode 100644 index 00000000..59447158 --- /dev/null +++ b/src/HealthCheck/StateStorageHealthCheck.php @@ -0,0 +1,43 @@ +tiqrService->stateStorageHealthCheck($message)) { + return $report::buildStatusDown($message); + }; + + return $report; + } +} diff --git a/src/HealthCheck/UserSecretStorageHealthCheck.php b/src/HealthCheck/UserSecretStorageHealthCheck.php new file mode 100644 index 00000000..8e4b9d1d --- /dev/null +++ b/src/HealthCheck/UserSecretStorageHealthCheck.php @@ -0,0 +1,46 @@ +tiqrUserRepository instanceof TiqrUserRepository); + + $message = ''; + if (!$this->tiqrUserRepository->userSecretStorageHealthCheck($message)) { + return $report::buildStatusDown($message); + }; + + return $report; + } +} diff --git a/src/HealthCheck/UserStorageHealthCheck.php b/src/HealthCheck/UserStorageHealthCheck.php new file mode 100644 index 00000000..81b46aba --- /dev/null +++ b/src/HealthCheck/UserStorageHealthCheck.php @@ -0,0 +1,47 @@ +tiqrUserRepository instanceof TiqrUserRepository); + $message = ''; + if (!$this->tiqrUserRepository->userStorageHealthCheck($message)) { + return $report::buildStatusDown($message); + }; + + return $report; + } +} diff --git a/src/Tiqr/Legacy/TiqrService.php b/src/Tiqr/Legacy/TiqrService.php index be355ce0..4e02bb59 100644 --- a/src/Tiqr/Legacy/TiqrService.php +++ b/src/Tiqr/Legacy/TiqrService.php @@ -33,6 +33,7 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\StreamedResponse; use Tiqr_Service; +use Tiqr_StateStorage_Abstract; use Tiqr_StateStorage_StateStorageInterface; /** @@ -428,4 +429,10 @@ private function initSession(): void { $this->session = $this->requestStack->getSession(); } + + public function stateStorageHealthCheck(string &$message = ''): bool + { + assert($this->tiqrStateStorage instanceof Tiqr_StateStorage_Abstract); + return $this->tiqrStateStorage->healthCheck($message); + } } diff --git a/src/Tiqr/Legacy/TiqrUserRepository.php b/src/Tiqr/Legacy/TiqrUserRepository.php index 001ed3db..3742690e 100644 --- a/src/Tiqr/Legacy/TiqrUserRepository.php +++ b/src/Tiqr/Legacy/TiqrUserRepository.php @@ -24,7 +24,9 @@ use Surfnet\Tiqr\Exception\TiqrServerRuntimeException; use Surfnet\Tiqr\Tiqr\Exception\UserNotExistsException; use Surfnet\Tiqr\Tiqr\TiqrUserRepositoryInterface; +use Tiqr_UserSecretStorage_Abstract; use Tiqr_UserSecretStorage_Interface; +use Tiqr_UserStorage_Abstract; use Tiqr_UserStorage_Interface; /** @@ -67,4 +69,16 @@ public function getUser(string $userId): TiqrUser return new TiqrUser($this->userStorage, $this->userSecretStorage, $userId); } + + public function userStorageHealthCheck(string &$message = ''): bool + { + assert($this->userStorage instanceof Tiqr_UserStorage_Abstract); + return $this->userStorage->healthCheck($message); + } + + public function userSecretStorageHealthCheck(string &$message = ''): bool + { + assert($this->userSecretStorage instanceof Tiqr_UserSecretStorage_Abstract); + return $this->userSecretStorage->healthCheck($message); + } }