diff --git a/ci/qa/phpstan-baseline.neon b/ci/qa/phpstan-baseline.neon index 271b2c137..58be69241 100644 --- a/ci/qa/phpstan-baseline.neon +++ b/ci/qa/phpstan-baseline.neon @@ -2690,71 +2690,6 @@ parameters: count: 1 path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/WhitelistProjector.php - - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuditLogRepository\\:\\:findByIdentityId\\(\\) should return array\\ but returns mixed\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php - - - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuditLogRepository\\:\\:findEntriesWhereIdentityIsActorOnly\\(\\) should return array\\ but returns mixed\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php - - - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuditLogRepository\\:\\:saveAll\\(\\) has parameter \\$entries with no value type specified in iterable type array\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php - - - - message: "#^Cannot access offset 'institution' on mixed\\.$#" - count: 5 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php - - - - message: "#^Cannot cast mixed to string\\.$#" - count: 3 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php - - - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuthorizationRepository\\:\\:getAllowedIdentityRoles\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php - - - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\AuthorizationRepository\\:\\:getAllowedInstitutionRoles\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php - - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php - - - - message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php - - - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\IdentityRepository\\:\\:findByNameIdsIndexed\\(\\) should return array\\ but returns mixed\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php - - - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\IdentityRepository\\:\\:findOneByNameIdAndInstitution\\(\\) should return Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\Identity but returns mixed\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/IdentityRepository.php - - - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaCandidateRepository\\:\\:findOneByIdentityId\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php - - - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaCandidateRepository\\:\\:findOneByIdentityId\\(\\) should return array\\|null but returns mixed\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaCandidateRepository.php - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\RaListingRepository\\:\\:findByIdentityId\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -2775,16 +2710,6 @@ parameters: count: 1 path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php - - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\SraaRepository\\:\\:saveAll\\(\\) has parameter \\$sraaList with no value type specified in iterable type array\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/SraaRepository.php - - - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\VerifiedSecondFactorRepository\\:\\:findByDate\\(\\) should return array\\ but returns mixed\\.$#" - count: 1 - path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/VerifiedSecondFactorRepository.php - - message: "#^Method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\WhitelistEntryRepository\\:\\:findEntriesByInstitutions\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 diff --git a/src/Surfnet/Stepup/Projector/Projector.php b/src/Surfnet/Stepup/Projector/Projector.php new file mode 100644 index 000000000..081a8a0d7 --- /dev/null +++ b/src/Surfnet/Stepup/Projector/Projector.php @@ -0,0 +1,12 @@ +allowedSecondFactorRepository->save($allowedSecondFactor); } } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/ConfiguredInstitutionProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/ConfiguredInstitutionProjector.php index 554863814..40353a7c8 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/ConfiguredInstitutionProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/ConfiguredInstitutionProjector.php @@ -18,7 +18,8 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Configuration\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Configuration\Event\InstitutionConfigurationRemovedEvent; use Surfnet\Stepup\Configuration\Event\NewInstitutionConfigurationCreatedEvent; use Surfnet\StepupMiddleware\ApiBundle\Configuration\Entity\ConfiguredInstitution; @@ -40,4 +41,8 @@ public function applyInstitutionConfigurationRemovedEvent(InstitutionConfigurati { $this->configuredInstitutionRepository->removeConfigurationFor($event->institution); } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionAuthorizationProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionAuthorizationProjector.php index a13db3a70..dd2080f48 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionAuthorizationProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionAuthorizationProjector.php @@ -18,7 +18,8 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Configuration\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Configuration\Event\InstitutionConfigurationRemovedEvent; use Surfnet\Stepup\Configuration\Event\NewInstitutionConfigurationCreatedEvent; use Surfnet\Stepup\Configuration\Event\SelectRaaOptionChangedEvent; @@ -72,4 +73,8 @@ public function applyInstitutionConfigurationRemovedEvent(InstitutionConfigurati $event->institution, ); } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionConfigurationOptionsProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionConfigurationOptionsProjector.php index 9f22e2dc2..5e54d4003 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionConfigurationOptionsProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/InstitutionConfigurationOptionsProjector.php @@ -18,7 +18,8 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Configuration\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Configuration\Event\InstitutionConfigurationRemovedEvent; use Surfnet\Stepup\Configuration\Event\NewInstitutionConfigurationCreatedEvent; use Surfnet\Stepup\Configuration\Event\NumberOfTokensPerIdentityOptionChangedEvent; @@ -131,4 +132,8 @@ public function applyInstitutionConfigurationRemovedEvent(InstitutionConfigurati $this->institutionConfigurationOptionsRepository->removeConfigurationOptionsFor($event->institution); $this->allowedSecondFactorRepository->clearAllowedSecondFactorListFor($event->institution); } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/RaLocationProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/RaLocationProjector.php index 183ec7946..e487dd993 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/RaLocationProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Configuration/Projector/RaLocationProjector.php @@ -18,7 +18,8 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Configuration\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Configuration\Event\InstitutionConfigurationRemovedEvent; use Surfnet\Stepup\Configuration\Event\RaLocationAddedEvent; use Surfnet\Stepup\Configuration\Event\RaLocationContactInformationChangedEvent; @@ -100,4 +101,8 @@ private function fetchRaLocationById(RaLocationId $raLocationId): RaLocation return $raLocation; } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php index e22f7c590..19e3d278a 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/AuditLogProjector.php @@ -19,7 +19,6 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector; use Broadway\Domain\DomainMessage; -use Broadway\EventHandling\EventListener; use DateTime as CoreDateTime; use Ramsey\Uuid\Uuid; use Surfnet\Stepup\DateTime\DateTime; @@ -33,6 +32,7 @@ use Surfnet\Stepup\Identity\Value\RecoveryTokenIdentifierFactory; use Surfnet\Stepup\Identity\Value\RecoveryTokenType; use Surfnet\Stepup\Identity\Value\VettingType; +use Surfnet\Stepup\Projector\Projector; use Surfnet\StepupMiddleware\ApiBundle\Exception\RuntimeException; use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\AuditLogEntry; use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Identity; @@ -42,7 +42,7 @@ /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class AuditLogProjector implements EventListener +class AuditLogProjector extends Projector { public function __construct( private readonly AuditLogRepository $auditLogRepository, @@ -138,7 +138,7 @@ private function applyAuditableEvent(AuditableEvent $event, DomainMessage $domai $this->auditLogRepository->save($entry); } - private function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void { $entries = $this->auditLogRepository->findByIdentityId($event->identityId); foreach ($entries as $auditLogEntry) { diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentityProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentityProjector.php index 1becb7eeb..a6858698d 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentityProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentityProjector.php @@ -18,7 +18,7 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Identity\Event\IdentityCreatedEvent; use Surfnet\Stepup\Identity\Event\IdentityEmailChangedEvent; use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentitySelfAssertedTokenOptionsProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentitySelfAssertedTokenOptionsProjector.php index 695ec0b37..d08af17a2 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentitySelfAssertedTokenOptionsProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentitySelfAssertedTokenOptionsProjector.php @@ -18,7 +18,8 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Identity\Event\IdentityCreatedEvent; use Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent; use Surfnet\Stepup\Identity\Event\SecondFactorVettedWithoutTokenProofOfPossession; @@ -81,4 +82,9 @@ private function determinePossessionOfToken(VettingType $vettingType, IdentityId $identitySelfAssertedTokenOptions->possessedToken = true; $this->repository->save($identitySelfAssertedTokenOptions); } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void + { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/InstitutionListingProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/InstitutionListingProjector.php index 797a7036c..925983bfb 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/InstitutionListingProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/InstitutionListingProjector.php @@ -18,7 +18,8 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Identity\Event\IdentityCreatedEvent; use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\InstitutionListingRepository; @@ -36,4 +37,9 @@ public function applyIdentityCreatedEvent(IdentityCreatedEvent $event): void { $this->institutionListingRepository->addIfNotExists($event->identityInstitution); } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void + { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php index 0fe328319..287673e21 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaListingProjector.php @@ -18,7 +18,7 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Identity\Event\AppointedAsRaaEvent; use Surfnet\Stepup\Identity\Event\AppointedAsRaaForInstitutionEvent; use Surfnet\Stepup\Identity\Event\AppointedAsRaEvent; diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php index a9921fd6f..c25c8f6ea 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php @@ -18,7 +18,7 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Identity\Event\CompliedWithUnverifiedSecondFactorRevocationEvent; use Surfnet\Stepup\Identity\Event\CompliedWithVerifiedSecondFactorRevocationEvent; use Surfnet\Stepup\Identity\Event\CompliedWithVettedSecondFactorRevocationEvent; diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RecoveryTokenProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RecoveryTokenProjector.php index 901eca786..13206deed 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RecoveryTokenProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RecoveryTokenProjector.php @@ -18,7 +18,7 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Identity\Event\CompliedWithRecoveryCodeRevocationEvent; use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; use Surfnet\Stepup\Identity\Event\PhoneRecoveryTokenPossessionProvenEvent; diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php index 093ed64be..c9307d862 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php @@ -18,7 +18,7 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Identity\Event\CompliedWithUnverifiedSecondFactorRevocationEvent; use Surfnet\Stepup\Identity\Event\CompliedWithVerifiedSecondFactorRevocationEvent; use Surfnet\Stepup\Identity\Event\CompliedWithVettedSecondFactorRevocationEvent; diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorRevocationProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorRevocationProjector.php index e5e3047d2..58f543bc5 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorRevocationProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorRevocationProjector.php @@ -19,7 +19,8 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector; use Broadway\Domain\DomainMessage; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use DateTime as CoreDateTime; use Ramsey\Uuid\Uuid; use Surfnet\Stepup\DateTime\DateTime; @@ -61,4 +62,9 @@ protected function applyCompliedWithVettedSecondFactorRevocationEvent( $this->repository->save($revocation); } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void + { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SraaProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SraaProjector.php index e4e40341c..31402a060 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SraaProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SraaProjector.php @@ -18,7 +18,8 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Configuration\Event\SraaUpdatedEvent; use Surfnet\Stepup\Identity\Value\NameId; use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\Sraa; @@ -41,4 +42,9 @@ public function applySraaUpdatedEvent(SraaUpdatedEvent $event): void $this->sraaRepository->saveAll($sraaList); } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void + { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/VettingTypeHintProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/VettingTypeHintProjector.php index 1c184f337..d3d8e8cfd 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/VettingTypeHintProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/VettingTypeHintProjector.php @@ -18,7 +18,8 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Identity\Event\VettingTypeHintsSavedEvent; use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\VettingTypeHint; use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\VettingTypeHintRepository; @@ -45,4 +46,9 @@ public function applyVettingTypeHintsSavedEvent(VettingTypeHintsSavedEvent $even $entity->hints = $event->hints; $this->vettingTypeHintRepository->save($entity); } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void + { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/WhitelistProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/WhitelistProjector.php index e08240a44..74ae3b35a 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/WhitelistProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/WhitelistProjector.php @@ -18,7 +18,8 @@ namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Identity\Event\InstitutionsAddedToWhitelistEvent; use Surfnet\Stepup\Identity\Event\InstitutionsRemovedFromWhitelistEvent; use Surfnet\Stepup\Identity\Event\WhitelistCreatedEvent; @@ -75,4 +76,9 @@ protected function applyInstitutionsRemovedFromWhitelistEvent(InstitutionsRemove $this->whitelistEntryRepository->remove($whitelistEntries); } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void + { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/InstitutionConfigurationProjector.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/InstitutionConfigurationProjector.php index 6d4672d8b..39e4b1dab 100644 --- a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/InstitutionConfigurationProjector.php +++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/InstitutionConfigurationProjector.php @@ -20,7 +20,8 @@ namespace Surfnet\StepupMiddleware\GatewayBundle\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Configuration\Event\InstitutionConfigurationRemovedEvent; use Surfnet\Stepup\Configuration\Event\NewInstitutionConfigurationCreatedEvent; use Surfnet\Stepup\Configuration\Event\SsoOn2faOptionChangedEvent; @@ -64,4 +65,9 @@ public function applyInstitutionConfigurationRemovedEvent(InstitutionConfigurati { $this->repository->removeFor((string)$event->institution); } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void + { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SamlEntityProjector.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SamlEntityProjector.php index 3b9a5675d..c3c442ec0 100644 --- a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SamlEntityProjector.php +++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SamlEntityProjector.php @@ -18,7 +18,8 @@ namespace Surfnet\StepupMiddleware\GatewayBundle\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Configuration\Event\IdentityProvidersUpdatedEvent; use Surfnet\Stepup\Configuration\Event\ServiceProvidersUpdatedEvent; use Surfnet\StepupMiddleware\GatewayBundle\Entity\SamlEntity; @@ -56,4 +57,9 @@ public function applyIdentityProvidersUpdatedEvent(IdentityProvidersUpdatedEvent $this->samlEntityRepository->replaceAllIdps($spConfigurations); } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void + { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php index fd217359c..0d5bba432 100644 --- a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php +++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php @@ -18,7 +18,7 @@ namespace Surfnet\StepupMiddleware\GatewayBundle\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Identity\Event\CompliedWithVettedSecondFactorRevocationEvent; use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; use Surfnet\Stepup\Identity\Event\LocalePreferenceExpressedEvent; diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/WhitelistProjector.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/WhitelistProjector.php index 8c9bd5838..7e2716429 100644 --- a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/WhitelistProjector.php +++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/WhitelistProjector.php @@ -18,7 +18,8 @@ namespace Surfnet\StepupMiddleware\GatewayBundle\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Identity\Event\InstitutionsAddedToWhitelistEvent; use Surfnet\Stepup\Identity\Event\InstitutionsRemovedFromWhitelistEvent; use Surfnet\Stepup\Identity\Event\WhitelistCreatedEvent; @@ -75,4 +76,9 @@ protected function applyInstitutionsRemovedFromWhitelistEvent(InstitutionsRemove $this->whitelistEntryRepository->remove($whitelistEntries); } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void + { + // do nothing, no sensitive data in this projection + } } diff --git a/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Projector/EmailTemplatesProjector.php b/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Projector/EmailTemplatesProjector.php index 51b22ebfc..91cef55bd 100644 --- a/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Projector/EmailTemplatesProjector.php +++ b/src/Surfnet/StepupMiddleware/ManagementBundle/Configuration/Projector/EmailTemplatesProjector.php @@ -18,7 +18,8 @@ namespace Surfnet\StepupMiddleware\ManagementBundle\Configuration\Projector; -use Broadway\ReadModel\Projector; +use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; +use Surfnet\Stepup\Projector\Projector; use Surfnet\Stepup\Configuration\Event\EmailTemplatesUpdatedEvent; use Surfnet\StepupMiddleware\ManagementBundle\Configuration\Entity\EmailTemplate; use Surfnet\StepupMiddleware\ManagementBundle\Configuration\Repository\EmailTemplateRepository; @@ -40,4 +41,9 @@ public function applyEmailTemplatesUpdatedEvent(EmailTemplatesUpdatedEvent $even } } } + + protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void + { + // do nothing, no sensitive data in this projection + } }