-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DX][Security] Add (de)authentication information to the profiler #36668
New issue
Have a question about this project? Sign up for a free GitH 8000 ub 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
Comments
Hi @wouterj! Started to work on a little something for this issue. For now, I'm able to retrieve and display in profiler if an authenticator is able to support request and is used to authenticate the current request. Here is the result in the profiler for now: I've been struggling a bit with something. As
Although it works, that's a problem if the application has more than one firewall, other than the |
Thank you for this suggestion. |
This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [Security] Add badge resolution to profiler | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | #36668 | License | MIT | Doc PR | This PR add badges resolution status in Security profiler as mentioned in #36668 (" See which badges are resolved and which aren't"). ### CSRF error  ### Wrong credentials  ### Authentication successful  Commits ------- 2324da2 [Security] Add badge resolution to profiler
…)authenticated (MatTheCat) This PR was merged into the 7.2 branch. Discussion ---------- [SecurityBundle] Link to the profile the token was (de)authenticated | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | Part of #36668 | License | MIT When using a stateful firewall, this PR allows an easy access to the profile of the request where a user was - authenticated:  - de-authenticated:  Commits ------- e3bd133 [SecurityBundle] Link to the profile the token was (de)authenticated
… (MatTheCat) This PR was merged into the 7.2 branch. Discussion ---------- [SecurityBundle] Improve profiler’s authenticators tab | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | Fix parts of #36668 | License | MIT This PR adds two new pieces of data to the profiler’s security panel’s authenticators tab: their “laziness” (if their `supports` method returned `null`) and the exception passed to their `onAuthenticationFailure` method. It also redesigns the table because displaying every possible column leads to a lot of wasted space and decreases legibility:  (You can see the table overflowing its container and the screen.) Instead, I took inspiration from the messenger panel and - reduced the number of columns to two: “status” (skipped/success/failure) and authenticator’s data - put additional data behind a toggle, expanded by default for authenticators whose `authenticate` method was called - wrote yes/no instead of using icons to get rid of the sense of rightness/wrongness  This will also make easier to add data if needed. Commits ------- a8075d4 [SecurityBundle] Improve authenticators tab
Description
It would be nice to display information about authentication in the profiler:
I think (1) can be done by creating a
TraceableAuthenticator
that decorates all authenticators and (2) and (3) should probably be done by an event listener onCheckPassportEvent
(with a very low priority).After this information is added to the profiler, we can investigate looking back at the profiler data before redirection to the login form and modifying the security item in the toolbar related to this. Most of this information is hidden behind at least one redirection (both authentication errors as deauthentication usually result in a redirect response).
The text was updated successfully, but these errors were encountered: