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
Feature Request: log the impersonator #642
Comments
Just to be clear, we're talking about this: https://symfony.com/doc/4.4/security/impersonating_user.html I'm scrolling through the feature, and we would have to handle it in two ways since in 4.3 they changed/deprecated how to get the impersonated user: https://symfony.com/blog/new-in-symfony-4-3-deprecated-the-role-and-switchuserrole-classes Anyway, happy to accept a PR on this! |
Thanks for adding more context @Jean85. I hope I will find some time creating a PR for this, we will see. Meanwhile a question: would you suggest to add the impersonator's username as a tag or as a metadata of the user? |
IMHO, we could put it as a tag, since the addition would be done only when a user is actually impersonating another user; the normal user is already a tag on its own. But I would like more input on this... @ste93cry WDYT? |
I agree too, logging the impersonator's username as a tag means that it can also be searched (tags are indexed, extras are not), so it can be useful and we keep consistency with where we log the user. |
It would be helpful if the impersonator's username was also logged as a tag on a request similar to the authenticated user.
The text was updated successfully, but these errors were encountered: