Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rejuvinate the Stepup Middleware #416

Draft
wants to merge 89 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
593e7d3
Smoketest env: Set database name to be used in tests
quartje Dec 12, 2023
bc0c1d5
Update test-integration.yml
MKodde Jan 17, 2024
2a45242
Remove security checks from qa checks
MKodde Jan 17, 2024
20c1515
Reenable phpcpd
MKodde Feb 22, 2024
4f96b1a
Upgrade composer dependencies
MKodde Feb 22, 2024
8c92a6e
Repair unit tests after SF6 upgrade
MKodde Feb 26, 2024
7b23511
Refrain from using deprecated config options
MKodde Feb 26, 2024
ebee370
Upgrade Treebuilder creation
MKodde Feb 26, 2024
9f1c36c
Update *Repository classes
MKodde Feb 26, 2024
836d10c
Update *Controller, extend AbstractController
MKodde Feb 26, 2024
749685f
Update Session framework settings
MKodde Feb 26, 2024
5a64ad2
Convert Annotations to Attributes
MKodde Feb 27, 2024
7a2bc4c
Improve type safety of Middleware
MKodde Feb 27, 2024
c256522
Improve code quality
MKodde Feb 27, 2024
aec34cc
Apply Symfony 6 code changes
MKodde Feb 27, 2024
ce33d58
Implement PHP 8 conde constructs
MKodde Feb 27, 2024
c3aa947
Repair the ManagerRegistry reference
MKodde Feb 27, 2024
30b5c70
Enable autoc onfigure/wire/public:false defaults
MKodde Feb 27, 2024
2094154
Add doctrine/annotations for jms translations
MKodde Feb 27, 2024
849b832
Change renamed contracts
MKodde Feb 27, 2024
8554c4e
Upgrade Doctrine Types
MKodde Feb 27, 2024
552da21
Adhere to the vetting type loa determination
MKodde Feb 27, 2024
b8873c7
Set $possessedSelfAssertedToken with correct type
MKodde Feb 27, 2024
6012715
Improve tyep definitions for deserialize methods
MKodde Feb 27, 2024
73a50f2
Repair AuthorizationServiceTest and typehint entities
MKodde Feb 27, 2024
cc2fe6e
Update test-integration to use the php82 container
MKodde Feb 28, 2024
95f0706
Repair IdentityCommandHandlerTest.php
MKodde Feb 28, 2024
b05b471
Configure the Mockery TestListener
MKodde Feb 29, 2024
73c95f0
Work on MW authorizations
MKodde Feb 29, 2024
4d5c91e
Remove .env from Middleware
MKodde Feb 29, 2024
86cea19
Rename namespace of Kernel
MKodde Mar 14, 2024
316f0b9
Install PHPStan with SF support
MKodde Mar 14, 2024
a438e3b
Update EventDisplatcher interface contracts
MKodde Mar 14, 2024
39f4cd9
Annotate event replay might throw an exception
MKodde Mar 14, 2024
6b9b0e7
Stop using AnonymousToken
MKodde Mar 14, 2024
60b2d0d
Address PHPStan level 1 issues
MKodde Mar 14, 2024
f4fb72c
Improve PHPStan Mockery integration
MKodde Mar 18, 2024
04b156a
Remove dead method from VettingTypeHintController
MKodde Mar 18, 2024
6305abc
Address remaining PHPStan level 2 issues
MKodde Mar 19, 2024
3dc4490
Address level 3 PHPStan issues
MKodde Mar 20, 2024
6e97aad
Address level 4 PHPStan issues
MKodde Mar 20, 2024
d146101
Address level 5 PHPStan issues
MKodde Mar 21, 2024
807ca93
Address PHPStan 6 findings
MKodde Mar 25, 2024
efa0cdc
Configure level 9, addding warnings to baseline
MKodde Apr 2, 2024
a6adafc
Address PHP MD issues that were introduced
MKodde Apr 2, 2024
4798367
Address PHP CS issues that were introduced
MKodde Apr 2, 2024
357a694
Install and repair document headers
MKodde Apr 2, 2024
df0ccca
Track ci/qa/phpstan.neon
MKodde Apr 2, 2024
8651776
Also the /internal/{info,health} paths must be publically available
thijskh Apr 17, 2024
8c21259
Make expiration date in mail match the one displayed in selfservice.
thijskh Mar 4, 2024
7a61750
Sync new monolog docker logging setup
pablothedude Nov 7, 2024
62f3042
Sync framework config setup
pablothedude Nov 7, 2024
02989b0
Force phpunit in test mode by setting env
pablothedude Nov 7, 2024
7a9725f
Fix update configuration command
pablothedude Nov 7, 2024
f434df0
Fix NameId VO
pablothedude Nov 7, 2024
358394a
Fix routes extension
pablothedude Nov 7, 2024
082b0bd
Remove duplicate composer dependencies
pablothedude Nov 7, 2024
c840078
Add missing migration doc headers
pablothedude Nov 11, 2024
185f34d
Fix broken tests
pablothedude Nov 11, 2024
cacf2a8
Fix deprecations while fixing broken tests
pablothedude Nov 11, 2024
42abdef
Fix role authentication deprecated or logic
pablothedude Nov 11, 2024
b9ff9de
Fix remaining configuration tests
pablothedude Nov 11, 2024
01e7842
Refactor all ParamConverters to ValueResolvers
pablothedude Nov 12, 2024
b989615
Fix the event replay
pablothedude Nov 15, 2024
9206181
Update config
pablothedude Nov 15, 2024
626ac37
Update Twig
pablothedude Nov 15, 2024
641281f
Fix the entitymanager state while replaying
pablothedude Nov 19, 2024
d4b8d6c
Fix route controllers
pablothedude Nov 19, 2024
563c627
Fix mail date format
pablothedude Nov 20, 2024
6954f7d
Fix deprecations
pablothedude Nov 20, 2024
b5071f9
Refactor remaining Symfony config to when@env
pablothedude Nov 21, 2024
ec393ad
Fix translations and extract script
pablothedude Nov 21, 2024
8a0f7c0
Update Doctrine migration scripts
pablothedude Nov 21, 2024
f5d08f7
Fix deprecated container injection in migrations
pablothedude Nov 26, 2024
29bc0bb
Fix replay errors test2 replay
pablothedude Nov 26, 2024
911f385
Lower dev log level
pablothedude Nov 26, 2024
9d834af
Fix production database diff
pablothedude Nov 28, 2024
d10ad3c
Bump saml2, xmlseclibs
thijskh Dec 6, 2024
f0a1b14
Add BC localizeddate twig filter
pablothedude Dec 9, 2024
83ef80e
Fix typo in doc block
pablothedude Dec 9, 2024
a274cc5
Support deprecated u2f support in projection
pablothedude Dec 9, 2024
756032a
Fixes after manual testing
pablothedude Dec 10, 2024
894632a
Bump test image
pablothedude Dec 10, 2024
9ad9861
Remove `php` from bash scripts
pablothedude Dec 11, 2024
50a1111
Split nameid VO exception
pablothedude Dec 11, 2024
c97543d
Change the mail date format back so timezone is used
pablothedude Dec 11, 2024
28d61a2
Remove pagerfanta orm adapter as separate dependency
pablothedude Dec 12, 2024
c118697
Minor changes after review
pablothedude Dec 17, 2024
b404242
Use php8 for docker builds
phavekes Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions ci/qa/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2660,14 +2660,19 @@ parameters:
count: 2
path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RecoveryTokenProjector.php

