-
Notifications
You must be signed in to change notification settings - Fork 14
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
IBX-8323: Reworked RepositoryAuthenticationProvider and moved its logic to a dedicated subscriber #396
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
konradoboza
force-pushed
the
ibx-8323-unsupported-password-type
branch
from
June 28, 2024 17:18
0c1a674
to
80e3526
Compare
konradoboza
force-pushed
the
ibx-8323-unsupported-password-type
branch
5 times, most recently
from
July 2, 2024 10:16
af2f5fe
to
bfdf393
Compare
konradoboza
added
Bug
Something isn't working
Feature
New feature request
Ready for review
labels
Jul 2, 2024
alongosz
approved these changes
Jul 4, 2024
ViniTou
approved these changes
Jul 5, 2024
Steveb-p
reviewed
Jul 5, 2024
...C/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriber.php
Show resolved
Hide resolved
...mfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriberTest.php
Outdated
Show resolved
Hide resolved
...mfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriberTest.php
Show resolved
Hide resolved
…ic to a dedicated subscriber
konradoboza
force-pushed
the
ibx-8323-unsupported-password-type
branch
from
July 5, 2024 11:32
bfdf393
to
85806bd
Compare
konradoboza
force-pushed
the
ibx-8323-unsupported-password-type
branch
from
July 5, 2024 13:17
bcaac47
to
bf62516
Compare
Quality Gate passedIssues Measures |
I also dropped |
Steveb-p
approved these changes
Jul 5, 2024
This was referenced Jul 8, 2024
katarzynazawada
approved these changes
Jul 9, 2024
barw4
pushed a commit
that referenced
this pull request
Oct 17, 2024
…ic to a dedicated subscriber (#396) For more details see https://issues.ibexa.co/browse/IBX-8323 and #396 Key changes: * Reworked RepositoryAuthenticationProvider and moved its logic to a dedicated subscriber
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
Something isn't working
Doc needed
The changes require some documentation
Feature
New feature request
QA approved
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
RememberMeRepositoryAuthenticationProvider
is another part of our codebase relying on deprecated security layer. It basically covers some additional checks performed on repository users like "forgot password redirect" being the subject of the underlying bug.In order to replace the deprecated approach I did the following:
SecurityPass
as the original class being replaced will be removed in Symfony 6 anyway,ibexa.security.authentication.constant_auth_time
setting from mentioned compiler pass and provided the same default value,RepositoryUserAuthenticationSubscriber
that will take over checks performed in the provider,The choice of
CheckPassportEvent
is intentional - I wanted to have possibility to stop and resume the authenticator process and according to my research this was the only suitable event for such purpose. Excerpt from Symfony doc:Note
Getting rid of injecting user into our
PermissionResolver
is intentional - the entire system got it covered within recently introduced https://github.com/ibexa/core/blob/main/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/OnAuthenticationTokenCreatedRepositoryUserSubscriber.php#L30.The main part I am concerned about and have little knowledge of is:
I don't think we have any documented use-cases for that part but still believe it should be approached differently if needed. Will discuss that internally but also summon @adamwojs to check if he remembers what it was all about.
Update:
We believe this is already covered by Symfony and was needed long time ago to make sure that user password change performed in another browser tab is effectively caught. Most likely we are fine due to usage of
Symfony\Component\Security\Core\User\EquatableInterface
which tends to be used to test if two objects are equal in security and re-authentication context.For QA:
Documentation:
Dropping
RememberMeRepositoryAuthenticationProvider
should be mentioned.