-
message: "#^Cannot access property \\$secondFactorIdentifier on Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\UnverifiedSecondFactor\\|null\\.$#"
count: 1
path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php

-
message: "#^Parameter \\#1 \\$secondFactor of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\UnverifiedSecondFactorRepository\\:\\:remove\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\UnverifiedSecondFactor, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\UnverifiedSecondFactor\\|null given\\.$#"
count: 2
count: 3
path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php

-
message: "#^Parameter \\#1 \\$secondFactor of method Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Repository\\\\VerifiedSecondFactorRepository\\:\\:remove\\(\\) expects Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VerifiedSecondFactor, Surfnet\\\\StepupMiddleware\\\\ApiBundle\\\\Identity\\\\Entity\\\\VerifiedSecondFactor\\|null given\\.$#"
count: 3
count: 4
path: ../../src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php

-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ public function applyGssfPossessionProvenAndVerifiedEvent(GssfPossessionProvenAn

public function applyEmailVerifiedEvent(EmailVerifiedEvent $event): void
{
$unverified = $this->unverifiedRepository->find($event->secondFactorId->getSecondFactorId());
if (is_null($unverified)) {
if ($event->secondFactorType->isU2f()) {
// u2f is deprecated so those events shouldn't be handled anymore
return;
}
$unverified = $this->unverifiedRepository->find($event->secondFactorId->getSecondFactorId());
pablothedude marked this conversation as resolved.
Show resolved Hide resolved

$verified = new VerifiedSecondFactor();
$verified->id = $event->secondFactorId->getSecondFactorId();
Expand Down Expand Up @@ -250,10 +251,12 @@ protected function applyCompliedWithUnverifiedSecondFactorRevocationEvent(

protected function applyVerifiedSecondFactorRevokedEvent(VerifiedSecondFactorRevokedEvent $event): void
{
$verifiedSecondFactor = $this->verifiedRepository->find($event->secondFactorId->getSecondFactorId());
if (is_null($verifiedSecondFactor)) {
if ($event->secondFactorType->isU2f()) {
// u2f is deprecated so those events shouldn't be handled anymore
return;
}
$verifiedSecondFactor = $this->verifiedRepository->find($event->secondFactorId->getSecondFactorId());

$this->verifiedRepository->remove($verifiedSecondFactor);
}

Expand Down
Loading